From: Andrew Morton <akpm@digeo.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Samuel.Thibault@ens-lyon.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Permit big console scrolls
Date: Sun, 22 Jun 2003 03:04:48 -0700 [thread overview]
Message-ID: <20030622030448.7aa98dfd.akpm@digeo.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0306221146170.869-100000@vervain.sonytel.be>
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> On Sun, 22 Jun 2003, Andrew Morton wrote:
> > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > >
> > > > - if (get_user(lines, (char *)arg+1)) {
> > > ^^^^^
> > > > + if (get_user(lines, (s32 *)((char *)arg+4))) {
> > > ^^^^^
> > > > ret = -EFAULT;
> > > > } else {
> > > > scrollfront(lines);
> > >
> > > Why was the `arg+1' changed to `arg+4'? Do we really want to skip 12 bytes?
> >
> > It skips three bytes?
>
> Oops, you're right. But my first question remains: why skip 3 bytes?
Well we want to use a 32-bit quantity, not an 8-bit one. So Samuel aligned
that quantity 32 bits beyond the 8-bit ioctl `type' arg.
So I guess you'd do:
struct foo {
char type;
char pad[3];
s32 distance;
};
prev parent reply other threads:[~2003-06-22 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200306210621.h5L6LbUo011422@hera.kernel.org>
2003-06-22 9:04 ` [PATCH] Permit big console scrolls Geert Uytterhoeven
2003-06-22 9:36 ` Andrew Morton
2003-06-22 9:47 ` Geert Uytterhoeven
2003-06-22 10:04 ` Andrew Morton [this message]
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=20030622030448.7aa98dfd.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=Samuel.Thibault@ens-lyon.fr \
--cc=geert@linux-m68k.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