From: William Lee Irwin III <wli@holomorphy.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: force O_LARGEFILE in sys_swapon() and sys_swapoff()
Date: Sun, 4 Jul 2004 12:31:52 -0700 [thread overview]
Message-ID: <20040704193152.GN21066@holomorphy.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0407042010450.5234-100000@localhost.localdomain>
On Sat, 3 Jul 2004, William Lee Irwin III wrote:
>> For 32-bit, one quickly discovers that swapon() is not given an fd
>> already opened with O_LARGEFILE to act upon and the forcing of
>> O_LARGEFILE for 64-bit is irrelevant, as the system call's argument is
>> a path. So this patch manually forces it for swapon() and swapoff().
On Sun, Jul 04, 2004 at 08:21:25PM +0100, Hugh Dickins wrote:
> This one looks good, thanks. I'm not so sure of your more general
> patch to open, others know better on that.
> I doubt huge amounts of swap work at all well when used, but you're
> really concerned with commit at present: of course it was silly not
> to have used O_LARGEFILE here.
The story on the more general one is that it silently broke -EFBIG
returns for 32-bit emulation. Arnd posted a patch to consolidate 32-bit
open() emulation, which I followed up with a hoist of the O_LARGEFILE
check to there above filp_open(). The forcing of O_LARGEFILE is still
needed for other, non-open()-related situations, and I may need to
sweep 32-bit emulation for other syscalls. Of course, it's a lose-lose
situation, as 64-bit now can't do internal kernel filp_open() on files
larger than 64-bit unsafe 32-bit apps can. In short, a large headache.
-- wli
next prev parent reply other threads:[~2004-07-04 19:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-04 6:41 move O_LARGEFILE forcing to filp_open() William Lee Irwin III
2004-07-04 6:44 ` force O_LARGEFILE in sys_swapon() and sys_swapoff() William Lee Irwin III
2004-07-04 19:21 ` Hugh Dickins
2004-07-04 19:31 ` William Lee Irwin III [this message]
2004-07-04 12:22 ` move O_LARGEFILE forcing to filp_open() Arnd Bergmann
2004-07-04 16:15 ` William Lee Irwin III
2004-07-04 17:22 ` Arnd Bergmann
2004-07-04 17:27 ` William Lee Irwin III
2004-07-04 17:27 ` William Lee Irwin III
2004-07-04 17:38 ` William Lee Irwin III
2004-07-04 17:49 ` Arnd Bergmann
2004-07-04 17:52 ` William Lee Irwin III
2004-07-04 18:42 ` William Lee Irwin III
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=20040704193152.GN21066@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--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