glibc/glibc-rh741105.patch

112 lines
3.7 KiB
Diff
Raw Normal View History

Short description: Work ld.so --verify crash on debuginfo files.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #741105, #767146
Upstream status: not-needed
This change is designed to work around running ld.so on a debuginfo
file. This is the wrong fix for this problem and should be dropped.
The correct solution is to mark debuginfo files as new types of
ELF files.
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
diff --git a/elf/dl-load.c b/elf/dl-load.c
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
index 646c5dca40efcc9b..1f44ea3744f139f3 100644
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
@@ -952,6 +952,18 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
in this information for the executable in case of an explicit
loader invocation. */
struct r_file_id id;
+ struct stat64 st;
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
+
+ if (__glibc_unlikely (!_dl_get_file_id (fd, &id, &st)))
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
+ {
+ errstring = N_("cannot stat shared object");
+ call_lose_errno:
+ errval = errno;
+ call_lose:
+ lose (errval, fd, name, realname, l, errstring,
+ make_consistent ? r : NULL, nsid);
+ }
+
if (mode & __RTLD_OPENEXEC)
{
assert (nsid == LM_ID_BASE);
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
@@ -959,16 +971,6 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
}
else
{
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
- if (__glibc_unlikely (!_dl_get_file_id (fd, &id)))
- {
- errstring = N_("cannot stat shared object");
- call_lose_errno:
- errval = errno;
- call_lose:
- lose (errval, fd, name, realname, l, errstring,
- make_consistent ? r : NULL, nsid);
- }
-
/* Look again to see if the real name matched another already loaded. */
for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next)
if (!l->l_removed && _dl_file_id_match_p (&l->l_file_id, &id))
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
@@ -1147,6 +1149,16 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
= N_("ELF load command address/offset not properly aligned");
goto call_lose;
}
+ if (__glibc_unlikely (ph->p_offset + ph->p_filesz > st.st_size))
+ {
+ /* If the segment requires zeroing of part of its last
+ page, we'll crash when accessing the unmapped page.
+ There's still a possibility of a race, if the shared
+ object is truncated between the fxstat above and the
+ memset below. */
+ errstring = N_("ELF load command past end of file");
+ goto call_lose;
+ }
struct loadcmd *c = &loadcmds[nloadcmds++];
2015-10-21 19:24:28 +00:00
c->mapstart = ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize));
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
diff --git a/sysdeps/generic/dl-fileid.h b/sysdeps/generic/dl-fileid.h
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
index 459328d28c62c8e1..5070580b1b0cc629 100644
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
--- a/sysdeps/generic/dl-fileid.h
+++ b/sysdeps/generic/dl-fileid.h
@@ -29,7 +29,8 @@ struct r_file_id
On error, returns false, with errno set. */
static inline bool
_dl_get_file_id (int fd __attribute__ ((unused)),
- struct r_file_id *id __attribute__ ((unused)))
+ struct r_file_id *id __attribute__ ((unused)),
+ struct stat64_t *st __attribute__((unused)))
{
return true;
}
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
diff --git a/sysdeps/posix/dl-fileid.h b/sysdeps/posix/dl-fileid.h
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
index b3c8166701650b8b..cd862f511e6e3e94 100644
Auto-sync with upstream branch master Upstream commit: ca602c1536ce2777f95c07525f3c42d78812e665 - Adjust glibc-rh741105.patch - Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h - [powerpc] fenv_private.h clean up - [powerpc] libc_feupdateenv_test: optimize FPSCR access - [powerpc] __fesetround_inline optimizations - [powerpc] Rename fegetenv_status to fegetenv_control - [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write - [powerpc] Rename fesetenv_mode to fesetenv_control - Add helper script for glibc debugging - Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. - y2038: Provide conversion helpers for struct __timespec64 - Use binutils 2.33 branch in build-many-glibcs.py. - Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable - Split up endian.h to minimize exposure of BYTE_ORDER. - time: Add padding for the timespec if required - Enable passing arguments to the inferior in debugglibc.sh - [powerpc] No need to enter "Ignore Exceptions Mode" - Y2038: Include proper header to provide support for struct timeval on HURD - Disable warnings in string/tester.c at top level. - string/endian.h: Restore the __USE_MISC conditionals - Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. - ChangeLog update from my last commit - nptl: Move pthread_attr_setinheritsched implementation into libc. - elf: Never use the file ID of the main executable [BZ #24900] - elf: Assign TLS modid later during dlopen [BZ #24930] - nptl: Move pthread_attr_getschedparam implementation into libc - riscv: Remove support for variable page sizes - nptl: Move pthread_attr_setschedparam implementation into libc
2019-10-08 14:36:34 +00:00
--- a/sysdeps/posix/dl-fileid.h
+++ b/sysdeps/posix/dl-fileid.h
@@ -27,18 +27,16 @@ struct r_file_id
ino64_t ino;
};
-/* Sample FD to fill in *ID. Returns true on success.
+/* Sample FD to fill in *ID and *ST. Returns true on success.
On error, returns false, with errno set. */
static inline bool
-_dl_get_file_id (int fd, struct r_file_id *id)
+_dl_get_file_id (int fd, struct r_file_id *id, struct stat64 *st)
{
- struct stat64 st;
-
Auto-sync with upstream branch master Upstream-commit: cdf645427d176197b82f44308a5e131d69fb53ad - glibc-rh741105.patch: Adjust after rebase. - glibc-fix-float128-benchtests.patch: Add to allow building on armv7hl. - Update mallinfo2 ABI, and test - Allow memset local PLT reference for RISC-V. - powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy - nscd: bump GC cycle during cache pruning (bug 26130) - x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] - <sys/platform/x86.h>: Add Intel Key Locker support - Fix handling of collating symbols in fnmatch (bug 26620) - pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] - y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time - hurd: Add __x86_get_cpu_features to ld.abilist - x86: Install <sys/platform/x86.h> [BZ #26124] - linux: Add time64 pselect support - linux: Add time64 semtimedop support - linux: Add ppoll time64 optimization - linux: Simplify clock_getres - Update sparc libm-test-ulps - Remove internal usage of extensible stat functions - Linux: Consolidate xmknod - linux: Consolidate fxstatat{64} - linux: Consolidate fxstat{64} - linux: Consolidate lxstat{64} - linux: Consolidate xstat{64} - linux: Define STAT64_IS_KERNEL_STAT64 - linux: Always define STAT_IS_KERNEL_STAT - Update powerpc libm-test-ulps - benchtests: Add "workload" traces for sinf128 - benchtests: Add "workload" traces for sinf - benchtests: Add "workload" traces for sin - benchtests: Add "workload" traces for powf128 - benchtests: Add "workload" traces for pow - benchtests: Add "workload" traces for expf128 - benchtests: Add "workload" traces for exp - nptl: futex: Provide correct indentation for part of __futex_abstimed_wait_cancelable64
2020-09-21 10:33:35 +00:00
- if (__glibc_unlikely (__fstat64 (fd, &st) < 0))
+ if (__glibc_unlikely (__fstat64 (fd, st) < 0))
return false;
- id->dev = st.st_dev;
- id->ino = st.st_ino;
+ id->dev = st->st_dev;
+ id->ino = st->st_ino;
return true;
}