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] [day] [month] [year] [list]
Message-Id: <20120216145934.5fd9772e.akpm@linux-foundation.org>
Date:	Thu, 16 Feb 2012 14:59:34 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	dave@....org
Cc:	"J. Bruce Fields" <bfields@...ldses.org>,
	Matthew Wilcox <matthew@....cx>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] locks: export device name

On Thu, 16 Feb 2012 23:37:11 +0100
Davidlohr Bueso <dave@....org> wrote:

> On Wed, 2012-02-15 at 12:39 -0800, Andrew Morton wrote:
> > On Wed, 15 Feb 2012 07:42:30 -0500
> > "J. Bruce Fields" <bfields@...ldses.org> wrote:
> > 
> > > > > Perhaps safest would be to replace /proc/locks by another interface and
> > > > > deprecate this one.
> > > > 
> > > > If exporting the name in the current /proc/locks file is out of the
> > > > question, then IMHO I don't think it would be worth adding a new
> > > > interface just for such a small change.
> > > 
> > > OK.
> > > 
> > > If you want to just change this over, I guess the thing to do would be
> > > to stick something in feature-removal-schedule.txt saying "we'll switch
> > > this in 2 years" (or however long you think before there are
> > > realistically no more lslk users left), then do it then.
> > > 
> > > Switching to a new api would be better as we could warn users of the old
> > > api then.  Maybe it'd be worth it if there was some other change we'd
> > > been wanting to make?   Can't think of anything off the top of my head.
> > > 
> > > We may be adding more lock types--will lslk and lslocks handle that
> > > gracefully?
> > 
> > Adding a whole new interface is pretty attractive.  It lets us get it
> > right this time.  In particular, something which is extensible given
> > certain simple rules.  As we've learned, the current /proc/locks didn't
> > get that right!
> 
> Ok, however I'm a bit confused on what you mean by extensible; since
> what we decide to export to userspace is pretty much permanent, how can
> we change (extend) it later? We'd pretty much be running into
> the /proc/locks situation now.

Mainly by avoiding the use of implicit identification via fixed
positions.  Look at /proc/stat and weep.

If we use a name:value format then we can add new fields later and
things work OK.  We add stuff to /proc/meminfo and /proc/vmstat all the
time.

Removing things is of course much harder.  The best fix is to avoid
adding things which we might ever have a reason for removing!  If we
have a field which we simply can no longer support and which we think
we must retain for back-compat reasons then we just have to find some
way to emulate it.  In extremis we could hardwire the value to "0" so
tools won't crash.

sysfs has a different convention: one-value-per-file.  That means
there's no need for the name part of name:value.  Extensibility means
"go add another sysfs file".

--
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