Re: [PATCH] sysctl: Allow /proc/sys without sys_sysctl
From: Andi Kleen
Date: Wed Jul 12 2006 - 09:30:29 EST
On Wednesday 12 July 2006 05:13, Eric W. Biederman wrote:
> Andi Kleen <ak@xxxxxxx> writes:
> > ebiederm@xxxxxxxxxxxx (Eric W. Biederman) writes:
> >> Since sys_sysctl is deprecated start allow it to be compiled out.
> >> This should catch any remaining user space code that cares,
> >
> > I tried this long ago, but found that glibc uses sysctl in each
> > program to get the kernel version. It probably handles ENOSYS,
> > but there might be slowdowns or subtle problems from it not knowing
> > the kernel version.
> >
> > So I think it's ok to remove the big sysctl, but at a very minimal
> > replacement that just handles (CTL_KERN, KERN_VERSION) is needed.
>
> If glibc is looking at kernel.osrelease it might make sense.
> If glibc is looking at kernel.version which is just the build number
> and date I can't imagine a correct usage.
It's KERN_VERSION
>From my /bin/ls:
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbfc8e1e0, 30, (nil), 0}) = 0
> If this usage is still common in glibc we can decide what to do
> when the warnings pop up.
printk for everything would annoy basically everybody. Not a good idea.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/