From: Christoph Hellwig <hch@infradead.org>
To: Ian Kent <raven@themaw.net>
Cc: Andrew Morton <akpm@osdl.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
autofs mailing list <autofs@linux.kernel.org>
Subject: Re: [PATCH] autofs4 - fix comms packet struct size
Date: Sun, 19 Feb 2006 14:15:18 +0000 [thread overview]
Message-ID: <20060219141517.GA7942@infradead.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0602192206440.24506@eagle.themaw.net>
On Sun, Feb 19, 2006 at 10:11:31PM +0800, Ian Kent wrote:
>
> Set userspace communication struct fields to fixed size.
>
> Signed-off-by: Ian Kent <raven@themaw.net>
>
> --- linux-2.6.16-rc3-mm1/include/linux/auto_fs4.h.fix-v5-packet-size 2006-02-17 19:15:49.000000000 +0800
> +++ linux-2.6.16-rc3-mm1/include/linux/auto_fs4.h 2006-02-17 19:12:09.000000000 +0800
> @@ -65,10 +65,10 @@ struct autofs_v5_packet {
> autofs_wqt_t wait_queue_token;
Hiding types in user visible structures behind typedefs is bad.
What type is behind this? If this is not an __u32 you have
a padding issue.
> __u32 dev;
> __u64 ino;
> - uid_t uid;
> - gid_t gid;
> - pid_t pid;
> - pid_t tgid;
> + __u64 uid;
> + __u64 gid;
> + __u64 pid;
> + __u64 tgid;
These should be 32bit values.
> int len;
this should become a fixed-size type aswell.
> char name[NAME_MAX+1];
> };
> --- linux-2.6.16-rc3-mm1/fs/autofs4/autofs_i.h.fix-v5-packet-size 2006-02-17 19:17:03.000000000 +0800
> +++ linux-2.6.16-rc3-mm1/fs/autofs4/autofs_i.h 2006-02-17 19:17:25.000000000 +0800
> @@ -79,10 +79,10 @@ struct autofs_wait_queue {
> char *name;
> u32 dev;
> u64 ino;
> - uid_t uid;
> - gid_t gid;
> - pid_t pid;
> - pid_t tgid;
> + u64 uid;
> + u64 gid;
> + u64 pid;
> + u64 tgid;
> /* This is for status reporting upon return */
> int status;
> atomic_t notified;
This is an in-kernel structure, isn't it? No need to use u64 here.
next prev parent reply other threads:[~2006-02-19 14:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-19 14:11 [PATCH] autofs4 - fix comms packet struct size Ian Kent
2006-02-19 14:15 ` Christoph Hellwig [this message]
2006-02-20 1:05 ` Ian Kent
2006-02-20 16:00 ` 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=20060219141517.GA7942@infradead.org \
--to=hch@infradead.org \
--cc=akpm@osdl.org \
--cc=autofs@linux.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raven@themaw.net \
/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).