linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org, Vineet.Gupta1@synopsys.com,
	linux-kernel@vger.kernel.org,
	James Hogan <james.hogan@imgtec.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: new architectures, time_t __kernel_long_t
Date: Fri, 21 Dec 2012 04:57:31 +0000	[thread overview]
Message-ID: <20121221045731.GO4939@ZenIV.linux.org.uk> (raw)
In-Reply-To: <201211141218.02105.arnd@arndb.de>

On Wed, Nov 14, 2012 at 12:18:01PM +0000, Arnd Bergmann wrote:

> The other types that are used as 64 bit on x32 are ino_t, nlink_t,
> size_t, ssize_t, ptrdiff_t, and off_t.

*Kernel-side* we should not give a damn about the userland nlink_t, period.
Making it architecture-dependent had been a bad mistake that essentially
made nlink_t useless for the kernel.  That mistake had been fixed; please,
do not bring it back.  If some userland structure needs to include a field
encoding nlink_t values, please use an explicitly-sized type when refering
to it kernel-side.

The same should've been true for mode_t, but for historical reasons we
are using umode_t for just about everything and IMO we should kill the
last references to mode_t anywhere kernel-side (again, explicitly-sized
types for userland st_mode and friends on the last few architectures
still refering to mode_t there) and just rename umode_t to mode_t; I'm
sick and tired of playing whack-a-mole with code using (arch-dependent)
mode_t for kernel data.  And no, it's not always harmless - we had rather
ugly bugs based on that.

  parent reply	other threads:[~2012-12-21  4:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 12:18 new architectures, time_t __kernel_long_t Arnd Bergmann
2012-11-14 12:48 ` Geert Uytterhoeven
2012-11-14 16:26 ` H. Peter Anvin
2012-11-14 16:26   ` H. Peter Anvin
2012-11-15  9:14   ` Arnd Bergmann
2012-11-15  9:14     ` Arnd Bergmann
2012-11-15 13:59     ` H.J. Lu
2012-11-15 14:36       ` Arnd Bergmann
2012-11-15 14:42         ` H.J. Lu
2012-11-15 15:10         ` H. Peter Anvin
2012-12-21  4:57 ` Al Viro [this message]
2012-12-21  5:00   ` H. Peter Anvin
2012-12-21  5:02     ` Al Viro
2012-12-21  5:05       ` H. Peter Anvin
2012-12-21  5:19         ` Al Viro
2012-12-21  5:47           ` H. Peter Anvin

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=20121221045731.GO4939@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=arnd@arndb.de \
    --cc=hpa@zytor.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).