From: ebiederm@xmission.com (Eric W. Biederman)
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Latchesar Ionkov <lucho@ionkov.net>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: CTL_UNNUMBERED (Re: [PATCH] 9p: Don't use binary sysctl numbers.)
Date: Sat, 21 Jul 2007 16:36:03 -0600 [thread overview]
Message-ID: <m1odi5wfjg.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070721205709.GB5772@martell.zuzino.mipt.ru> (Alexey Dobriyan's message of "Sun, 22 Jul 2007 00:57:09 +0400")
Alexey Dobriyan <adobriyan@gmail.com> writes:
>
> That's separate patch but CTL_UNNUMBERED must die, because it's totally
> unneeded. If you don't want sysctl(2) interface just SKIP ->ctl_name
> initialization and save one line for something useful.
As for the 9p code it doesn't seem to need or want a real binary
interface. The 9p debug code picking of a semi-random number and not
patching it into sysctl.h like it should for a binary interface is
an implementation bug, and a maintenance problem.
Further it is a classic example of the silliness that goes on
when people actually try and add to the binary interface.
So not assigning a binary number very much looks like the right thing
to do for 9p.
I expect if the change had not happened in a mega patch to 9p that
seems to have changed everything the addition of a new user space
interface would more likely have been caught in a code review.
Now to the issue of using CTL_UNNUMBERED versus knowing that the magic
value is zero and we can just leave it uninitialized. I don't much
care but given how often people who are not actively watching this
mess up I tend to prefer the explicit value. It is a practical
question of how do we get the word out that we should not expand the
binary interface anymore.
The only really practical way I can see us doing better then we are
today is to have a separate tree that maps binary numbers into ascii
strings and so we remove the ctl_name field entirely from ctl_table.
That way people attempting to assign binary numbers using old
conventions will have code that doesn't even compile, and the
developers themselves are more likely to spot the problem.
Eric
next prev parent reply other threads:[~2007-07-21 22:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-21 18:53 [PATCH] 9p: Don't use binary sysctl numbers Eric W. Biederman
2007-07-21 20:57 ` CTL_UNNUMBERED (Re: [PATCH] 9p: Don't use binary sysctl numbers.) Alexey Dobriyan
2007-07-21 21:48 ` Andrew Morton
2007-07-21 22:36 ` Eric W. Biederman [this message]
2007-07-23 17:13 ` Eric Van Hensbergen
2007-07-23 18:05 ` Latchesar Ionkov
2007-07-23 18:09 ` Eric Van Hensbergen
2007-07-23 20:37 ` Eric W. Biederman
2007-07-23 20:28 ` Alexey Dobriyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1odi5wfjg.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.