This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] arm: ioperm use /proc/sys not sysctl
- From: Phil Blundell <pb at reciva dot com>
- To: "Eric W. Biederman" <ebiederm at xmission dot com>
- Cc: libc-ports at sourceware dot org
- Date: Mon, 09 Nov 2009 13:05:20 +0000
- Subject: Re: [PATCH] arm: ioperm use /proc/sys not sysctl
- References: <m1zl6w44up.fsf@fess.ebiederm.org>
On Sun, 2009-11-08 at 21:58 -0800, Eric W. Biederman wrote:
> sysctl is essentially unmaintained bloat in the linux kernel
> and is scheduled for removal in a year or so, meanwhile the
> /proc/sys interface will remain and has always existed.
>
> So use /proc/sys instead of sysctl in the implementation
> of ioperm so it continues to work even when sysctl is not
> present in the kernel.
Thanks for the patch.
I think I would prefer to see the sysctl support retained, at least for
the time being. Reading files from /proc obviously relies on that
filesystem being mounted which is not necessarily the case at all times.
The sysctl interface is also faster, when it works, than reading
from /proc.
Aside from that, some specific comments about your patch:
- please format your code according to the GNU standards;
- please supply an appropriate changelog entry
- it seems unnecessary to memset() the whole of "buf" to zero. I think
just doing "buf[ret] = 0;" after the read() call would suffice.
Do you have a copyright assignment on file for glibc? This change is
maybe small enough to accept without but it is borderline and an
assignment would be better.
p.