From: David Woodhouse <dwmw2@infradead.org>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Matthew Wilcox <matthew@wil.cx>,
Russell King <rmk@arm.linux.org.uk>,
torvalds@linux-foundation.org,
Andrew Morton <akpm@linux-foundation.org>,
drepper@redhat.com, paulus@samba.org, linux-arch@vger.kernel.org
Subject: Re: Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM
Date: Mon, 25 Jun 2007 13:34:33 +0100 [thread overview]
Message-ID: <1182774873.12109.83.camel@pmac.infradead.org> (raw)
In-Reply-To: <2fc3aacccf036072f1b959e7b9ec3629@kernel.crashing.org>
On Mon, 2007-06-25 at 14:04 +0200, Segher Boessenkool wrote:
> >> - Some architectures must align 64-bit integers into an aligned
> >> pair of registers. A slot may be wasted for padding.
> >> - S390 may not have a 64-bit integer in slots 5/6.
> >
> > Uhm, doesn't sys_sync_file_range2 break that?
> >
> > +asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int
> > flags,
> > + unsigned offset_hi, unsigned
> > offset_lo,
> > + unsigned nbytes_hi, unsigned
> > nbytes_lo)
>
> I don't see any 64-bit integers here.
Of course not. This is the routine which is called from 32-bit code.
The prototype in the 32-bit code is (int, unsigned, loff_t, loff_t).
> > Also, you might want to put something in the syscall file about signed
> > vs unsigned arguments and how they behave with 32-on-64 systems.
>
> "Both work / unsigned is better / use unsigned whenever
> possible" -- but that's true for all C coding. Wouldn't
> hurt to repeat it though :-)
Don't we need (int)(-1) to be represented as 0xFFFFFFFFFFFFFFFF in a
register in 64-bit code, while we only get 0xFFFFFFFF passed in from
userspace? Not that this explains why we're doing it even for
filedescriptors.
--
dwmw2
next prev parent reply other threads:[~2007-06-25 12:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-25 8:49 Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM David Woodhouse
2007-06-25 9:11 ` Andrew Morton
2007-06-25 9:48 ` David Woodhouse
2007-06-25 10:24 ` Matthew Wilcox
2007-06-25 10:35 ` Matthew Wilcox
2007-06-25 11:09 ` Russell King
2007-06-25 11:37 ` David Woodhouse
2007-06-25 11:47 ` Matthew Wilcox
2007-06-25 12:01 ` David Woodhouse
2007-06-25 12:04 ` Segher Boessenkool
2007-06-25 12:34 ` David Woodhouse [this message]
2007-06-25 13:10 ` Segher Boessenkool
2007-06-25 13:33 ` David Woodhouse
2007-06-27 13:34 ` Ralf Baechle
2007-06-27 12:23 ` Geert Uytterhoeven
2007-06-25 11:33 ` David Howells
2007-06-25 14:35 ` Kyle McMartin
2007-06-27 13:22 ` Ralf Baechle
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=1182774873.12109.83.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=paulus@samba.org \
--cc=rmk@arm.linux.org.uk \
--cc=segher@kernel.crashing.org \
--cc=torvalds@linux-foundation.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).