From: Sam Ravnborg <sam@ravnborg.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>,
Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Size of sector_t in userspace [Was: fix 41 'make headers_check' warnings]
Date: Wed, 21 Jan 2009 12:34:43 +0100 [thread overview]
Message-ID: <20090121113443.GA1579@uranus.ravnborg.org> (raw)
In-Reply-To: <20090121082125.GW30821@kernel.dk>
On Wed, Jan 21, 2009 at 09:21:25AM +0100, Jens Axboe wrote:
> On Wed, Jan 21 2009, Sam Ravnborg wrote:
> > Hi Jens.
> >
> > In an attempt to fix some of the issues in our exported Headers jsr
> > encountered some strange stuff in types.h.
> >
> > types.h is exported to userspace where we do not have access to CONFIG_*
> > symbols.
> > Despite this we use CONFGI_LBD to decide the size of sector_t like this:
> >
> > #ifdef CONFIG_LBD
> > typedef u64 sector_t;
> > typedef u64 blkcnt_t;
> > #else
> > typedef unsigned long sector_t;
> > typedef unsigned long blkcnt_t;
> > #endif
> >
> > But as CONFIG_LBD is never defined in userspace sector_t is now 32
> > bit on 32 bit boxes and 64 bit on 64 bit boxes (in userspace).
> >
> > Is sector:t (and the companion blkcnt_t) really used by userspace?
> > If it is - what size is it expected to have?
>
> I don't think it's used by userspace, at least it cannot be used in
> userspace <-> kernelspace interactions, since the size isn't fixed.
Thanks Jens.
In that case I suggest we should make it private to the kernel.
We should not expose types from the kernel that is not used
in the kerenl.
Jaswinder - move it inside a ifdef __KERNEL__ / endif block.
Reference Jens' answer above and Cc: Jens on the patch.
Thanks,
Sam
next prev parent reply other threads:[~2009-01-21 11:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-18 10:10 [GIT PULL -tip] fix 41 'make headers_check' warnings Jaswinder Singh Rajput
2009-01-18 11:02 ` Ingo Molnar
2009-01-18 11:26 ` Jaswinder Singh Rajput
2009-01-18 12:26 ` Ingo Molnar
2009-01-18 12:57 ` Sam Ravnborg
2009-01-18 13:00 ` Sam Ravnborg
2009-01-18 17:29 ` Ingo Molnar
2009-01-21 0:58 ` Jaswinder Singh Rajput
2009-01-21 1:27 ` Jaswinder Singh Rajput
2009-01-21 5:53 ` Size of sector_t in userspace [Was: fix 41 'make headers_check' warnings] Sam Ravnborg
2009-01-21 8:21 ` Jens Axboe
2009-01-21 11:34 ` Sam Ravnborg [this message]
2009-01-18 22:39 ` [GIT PULL -tip] fix 41 'make headers_check' warnings Stephen Rothwell
2009-01-19 1:20 ` Sam Ravnborg
2009-01-18 22:50 ` Stephen Rothwell
2009-01-19 2:30 ` Jaswinder Singh Rajput
2009-01-19 3:53 ` Stephen Rothwell
2009-01-18 23:53 ` Stephen Rothwell
2009-01-19 2:31 ` Jaswinder Singh Rajput
2009-01-19 3:48 ` Stephen Rothwell
2009-01-19 5:16 ` Jaswinder Singh Rajput
2009-01-18 23:59 ` Stephen Rothwell
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=20090121113443.GA1579@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=jaswinder@kernel.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@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