lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 19 Mar 2024 10:58:03 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Alexander Potapenko <glider@...gle.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org, kasan-dev@...glegroups.com, tglx@...utronix.de, 
	x86@...nel.org, Dmitry Vyukov <dvyukov@...gle.com>, Marco Elver <elver@...gle.com>, 
	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Subject: Re: [PATCH v1 3/3] x86: call instrumentation hooks from copy_mc.c

On Tue, 19 Mar 2024 at 09:37, Alexander Potapenko <glider@...gle.com> wrote:
>
>         if (copy_mc_fragile_enabled) {
>                 __uaccess_begin();
> +               instrument_copy_to_user(dst, src, len);
>                 ret = copy_mc_fragile((__force void *)dst, src, len);
>                 __uaccess_end();

I'd actually prefer that instrument_copy_to_user() to be *outside* the
__uaccess_begin.

In fact, I'm a bit surprised that objtool didn't complain about it in that form.

__uaccess_begin() causes the CPU to accept kernel accesses to user
mode, and I don't think instrument_copy_to_user() has any business
actually touching user mode memory.

In fact it might be better to rename the function and change the prototype to

   instrument_src(src, len);

because you really can't sanely instrument the destination of a user
copy, but "instrument_src()" might be useful in other situations than
just user copies.

Hmm?

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ