lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <m1ejnsq789.fsf@ebiederm.dsl.xmission.com>
Date:	Wed, 14 Mar 2007 07:34:30 -0600
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Alexey Dobriyan <adobriyan@...il.com>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Adrian Bunk <bunk@...sta.de>,
	Alexander Viro <viro@....linux.org.uk>
Subject: Re: [PATCH 58/59] sysctl: Reimplement the sysctl proc support

Ingo Molnar <mingo@...e.hu> writes:

> * Alexey Dobriyan <adobriyan@...il.com> wrote:
>
>> On 3/14/07, Ingo Molnar <mingo@...e.hu> wrote:
>> > #define PROCNAME_PML    "sys/kernel/preempt_max_latency"
>> >
>> > static __init int latency_fs_init(void)
>> > {
>> >         struct proc_dir_entry *entry;
>> >
>> >         if (!(entry = create_proc_entry(PROCNAME_PML, 0644, NULL)))
>> >                 printk("latency_fs_init(): can't create %s\n",
>> >PROCNAME_PML);
>> >
>> > with your change that broke because beyond /proc/sys/ there are no 
>> > real proc entries anymore, there's no de->subdir directory for 
>> > xlate_proc_name() to find. While the latency tracer isnt upstream, 
>> > this change in semantics does not seem to be intended (the changelog 
>> > is certainly silent about it).
>> 
>> Use register_sysctl_table() for sysctls.
>
> yes - i just wanted to point out the incompatibility and subtle breakage 
> that this change caused. I'll now have to convert the current code over 
> to sysctl_table, which isnt that hard but not trivial either, and i 
> certainly could make use that time for other purposes.

Sorry, for the inconvenience.

However it has always been a bug for anything under /proc/sys to not
be a sysctl.   It's not subtle breakage but subtle enforcement of the
existing rules.

The fact that code that now tries to break the rules fails I see as an
unanticipated bonus, because it means someone won't have to  go back
through and fix it after the code has been merged.

As far as I can tell it was really only out of tree code that suffered
from the misconception that /proc/sys was for something other than
sysctls.  The only case I recall fixing in the kernel was the mount
point for binfmt_misc and that was just directories, and easy to
convert.

This is the second time someone with out of tree code has asked me
about it though.   It may be worth adding a test to create_proc_entry
that says "you silly person you need to use sysctls to create an entry
under /proc/sys"

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ