linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: David Laight <David.Laight@aculab.com>
Cc: Kees Cook <keescook@chromium.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-hardening@vger.kernel.org"
	<linux-hardening@vger.kernel.org>
Subject: Re: [PATCH] m68k: Implement "current_stack_pointer"
Date: Thu, 24 Feb 2022 10:16:45 +0100	[thread overview]
Message-ID: <CAMuHMdWtQ+B-01ZOwZNvgQ7pndNsP3V90_jHdR=RS4K7O3Vk9g@mail.gmail.com> (raw)
In-Reply-To: <d75f1259c3e64387a161ebcb0448d594@AcuMS.aculab.com>

On Thu, Feb 24, 2022 at 10:12 AM David Laight <David.Laight@aculab.com> wrote:
> From: Geert Uytterhoeven
> > Sent: 24 February 2022 08:59
> ...
> > > +register unsigned long current_stack_pointer __asm__("sp");
> >
> > I don't know what HARDENED_USERCOPY does, so I don't know if you need
> > "usp" (see rdusp()) or "sp"?
>
> HARDENED_USERCOPY significantly slows down some systems calls
> (especially things like sendmsg()) by trying to run-time verify
> that the kernel buffer doesn't overrun a stack frame or kmalloc()ed

Kernel stack frame of user stack frame?

> buffer.
>
> I've got measurable improvements by either using __copy_to/from_user()
> (which skips the tests) or user_access_begin() and __get_user().
>
> At the moment the code for reading a compat iovec[] is actually
> faster than that for a native one!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2022-02-24  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  6:04 [PATCH] m68k: Implement "current_stack_pointer" Kees Cook
2022-02-24  8:59 ` Geert Uytterhoeven
2022-02-24  9:12   ` David Laight
2022-02-24  9:16     ` Geert Uytterhoeven [this message]
2022-02-24  9:54       ` David Laight
2022-02-24  9:56         ` Geert Uytterhoeven
2022-02-25 17:37           ` Kees Cook

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='CAMuHMdWtQ+B-01ZOwZNvgQ7pndNsP3V90_jHdR=RS4K7O3Vk9g@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=David.Laight@aculab.com \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.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).