lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 9 Nov 2009 14:28:30 +0100
From:	Andi Kleen <>
To:	"Eric W. Biederman" <>
Cc:	Andi Kleen <>,
	Arjan van de Ven <>,
Subject: Re: [PATCH 22/23] sysctl arm: Remove binary sysctl support

On Mon, Nov 09, 2009 at 04:41:44AM -0800, Eric W. Biederman wrote:
> >> >> The glibc pthread code that uses sysctl has no problems if sys_sysctl
> >> >> is gone.  It both falls back to reading /proc/sys and it just controls
> >> >> an optimization and the code works with either result.  Been there,
> >> >> done that.
> >> >
> >> > /proc/sys is much slower than sysctl though. So you made program startup
> >> > slower.
> >> 
> >> Not much slower, but slower. I just measured it in a case that favors
> >> sysctl and the ration is about 5:2.  Or sysctl is about 2.5x faster.
> >> About 49usec for open/read/close on proc and 19usec for sysctl.
> >> In my emulation it is a bit slower than that.
> >
> > That's not good.
> Why?

Because it slows down a very common path.

> >
> > a) all
> > b) common ones used by glibc and perhaps a few others only
> > c) none
> >
> > I suspect most users would use (b), in fact (c) might be redundant
> > if (b) is cheap enough (which it should be)
> Next year I expect b == c.

Only if you ignore ABI compatibility.

> If you think we need something better additional patches to sysctl_binary.c
> are welcome.  Just add your custom fast path before the through the
> VFS.

I think sysctl_binary should be just stripped down for common sysctls
(at least with a CONFIG)

> > Hmm? There's plenty of glibc code that uses the binary sysctl.
> Where?  I grepped glibc today.  The only use in a recent glibc is
> in glibc-ports for the support of arm inb/outb.  The only other
> use in older glibc was checking to see if we ran on an SMP kernel.

That older glibc is widely deployed. And it won't go away next year.

> >> Ultimately what drives me most is that people are still accidentally
> >> adding binary sysctls, which no one uses or tests.  For a recent
> >> example see:
> >
> > Yes I agree new binary sysctls should just be deprecated right now.
> Good.  The only way to keep new ones from showing up is to that I know
> of is to move everything into an emulation layer.  I have done the heavy
> lifting there and everything is emulated using the exact same code.

I agree with that.

I just think you should have two flavours of emulation layer:
full and "common sysctls". This can be probably done with the same
code and some strategic ifdefs.

-- -- Speaking for myself only.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists