mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kill access_ok() call from copy_siginfo_to_user() that we might as well avoid.
Date: Mon, 20 Dec 2004 16:18:15 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0412201617050.4112@ppc970.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0412210025100.3581@dragon.hygekrogen.localhost>



On Tue, 21 Dec 2004, Jesper Juhl wrote:
> 
> In kernel/signal.c::copy_siginfo_to_user() we are calling access_ok()  
> unconditionally. As I see it there's no need for this since we might as
> well just call copy_to_user() instead of __copy_to_user() later on and
> then only get the overhead of the access_ok() check (inside
> copy_to_user())

No, the "access_ok()" is to protect the other side too, ie all the 
"__put_user()" calls.

If you remove the access_ok(), you need to also change all the 
__put_user() calls to "put_user()". And then the end result will be much 
worse code than it is right now.

		Linus

  reply	other threads:[~2004-12-21  0:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-20 23:33 Jesper Juhl
2004-12-21  0:18 ` Linus Torvalds [this message]
2004-12-21  0:41   ` Jesper Juhl
     [not found]     ` <Pine.LNX.4.61.0412210145260.3581@dragon.hygekrogen.localhost>
2004-12-21  0:56       ` Linus Torvalds
2004-12-21  1:25         ` Jesper Juhl

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=Pine.LNX.4.58.0412201617050.4112@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=juhl-lkml@dif.dk \
    --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

all inboxes | Powered by JetHome®