From: "Barry K. Nathan" <barryn@pobox.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Lukasz Trabinski <lukasz@wsisiz.edu.pl>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] make uselib configurable (was Re: uselib() & 2.6.X?)
Date: Tue, 11 Jan 2005 14:51:27 -0800 [thread overview]
Message-ID: <20050111225127.GD4378@ip68-4-98-123.oc.oc.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0501081042040.2386@ppc970.osdl.org>
On Sat, Jan 08, 2005 at 10:46:19AM -0800, Linus Torvalds wrote:
> Another issue is likely that we should make the whole "uselib()"
> interfaces configurable. I don't think modern binaries use it (where
> "modern" probably means "compiled within the last 8 years" ;).
Here's an initial stab at such a patch. It adds a new config option,
CONFIG_SYS_USELIB. I wrote the patch against 2.6.10-bk14 but I tested it
against vanilla 2.6.10. Also, it only updates defconfig for i386, as
that's the only platform I can test at the moment.
There's probably plenty to criticize in this patch, but it's a start...
Signed-off-by: Barry K. Nathan <barryn@pobox.com>
diff -ruN linux-2.6.10-bk14/arch/i386/defconfig linux-2.6.10-bk14-bkn1/arch/i386/defconfig
--- linux-2.6.10-bk14/arch/i386/defconfig 2005-01-11 09:38:04.847566774 -0800
+++ linux-2.6.10-bk14-bkn1/arch/i386/defconfig 2005-01-11 11:15:02.127586567 -0800
@@ -195,6 +195,7 @@
#
# Executable file formats
#
+CONFIG_SYS_USELIB=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y
diff -ruN linux-2.6.10-bk14/fs/exec.c linux-2.6.10-bk14-bkn1/fs/exec.c
--- linux-2.6.10-bk14/fs/exec.c 2005-01-11 09:38:26.215892759 -0800
+++ linux-2.6.10-bk14-bkn1/fs/exec.c 2005-01-11 11:06:19.482007489 -0800
@@ -111,6 +111,7 @@
module_put(fmt->module);
}
+#ifdef CONFIG_SYS_USELIB
/*
* Note that a shared library must be both readable and executable due to
* security reasons.
@@ -167,6 +168,7 @@
path_release(&nd);
goto out;
}
+#endif
/*
* count() counts the number of strings in array ARGV.
diff -ruN linux-2.6.10-bk14/fs/Kconfig.binfmt linux-2.6.10-bk14-bkn1/fs/Kconfig.binfmt
--- linux-2.6.10-bk14/fs/Kconfig.binfmt 2005-01-11 09:38:25.702932946 -0800
+++ linux-2.6.10-bk14-bkn1/fs/Kconfig.binfmt 2005-01-11 11:09:16.873962890 -0800
@@ -1,3 +1,16 @@
+config SYS_USELIB
+ bool "sys_uselib syscall support (needed for old binaries)"
+ ---help---
+ Many old binaries (e.g. dynamically linked a.out binaries, and
+ ELF binaries that are dynamically linked against libc5), require
+ the sys_uselib syscall. However, on the typical Linux system, this
+ code is just old cruft that no longer serves a purpose.
+
+ If you are unsure, say "N" if you care more about security and
+ trimming bloat, or say "Y" if you care more about compatibility
+ with old software. (If you will answer "Y" or "M" to BINFMT_AOUT,
+ below, you probably should answer "Y" here.)
+
config BINFMT_ELF
bool "Kernel support for ELF binaries"
depends on MMU
diff -ruN linux-2.6.10-bk14/kernel/sys_ni.c linux-2.6.10-bk14-bkn1/kernel/sys_ni.c
--- linux-2.6.10-bk14/kernel/sys_ni.c 2004-12-14 03:18:07.379372435 -0800
+++ linux-2.6.10-bk14-bkn1/kernel/sys_ni.c 2005-01-11 13:25:38.670751478 -0800
@@ -76,6 +76,7 @@
cond_syscall(sys_keyctl)
cond_syscall(compat_sys_keyctl)
cond_syscall(compat_sys_socketcall)
+cond_syscall(sys_uselib)
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read)
next prev parent reply other threads:[~2005-01-11 22:57 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-07 15:59 uselib() & 2.6.X? Lukasz Trabinski
2005-01-07 17:07 ` Marcelo Tosatti
2005-01-07 20:27 ` linux-os
2005-01-07 22:29 ` Athanasius
2005-01-07 22:49 ` Alan Cox
2005-01-08 0:15 ` Linus Torvalds
2005-01-07 22:12 ` Marcelo Tosatti
2005-01-08 18:46 ` Linus Torvalds
2005-01-08 18:28 ` Marcelo Tosatti
2005-01-09 1:38 ` Linus Torvalds
2005-01-09 11:06 ` Marcelo Tosatti
2005-01-10 8:34 ` Frank Steiner
2005-01-10 16:51 ` Marcelo Tosatti
2005-01-10 18:28 ` Alan Cox
2005-01-11 7:49 ` Frank Steiner
2005-01-08 21:07 ` Andreas Schwab
2005-01-08 22:30 ` Barry K. Nathan
2005-01-08 23:21 ` Andi Kleen
2005-01-08 23:30 ` Alan Cox
2005-01-09 0:57 ` Andi Kleen
2005-01-09 0:49 ` Andries Brouwer
2005-01-09 2:21 ` Jesper Juhl
2005-01-09 2:17 ` Andries Brouwer
2005-01-08 21:47 ` Alan Cox
2005-01-11 22:51 ` Barry K. Nathan [this message]
2005-01-11 23:42 ` [PATCH] make uselib configurable (was Re: uselib() & 2.6.X?) Jesper Juhl
2005-01-11 23:59 ` Andries Brouwer
2005-01-12 1:06 ` Jesper Juhl
2005-01-12 1:18 ` David Lang
2005-01-11 22:36 ` Marcelo Tosatti
2005-01-12 2:32 ` Barry K. Nathan
2005-01-12 0:56 ` Marcelo Tosatti
2005-01-12 6:10 ` Barry K. Nathan
2005-01-12 16:47 ` Adrian Bunk
2005-01-12 17:10 ` Barry K. Nathan
2005-01-12 20:16 ` Matt Mackall
2005-01-12 2:12 ` Barry K. Nathan
2005-01-12 2:23 ` David Lang
2005-01-12 2:30 ` Adrian Bunk
2005-01-12 5:11 ` Stephen Pollei
2005-01-12 16:54 ` Adrian Bunk
2005-01-12 7:58 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050111225127.GD4378@ip68-4-98-123.oc.oc.cox.net \
--to=barryn@pobox.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz@wsisiz.edu.pl \
--cc=marcelo.tosatti@cyclades.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).