From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Subject: Re: [git pull] uaccess-related bits of vfs.git
Date: Sat, 13 May 2017 19:26:56 +0100 [thread overview]
Message-ID: <20170513182656.GA390@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170513180413.GZ390@ZenIV.linux.org.uk>
On Sat, May 13, 2017 at 07:04:13PM +0100, Al Viro wrote:
> My point is, this stuff needs looking at. Even this quick look in arch/x86
> has shown several fairly different classes of that stuff, probably needing
> different approaches. And that - on an architecture that had tons of TLC
> around signal delivery; I'm not saying that result is optimal (asm-goto sounds
> potentially useful there), but it had a lot of attention given to it...
BTW, even in arch/* they tend to nest. E.g. arch/alpha has 133 callers
total. Distribution by files:
35 arch/alpha/kernel/osf_sys.c
92 arch/alpha/kernel/signal.c
1 arch/alpha/kernel/traps.c
4 arch/alpha/lib/csum_partial_copy.c
1 arch/alpha/mm/fault.c
Distribution by functions:
1 osf_getdomainname() [1]
2 osf_sigstack()
2 get_tv32()
2 put_tv32()
4 get_it32()
4 put_it32()
2 osf_select()
18 osf_wait4() [2]
6 osf_sigaction()
34 restore_sigcontext()
1 do_sigreturn()
42 setup_sigcontext()
3 setup_frame()
6 setup_rt_frame()
1 dik_show_code() [3]
2 csum_partial_cfu_aligned()
2 csum_partial_cfu_src_aligned()
1 do_page_fault() [4]
[1] insane, BTW - should be strnlen() + copy_to_user(); should report -EFAULT
on failure, while we are at it.
[2] with fairly disgusting use of set_fs() in the mix.
[3] would break with get_user() - it's oopser fetching code to printk.
[4] this:
/* As of EV6, a load into $31/$f31 is a prefetch, and never faults
(or is suppressed by the PALcode). Support that for older CPUs
by ignoring such an instruction. */
if (cause == 0) {
unsigned int insn;
__get_user(insn, (unsigned int __user *)regs->pc);
if ((insn >> 21 & 0x1f) == 0x1f &&
/* ldq ldl ldt lds ldg ldf ldwu ldbu */
(1ul << (insn >> 26) & 0x30f00001400ul)) {
regs->pc += 4;
return;
}
}
next prev parent reply other threads:[~2017-05-13 18:26 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+55aFww=ZG0wPad3ELg+ibScr0eWuSxvhGLFaF+PO9kfkSkdw@mail.gmail.com>
2017-05-01 3:45 ` [git pull] uaccess-related bits of vfs.git Al Viro
2017-05-13 1:00 ` Linus Torvalds
2017-05-13 6:57 ` Al Viro
2017-05-13 12:05 ` Adam Borowski
2017-05-13 13:46 ` Brian Gerst
2017-05-13 13:46 ` Brian Gerst
2017-05-13 16:46 ` Al Viro
2017-05-13 16:15 ` Linus Torvalds
2017-05-13 16:17 ` Linus Torvalds
2017-05-13 17:00 ` Al Viro
2017-05-13 17:12 ` Al Viro
2017-05-13 17:18 ` Linus Torvalds
2017-05-13 18:04 ` Al Viro
2017-05-13 18:26 ` Al Viro [this message]
2017-05-13 19:11 ` Al Viro
2017-05-13 19:34 ` Al Viro
2017-05-13 19:00 ` Linus Torvalds
2017-05-13 19:17 ` Al Viro
2017-05-13 19:56 ` Al Viro
2017-05-13 20:08 ` Al Viro
2017-05-13 20:32 ` Geert Uytterhoeven
2017-05-13 20:32 ` Geert Uytterhoeven
2017-05-13 20:45 ` Al Viro
2017-05-13 20:37 ` Al Viro
2017-05-13 20:52 ` Linus Torvalds
2017-05-13 21:25 ` Al Viro
2017-05-14 18:13 ` Ingo Molnar
2017-05-14 18:57 ` Al Viro
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=20170513182656.GA390@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).