* [PATCH] Fix LD_ASSUME_KERNEL
@ 2005-05-30 19:31 Jakub Jelinek
2005-05-30 20:25 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2005-05-30 19:31 UTC (permalink / raw)
To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers
Hi!
Now that DL_SYSDEP_OSCHECK is done in rtld.c, after vDSO has been looked
at and more importantly after process_envvars, LD_ASSUME_KERNEL no longer
works, because GLRO(dl_osversion) is first set in process_envvars
and then unconditionally overwritten in DL_SYSDEP_OSCHECK.
The following patch fixes this by not overwriting GLRO(dl_osversion)
if it was set via LD_ASSUME_KERNEL to a value smaller than
_dl_discover_osversion ().
2005-05-30 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): If
GLRO(dl_osversion) has been already set to a value smaller than
_dl_discover_osversion (), don't overwrite it here.
--- libc/sysdeps/unix/sysv/linux/dl-osinfo.h.jj 2005-04-27 12:33:22.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/dl-osinfo.h 2005-05-30 11:38:08.000000000 +0200
@@ -145,7 +145,9 @@ _dl_discover_osversion (void)
int version = _dl_discover_osversion (); \
if (__builtin_expect (version >= 0, 1)) \
{ \
- GLRO(dl_osversion) = version; \
+ if (__builtin_expect (GLRO(dl_osversion) == 0, 1) \
+ || GLRO(dl_osversion) > version) \
+ GLRO(dl_osversion) = version; \
\
/* Now we can test with the required version. */ \
if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION) \
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix LD_ASSUME_KERNEL
2005-05-30 19:31 [PATCH] Fix LD_ASSUME_KERNEL Jakub Jelinek
@ 2005-05-30 20:25 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2005-05-30 20:25 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers
[-- Attachment #1: Type: text/plain, Size: 101 bytes --]
Applied.
--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-30 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-30 19:31 [PATCH] Fix LD_ASSUME_KERNEL Jakub Jelinek
2005-05-30 20:25 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).