mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Remove kernel version check
The kernel version check is used to avoid glibc to run on older kernels where some syscall are not available and fallback code are not enabled to handle graciously fail. However, it does not prevent if the kernel does not correctly advertise its version through vDSO note, uname or procfs. Also kernel version checks are sometime not desirable by users, where they want to deploy on different system with different kernel version knowing the minimum set of syscall is always presented on such systems. The kernel version check has been removed along with the LD_ASSUME_KERNEL environment variable. The minimum kernel used to built glibc is still provided through NT_GNU_ABI_TAG ELF note and also printed when libc.so is issued. Checked on x86_64-linux-gnu.
This commit is contained in:
@@ -22,31 +22,6 @@
|
||||
#include <stdint.h>
|
||||
#include <not-cancel.h>
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#define DL_SYSDEP_OSCHECK(FATAL) \
|
||||
do { \
|
||||
/* Test whether the kernel is new enough. This test is only performed \
|
||||
if the library is not compiled to run on all kernels. */ \
|
||||
\
|
||||
int version = _dl_discover_osversion (); \
|
||||
if (__glibc_likely (version >= 0)) \
|
||||
{ \
|
||||
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) \
|
||||
/* Not sufficent. */ \
|
||||
FATAL ("FATAL: kernel too old\n"); \
|
||||
} \
|
||||
else if (__LINUX_KERNEL_VERSION > 0) \
|
||||
FATAL ("FATAL: cannot determine kernel version\n"); \
|
||||
} while (0)
|
||||
|
||||
static inline uintptr_t __attribute__ ((always_inline))
|
||||
_dl_setup_stack_chk_guard (void *dl_random)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user