From: David Miller <davem@davemloft.net>
To: roland@redhat.com
Cc: akpm@linux-foundation.org, gerald.schaefer@de.ibm.com,
linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com,
heiko.carstens@de.ibm.com, torvalds@linux-foundation.org
Subject: Re: [BUG] binfmt_elf: get_user() called in vma_dump_size() after set_fs(KERNEL_DS)
Date: Fri, 06 Feb 2009 14:18:31 -0800 (PST) [thread overview]
Message-ID: <20090206.141831.248558063.davem@davemloft.net> (raw)
In-Reply-To: <20090206220717.AE750FC3AD@magilla.sf.frob.com>
From: Roland McGrath <roland@redhat.com>
Date: Fri, 6 Feb 2009 14:07:17 -0800 (PST)
> set_fs is quite cheap at least on most machines. So a pair of set_fs calls
> around that get_user call doesn't seem so bad. OTOH, on the machines where
> this actually matters at all (maybe just sparc, arm, s390?) it is
> presumably (much?) more costly. But it seems like the best solution, and
> certainly is straightforward.
On sparc set_fs() is just a privileged register write, so pretty cheap
and definitely less expensive than get_user_pages() :-)
next prev parent reply other threads:[~2009-02-06 22:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 17:10 Gerald Schaefer
2009-02-06 21:44 ` Andrew Morton
2009-02-06 21:57 ` Linus Torvalds
2009-02-06 22:07 ` Roland McGrath
2009-02-06 22:18 ` David Miller [this message]
2009-02-06 22:19 ` Linus Torvalds
2009-02-07 1:55 ` [PATCH] elf core dump: fix get_user use Roland McGrath
2009-02-07 1:55 ` [BUG] binfmt_elf: get_user() called in vma_dump_size() after set_fs(KERNEL_DS) Roland McGrath
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=20090206.141831.248558063.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@linux-foundation.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=schwidefsky@de.ibm.com \
--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
all inboxes | Powered by JetHome®