* [2.6 patch] unexport uts_sem
@ 2005-03-04 0:50 Adrian Bunk
2005-03-04 12:57 ` Alan Cox
0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2005-03-04 0:50 UTC (permalink / raw)
To: linux-kernel
I didn't find any possible modular usage in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.11-rc5-mm1-full/kernel/sys.c.old 2005-03-04 01:19:18.000000000 +0100
+++ linux-2.6.11-rc5-mm1-full/kernel/sys.c 2005-03-04 01:19:29.000000000 +0100
@@ -1382,8 +1382,6 @@
DECLARE_RWSEM(uts_sem);
-EXPORT_SYMBOL(uts_sem);
-
asmlinkage long sys_newuname(struct new_utsname __user * name)
{
int errno = 0;
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [2.6 patch] unexport uts_sem
2005-03-04 0:50 [2.6 patch] unexport uts_sem Adrian Bunk
@ 2005-03-04 12:57 ` Alan Cox
2005-03-04 13:28 ` Arjan van de Ven
0 siblings, 1 reply; 11+ messages in thread
From: Alan Cox @ 2005-03-04 12:57 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Linux Kernel Mailing List
On Gwe, 2005-03-04 at 00:50, Adrian Bunk wrote:
> I didn't find any possible modular usage in the kernel.
Sure ? This used to be exported for loadable modules that wanted to get
the system default hostname string and for emulation layers like xabi
(the SYS5 unix emulation lib)
Alan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [2.6 patch] unexport uts_sem
2005-03-04 12:57 ` Alan Cox
@ 2005-03-04 13:28 ` Arjan van de Ven
0 siblings, 0 replies; 11+ messages in thread
From: Arjan van de Ven @ 2005-03-04 13:28 UTC (permalink / raw)
To: Alan Cox; +Cc: Adrian Bunk, Linux Kernel Mailing List
On Fri, 2005-03-04 at 12:57 +0000, Alan Cox wrote:
> On Gwe, 2005-03-04 at 00:50, Adrian Bunk wrote:
> > I didn't find any possible modular usage in the kernel.
>
> Sure ? This used to be exported for loadable modules that wanted to get
> the system default hostname string and for emulation layers like xabi
> (the SYS5 unix emulation lib)
afaik the linux abi stuff never made the jump to 2.6, and is far from
likely to do so...
^ permalink raw reply [flat|nested] 11+ messages in thread
* [2.6 patch] unexport uts_sem
@ 2005-04-15 15:10 Adrian Bunk
0 siblings, 0 replies; 11+ messages in thread
From: Adrian Bunk @ 2005-04-15 15:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
I didn't find any possible modular usage in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 4 Mar 2005
--- linux-2.6.11-rc5-mm1-full/kernel/sys.c.old 2005-03-04 01:19:18.000000000 +0100
+++ linux-2.6.11-rc5-mm1-full/kernel/sys.c 2005-03-04 01:19:29.000000000 +0100
@@ -1382,8 +1382,6 @@
DECLARE_RWSEM(uts_sem);
-EXPORT_SYMBOL(uts_sem);
-
asmlinkage long sys_newuname(struct new_utsname __user * name)
{
int errno = 0;
^ permalink raw reply [flat|nested] 11+ messages in thread* [2.6 patch] unexport uts_sem
@ 2008-04-23 9:52 Adrian Bunk
2008-04-23 10:50 ` David Miller
0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2008-04-23 9:52 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-kernel
With the removal of the Solaris binary emulation the export of
uts_sem became unused.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
e15db7b262fd8c3d9000e7d5e7a2b1d720fba8de diff --git a/kernel/sys.c b/kernel/sys.c
index 6a0cc71..773d4a5 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1331,8 +1331,6 @@ EXPORT_SYMBOL(in_egroup_p);
DECLARE_RWSEM(uts_sem);
-EXPORT_SYMBOL(uts_sem);
-
asmlinkage long sys_newuname(struct new_utsname __user * name)
{
int errno = 0;
^ permalink raw reply related [flat|nested] 11+ messages in thread* [2.6 patch] unexport uts_sem
@ 2008-05-05 18:29 Adrian Bunk
2008-05-20 17:16 ` Frank Ch. Eigler
0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2008-05-05 18:29 UTC (permalink / raw)
To: linux-kernel; +Cc: David S. Miller, Andrew Morton
With the removal of the Solaris binary emulation the export of
uts_sem became unused.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: David S. Miller <davem@davemloft.net>
---
This patch has been sent on:
- 23 Apr 2008
e15db7b262fd8c3d9000e7d5e7a2b1d720fba8de diff --git a/kernel/sys.c b/kernel/sys.c
index 6a0cc71..773d4a5 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1331,8 +1331,6 @@ EXPORT_SYMBOL(in_egroup_p);
DECLARE_RWSEM(uts_sem);
-EXPORT_SYMBOL(uts_sem);
-
asmlinkage long sys_newuname(struct new_utsname __user * name)
{
int errno = 0;
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [2.6 patch] unexport uts_sem
2008-05-05 18:29 Adrian Bunk
@ 2008-05-20 17:16 ` Frank Ch. Eigler
2008-05-20 17:27 ` Christoph Hellwig
0 siblings, 1 reply; 11+ messages in thread
From: Frank Ch. Eigler @ 2008-05-20 17:16 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel, David S. Miller, Andrew Morton, systemtap
Adrian Bunk <bunk@kernel.org> writes:
> With the removal of the Solaris binary emulation the export of
> uts_sem became unused. [...]
>
> -EXPORT_SYMBOL(uts_sem);
Am I correct that this would makes it invalid for modules to call
utsname() (since the protective semaphore is now hidden)? Systemtap
has been using them in order to validate the modules it builds against
possible kernel vs. kernel-devel differences.
- FChE
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [2.6 patch] unexport uts_sem
2008-05-20 17:16 ` Frank Ch. Eigler
@ 2008-05-20 17:27 ` Christoph Hellwig
2008-05-20 18:38 ` Frank Ch. Eigler
0 siblings, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2008-05-20 17:27 UTC (permalink / raw)
To: Frank Ch. Eigler
Cc: Adrian Bunk, linux-kernel, David S. Miller, Andrew Morton,
systemtap
On Tue, May 20, 2008 at 01:16:19PM -0400, Frank Ch. Eigler wrote:
> Am I correct that this would makes it invalid for modules to call
> utsname() (since the protective semaphore is now hidden)?
Yesm they should never had done that anyway. The module support
does it's own version checking already.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [2.6 patch] unexport uts_sem
2008-05-20 17:27 ` Christoph Hellwig
@ 2008-05-20 18:38 ` Frank Ch. Eigler
2008-05-21 12:37 ` Christoph Hellwig
0 siblings, 1 reply; 11+ messages in thread
From: Frank Ch. Eigler @ 2008-05-20 18:38 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Adrian Bunk, linux-kernel, David S. Miller, Andrew Morton,
systemtap
Hi -
On Tue, May 20, 2008 at 01:27:30PM -0400, Christoph Hellwig wrote:
> > Am I correct that this would makes it invalid for modules to call
> > utsname() (since the protective semaphore is now hidden)?
>
> Yesm they should never had done that anyway. The module support
> does it's own version checking already.
Sorry, I misspoke - this check is intended not to cross-check
kernel-devel and the kernel itself, but the debuginfo or similar data
that is given to describe target of a systemtap script. I guess for
new enough kernels we'll just do that using buildid hash codes.
By the way, there do appear to be a few suspect in-tree users of
utsname() without uts_sem locking (usb/storage/usb.c, cifs/connect.c,
char/random.cc, fs/lockd/clntproc.c, ...). If these need to be fixed,
then wouldn't uts_sem need to come back exported?
- FChE
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [2.6 patch] unexport uts_sem
2008-05-20 18:38 ` Frank Ch. Eigler
@ 2008-05-21 12:37 ` Christoph Hellwig
0 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2008-05-21 12:37 UTC (permalink / raw)
To: Frank Ch. Eigler
Cc: Christoph Hellwig, Adrian Bunk, linux-kernel, David S. Miller,
Andrew Morton, systemtap, usb-storage, linux-cifs-client,
linux-nfs
On Tue, May 20, 2008 at 02:38:02PM -0400, Frank Ch. Eigler wrote:
> Sorry, I misspoke - this check is intended not to cross-check
> kernel-devel and the kernel itself, but the debuginfo or similar data
> that is given to describe target of a systemtap script. I guess for
> new enough kernels we'll just do that using buildid hash codes.
>
> By the way, there do appear to be a few suspect in-tree users of
> utsname() without uts_sem locking (usb/storage/usb.c
Just a debug printk. Note sure why this particular one needs to
print the version, but if it really wants to do it it should rather use
UTS_RELEASE.
> cifs/connect.c,
This one is quite fishy. Not sure what it needs the name for but the
kernel utsname is probably a bad choise. And yes, this one actually
is racy because the host name can change.
> char/random.c,
random.c is always built-in and utsname is called during the
single-threaded kernel initialization phase, so this is safe.
> fs/lockd/clntproc.c, ...).
Yes, this one is racy. Should probably be fixed by starting lockd
with CLONE_NEWUTS so that it never changed during it's lifetime.
It's probably not a good idea when it changes with outstanding lockd
request anyway.
> If these need to be fixed,
> then wouldn't uts_sem need to come back exported?
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-05-21 12:37 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-04 0:50 [2.6 patch] unexport uts_sem Adrian Bunk
2005-03-04 12:57 ` Alan Cox
2005-03-04 13:28 ` Arjan van de Ven
-- strict thread matches above, loose matches on Subject: below --
2005-04-15 15:10 Adrian Bunk
2008-04-23 9:52 Adrian Bunk
2008-04-23 10:50 ` David Miller
2008-05-05 18:29 Adrian Bunk
2008-05-20 17:16 ` Frank Ch. Eigler
2008-05-20 17:27 ` Christoph Hellwig
2008-05-20 18:38 ` Frank Ch. Eigler
2008-05-21 12:37 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.