Accepting request 636617 from home:WernerFink:branches:security
- Add patch f2193587.patch from github pull request * Fix segfault on arm machines which do not eport the cache size or say it is -1 in sysfs - Refresh patches OBS-URL: https://build.opensuse.org/request/show/636617 OBS-URL: https://build.opensuse.org/package/show/security/haveged?expand=0&rev=123
This commit is contained in:
parent
17a598f87b
commit
433852052d
27
f2193587.patch
Normal file
27
f2193587.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From f2193587e8e51aa42b192c17ad39467931e2d4c2 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 19 Sep 2018 09:51:43 +0200
|
||||
Subject: [PATCH] Fix segfault on arm machines
|
||||
|
||||
Some ARM cpus does not report the cache size or say it is -1 in sysfs.
|
||||
It has been observed on xgene and thunderx machines.
|
||||
|
||||
Fall back to the generic cache size when that happens so we don't
|
||||
segfault.
|
||||
|
||||
Should fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866306
|
||||
---
|
||||
src/havegetune.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/src/havegetune.c
|
||||
+++ b/src/havegetune.c 2018-09-19 09:25:27.016773887 +0000
|
||||
@@ -795,6 +795,8 @@ static int vfs_configInfoCache(
|
||||
ctype = vfs_configFile(pAnchor, path, vfs_configType);
|
||||
strcpy(path+plen, "size");
|
||||
size = vfs_configFile(pAnchor, path, vfs_configInt);
|
||||
+ if (size == -1)
|
||||
+ size = ctype == 'I' ? GENERIC_ICACHE : GENERIC_DCACHE;
|
||||
cfg_cacheAdd(pAnchor, SRC_VFS_INDEX, pArgs[1], level, ctype, size);
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
haveged-1.9.2/configure.ac | 7 ++++++-
|
||||
haveged-1.9.4/configure.ac | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
--- haveged-1.9.2/configure.ac
|
||||
+++ haveged-1.9.2/configure.ac 2018-06-26 08:06:45.195289211 +0000
|
||||
@@ -61,6 +61,11 @@ AC_ARG_ENABLE(nistest,
|
||||
--- haveged-1.9.4/configure.ac
|
||||
+++ haveged-1.9.4/configure.ac 2018-09-19 09:23:58.582379792 +0000
|
||||
@@ -62,6 +62,11 @@ AC_ARG_ENABLE(nistest,
|
||||
AS_HELP_STRING([--enable-nistest=[no/yes]],[Run NIST test suite [default=no]]),
|
||||
, enable_nistest="no")
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
## Make self test features configurable
|
||||
AC_ARG_ENABLE(olt,
|
||||
AS_HELP_STRING([--enable-olt=[yes/no]],[Enable online tests [default=yes]]),
|
||||
@@ -228,7 +233,7 @@ AM_CONDITIONAL(ENABLE_SYSV, test "$init_
|
||||
@@ -241,7 +246,7 @@ AM_CONDITIONAL(ENABLE_SYSV, test "$init_
|
||||
AM_CONDITIONAL(ENABLE_SYSTEMD, test "$init_type" = "systemd")
|
||||
AM_CONDITIONAL(ENABLE_SYSTEMD_LOOKUP, test "$enable_initdir" = "?")
|
||||
AM_CONDITIONAL(ENABLE_NOINIT, test "$init_type" = "none")
|
||||
|
@ -1,12 +1,12 @@
|
||||
Index: haveged-1.9.1/src/haveged.c
|
||||
===================================================================
|
||||
---
|
||||
haveged-1.9.2/src/haveged.c | 6 ++++++
|
||||
haveged-1.9.4/src/haveged.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- haveged-1.9.2/src/haveged.c
|
||||
+++ haveged-1.9.2/src/haveged.c 2018-06-26 08:07:51.430076528 +0000
|
||||
@@ -361,8 +361,10 @@ static void daemonize( /* RETURN: no
|
||||
--- haveged-1.9.4/src/haveged.c
|
||||
+++ haveged-1.9.4/src/haveged.c 2018-09-19 09:24:30.741795848 +0000
|
||||
@@ -478,8 +478,10 @@ static void daemonize( /* RETURN: no
|
||||
void) /* IN: nothing */
|
||||
{
|
||||
FILE *fh;
|
||||
@ -17,7 +17,7 @@ Index: haveged-1.9.1/src/haveged.c
|
||||
if (daemon(0, 0) == -1)
|
||||
error_exit("Cannot fork into the background");
|
||||
fh = fopen(params->pid_file, "w");
|
||||
@@ -501,7 +503,9 @@ static void error_exit( /* RETURN: no
|
||||
@@ -684,7 +686,9 @@ void error_exit( /* RETURN: no
|
||||
#ifndef NO_DAEMON
|
||||
if (params->detached!=0) {
|
||||
unlink(params->pid_file);
|
||||
@ -27,7 +27,7 @@ Index: haveged-1.9.1/src/haveged.c
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -611,11 +615,13 @@ static void print_msg( /* RETURN: no
|
||||
@@ -794,11 +798,13 @@ static void print_msg( /* RETURN: no
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
snprintf(buffer, sizeof(buffer), "%s: %s", params->daemon, format);
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 19 09:27:15 UTC 2018 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch f2193587.patch from github pull request
|
||||
* Fix segfault on arm machines which do not eport the cache size
|
||||
or say it is -1 in sysfs
|
||||
- Refresh patches
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 11 15:29:33 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
@ -34,6 +34,8 @@ Patch0: ppc64le.patch
|
||||
Patch1: haveged-conditional-enttest.patch
|
||||
# PATCH-FIX-UPSTREAM: don't write to syslog at startup to avoid deadlocks psimons@suse.com bnc#959237
|
||||
Patch2: haveged-no-syslog.patch
|
||||
# PATCH-FIX-GITHUN: Fix segfault on arm machines
|
||||
Patch3: f2193587.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
@ -82,6 +84,7 @@ algorithm and supporting features.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
autoreconf -fvi
|
||||
|
@ -1,12 +1,12 @@
|
||||
Index: haveged-1.9.1/configure.ac
|
||||
===================================================================
|
||||
---
|
||||
haveged-1.9.2/configure.ac | 2 +-
|
||||
haveged-1.9.4/configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- haveged-1.9.2/configure.ac
|
||||
+++ haveged-1.9.2/configure.ac 2018-06-26 08:05:43.668415539 +0000
|
||||
@@ -157,7 +157,7 @@ case "$host" in
|
||||
--- haveged-1.9.4/configure.ac
|
||||
+++ haveged-1.9.4/configure.ac 2018-09-19 09:23:01.331419209 +0000
|
||||
@@ -170,7 +170,7 @@ case "$host" in
|
||||
AC_DEFINE(HAVE_ISA_IA64, 1, [Define to 1 for ia64])
|
||||
;;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user