Skip to content

Commit

Permalink
Added patch files for disabling glibc security checks and net-next-nu…
Browse files Browse the repository at this point in the history
…se linker script py 2 to 3

Signed-off-by: Parth Pratim Chatterjee <parth27official@gmail.com>
  • Loading branch information
ParthPratim committed Jun 1, 2021
1 parent aae1324 commit 790b706
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions utils/glibc-2.31-disable-security-checks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/elf/dl-load.c b/elf/dl-load.c
index a6b80f9395..e7dca92238 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1205,9 +1205,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
/* Make sure we are not dlopen'ing an object that has the
DF_1_NOOPEN flag set, or a PIE object. */
if ((__glibc_unlikely (l->l_flags_1 & DF_1_NOOPEN)
- && (mode & __RTLD_DLOPEN))
- || (__glibc_unlikely (l->l_flags_1 & DF_1_PIE)
- && __glibc_unlikely ((mode & __RTLD_OPENEXEC) == 0)))
+ && (mode & __RTLD_DLOPEN)))
{
/* We are not supposed to load this object. Free all resources. */
_dl_unmap_segments (l);
diff --git a/libio/vtables.c b/libio/vtables.c
index 17f2e8e587..73e6906768 100644
--- a/libio/vtables.c
+++ b/libio/vtables.c
@@ -69,7 +69,7 @@ _IO_vtable_check (void)
return;
#endif

- __libc_fatal ("Fatal error: glibc detected an invalid stdio handle\n");
+ //__libc_fatal ("Fatal error: glibc detected an invalid stdio handle\n");
}

/* Some variants of libstdc++ interpose _IO_2_1_stdin_ etc. and
10 changes: 10 additions & 0 deletions utils/linker-script-py-to-py3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/arch/lib/generate-linker-script.py b/arch/lib/generate-linker-script.py
index db3d7f8dab16..93971ee4871d 100755
--- a/arch/lib/generate-linker-script.py
+++ b/arch/lib/generate-linker-script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3

import re

0 comments on commit 790b706

Please sign in to comment.