linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: viro@parcelfarce.linux.theplanet.co.uk
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Roman Zippel <zippel@linux-m68k.org>,
	"David S. Miller" <davem@redhat.com>,
	Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] new system call mknod64
Date: Mon, 21 Apr 2003 19:54:24 +0100	[thread overview]
Message-ID: <20030421185424.GO10374@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0304211132130.3101-100000@home.transmeta.com>

On Mon, Apr 21, 2003 at 11:35:31AM -0700, Linus Torvalds wrote:
> 
> On Mon, 21 Apr 2003 viro@parcelfarce.linux.theplanet.co.uk wrote:
> > > I personally think that anything that uses "dev_t" in _any_ other way than 
> > > <major,minor> is fundamentally broken.
> > 
> > Do you consider internal use of MKDEV-produced constants broken?
> 
> Since they are always in canonical format, there is no way for them to 
> have the aliasing issue. However, even then they _should_ be careful, 
> since it would be very confusing (and bad) if they consider
> 
> 	0x00010100 	(major 1, minor 256)
> 
> to be fundamentally different from
> 
> 	0x01ff		(major 1, minor 255)
> 
> and cause problems that way.
> 
> In other words, if I'm a device driver, and I say that I want "range 
> 0-0xfff" for "major 2", then I had better get _all_ of it.

Sure.  However, note that right now there is only one driver that
wants a range bigger than 256 (and has to split it).  UNIX 98 ptys.
All other character devices ask for less than that.  Block devices
are not asking for large ranges at all (it's either "map that area
this way" or "here's the range of device numbers for partitions of
that disk").

IOW, the only case that might be tempting is devpts.  And there we
simply don't care whether it's current 128:0--128:255, 129:0--129:255, ...
or 128:0--2047.  These guys live on a virtual fs that doesn't get
exported over network.

For now I'd propose to wrap large ranges over the major boundary _and_
have devpts ask for single range.  That allows to clean pty.c now (and have
current behaviour preserved) and after the switch we get only one change -
all these guys migrate to major 128.  Which, AFAICS, is a Good Thing(tm).
Everything else stays with the numebrs that are used now.

Comments?

  reply	other threads:[~2003-04-21 18:42 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-20 21:26 [PATCH] new system call mknod64 Andries.Brouwer
2003-04-20 21:43 ` David S. Miller
2003-04-20 21:56   ` Linus Torvalds
2003-04-21 11:59     ` Roman Zippel
2003-04-21 18:01       ` Linus Torvalds
2003-04-21 18:10         ` Christoph Hellwig
2003-04-21 18:21           ` viro
2003-04-21 18:22           ` Linus Torvalds
2003-04-21 18:27             ` viro
2003-04-21 18:35               ` Linus Torvalds
2003-04-21 18:54                 ` viro [this message]
2003-04-21 19:16                   ` Jörn Engel
2003-04-21 18:35             ` Christoph Hellwig
2003-04-21 18:42               ` H. Peter Anvin
2003-04-21 18:44               ` Linus Torvalds
2003-04-21 18:47                 ` Christoph Hellwig
2003-04-21 18:58                   ` viro
2003-04-21 19:05                     ` Linus Torvalds
2003-04-21 19:35                       ` viro
2003-04-21 20:02                         ` Linus Torvalds
2003-04-21 19:04                   ` Linus Torvalds
2003-04-21 19:59                     ` H. Peter Anvin
2003-04-21 18:51                 ` H. Peter Anvin
2003-04-21 23:49             ` Roman Zippel
     [not found] <20030421215009$2052@gated-at.bofh.it>
     [not found] ` <20030421231010$7ee3@gated-at.bofh.it>
     [not found]   ` <20030422000016$17e3@gated-at.bofh.it>
     [not found]     ` <20030422083014$0fe2@gated-at.bofh.it>
2003-04-22 20:02       ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2003-04-22  1:02 Andries.Brouwer
2003-04-22  1:32 ` H. Peter Anvin
2003-04-22  2:01   ` Jamie Lokier
2003-04-22  2:52     ` H. Peter Anvin
2003-04-22  6:00       ` jw schultz
2003-04-22 17:17         ` H. Peter Anvin
2003-04-21 21:48 Andries.Brouwer
2003-04-21 22:07 ` Linus Torvalds
2003-04-21 21:43 Andries.Brouwer
2003-04-21 23:02 ` H. Peter Anvin
2003-04-21 23:50   ` Jamie Lokier
2003-04-22  8:24     ` Shachar Shemesh
2003-04-20 22:12 Andries.Brouwer
2003-04-21  6:31 ` H. Peter Anvin
2003-04-20 20:34 Andries.Brouwer
2003-04-20 21:12 ` David S. Miller
2003-04-20 18:39 Andries.Brouwer
2003-04-20 18:52 ` Christoph Hellwig

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=20030421185424.GO10374@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=davem@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=zippel@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).