forked from pool/glibc
Accepting request 455480 from home:Andreas_Schwab:Factory
- tunables-bigendian.patch: Fix getting tunable values on big-endian (BZ #21109) OBS-URL: https://build.opensuse.org/request/show/455480 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=452
This commit is contained in:
parent
9627e11e8b
commit
1aae48d750
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 8 09:38:15 UTC 2017 - schwab@suse.de
|
||||
|
||||
- tunables-bigendian.patch: Fix getting tunable values on big-endian (BZ
|
||||
#21109)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 18:26:21 UTC 2017 - schwab@suse.de
|
||||
|
||||
|
@ -249,6 +249,8 @@ Patch306: glibc-fix-double-loopback.diff
|
||||
###
|
||||
# Patches from upstream
|
||||
###
|
||||
# PATCH-FIX-UPSTREAM Fix getting tunable values on big-endian (BZ #21109)
|
||||
Patch1000: tunables-bigendian.patch
|
||||
|
||||
###
|
||||
# Patches awaiting upstream approval
|
||||
@ -469,6 +471,8 @@ rm nscd/s-stamp
|
||||
%patch304 -p1
|
||||
%patch306 -p1
|
||||
|
||||
%patch1000 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 8 09:38:15 UTC 2017 - schwab@suse.de
|
||||
|
||||
- tunables-bigendian.patch: Fix getting tunable values on big-endian (BZ
|
||||
#21109)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 18:26:21 UTC 2017 - schwab@suse.de
|
||||
|
||||
|
@ -247,6 +247,8 @@ Patch306: glibc-fix-double-loopback.diff
|
||||
###
|
||||
# Patches from upstream
|
||||
###
|
||||
# PATCH-FIX-UPSTREAM Fix getting tunable values on big-endian (BZ #21109)
|
||||
Patch1000: tunables-bigendian.patch
|
||||
|
||||
###
|
||||
# Patches awaiting upstream approval
|
||||
@ -468,6 +470,8 @@ rm nscd/s-stamp
|
||||
%patch304 -p1
|
||||
%patch306 -p1
|
||||
|
||||
%patch1000 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 8 09:38:15 UTC 2017 - schwab@suse.de
|
||||
|
||||
- tunables-bigendian.patch: Fix getting tunable values on big-endian (BZ
|
||||
#21109)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 18:26:21 UTC 2017 - schwab@suse.de
|
||||
|
||||
|
@ -249,6 +249,8 @@ Patch306: glibc-fix-double-loopback.diff
|
||||
###
|
||||
# Patches from upstream
|
||||
###
|
||||
# PATCH-FIX-UPSTREAM Fix getting tunable values on big-endian (BZ #21109)
|
||||
Patch1000: tunables-bigendian.patch
|
||||
|
||||
###
|
||||
# Patches awaiting upstream approval
|
||||
@ -469,6 +471,8 @@ rm nscd/s-stamp
|
||||
%patch304 -p1
|
||||
%patch306 -p1
|
||||
|
||||
%patch1000 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
|
73
tunables-bigendian.patch
Normal file
73
tunables-bigendian.patch
Normal file
@ -0,0 +1,73 @@
|
||||
2017-02-08 Siddhesh Poyarekar <siddhesh@sourceware.org>
|
||||
|
||||
[BZ #21109]
|
||||
* elf/dl-tunable-types.h (tunable_callback_t): Accept
|
||||
tunable_val_t as argument.
|
||||
* elf/dl-tunables.c (__tunable_set_val): Add comment.
|
||||
* malloc/arena.c (set_mallopt_check): Take tunable_val_t as
|
||||
argument.
|
||||
(DL_TUNABLE_CALLBACK_FNDECL): Likewise.
|
||||
|
||||
Index: glibc-2.25/elf/dl-tunable-types.h
|
||||
===================================================================
|
||||
--- glibc-2.25.orig/elf/dl-tunable-types.h
|
||||
+++ glibc-2.25/elf/dl-tunable-types.h
|
||||
@@ -21,8 +21,6 @@
|
||||
# define _TUNABLE_TYPES_H_
|
||||
#include <stddef.h>
|
||||
|
||||
-typedef void (*tunable_callback_t) (void *);
|
||||
-
|
||||
typedef enum
|
||||
{
|
||||
TUNABLE_TYPE_INT_32,
|
||||
@@ -43,6 +41,8 @@ typedef union
|
||||
const char *strval;
|
||||
} tunable_val_t;
|
||||
|
||||
+typedef void (*tunable_callback_t) (tunable_val_t *);
|
||||
+
|
||||
/* Security level for tunables. This decides what to do with individual
|
||||
tunables for AT_SECURE binaries. */
|
||||
typedef enum
|
||||
Index: glibc-2.25/elf/dl-tunables.c
|
||||
===================================================================
|
||||
--- glibc-2.25.orig/elf/dl-tunables.c
|
||||
+++ glibc-2.25/elf/dl-tunables.c
|
||||
@@ -455,6 +455,8 @@ __tunable_set_val (tunable_id_t id, void
|
||||
if (cur->strval == NULL)
|
||||
return;
|
||||
|
||||
+ /* Caller does not need the value, just call the callback with our tunable
|
||||
+ value. */
|
||||
if (valp == NULL)
|
||||
goto cb;
|
||||
|
||||
Index: glibc-2.25/malloc/arena.c
|
||||
===================================================================
|
||||
--- glibc-2.25.orig/malloc/arena.c
|
||||
+++ glibc-2.25/malloc/arena.c
|
||||
@@ -212,9 +212,9 @@ __malloc_fork_unlock_child (void)
|
||||
#if HAVE_TUNABLES
|
||||
static inline int do_set_mallopt_check (int32_t value);
|
||||
void
|
||||
-DL_TUNABLE_CALLBACK (set_mallopt_check) (void *valp)
|
||||
+DL_TUNABLE_CALLBACK (set_mallopt_check) (tunable_val_t *valp)
|
||||
{
|
||||
- int32_t value = *(int32_t *) valp;
|
||||
+ int32_t value = (int32_t) valp->numval;
|
||||
do_set_mallopt_check (value);
|
||||
if (check_action != 0)
|
||||
__malloc_check_init ();
|
||||
@@ -223,9 +223,9 @@ DL_TUNABLE_CALLBACK (set_mallopt_check)
|
||||
# define DL_TUNABLE_CALLBACK_FNDECL(__name, __type) \
|
||||
static inline int do_ ## __name (__type value); \
|
||||
void \
|
||||
-DL_TUNABLE_CALLBACK (__name) (void *valp) \
|
||||
+DL_TUNABLE_CALLBACK (__name) (tunable_val_t *valp) \
|
||||
{ \
|
||||
- __type value = *(__type *) valp; \
|
||||
+ __type value = (__type) (valp)->numval; \
|
||||
do_ ## __name (value); \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user