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]
Message-ID: <CABi2SkVFpDK_Dugz68Vu4dZ+Jk5bhiEYDuPbNnGu8W9Nbw1m4g@mail.gmail.com>
Date: Tue, 16 Jul 2024 21:25:44 -0700
From: Jeff Xu <jeffxu@...omium.org>
To: Aruna Ramakrishna <aruna.ramakrishna@...cle.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, dave.hansen@...ux.intel.com, 
	tglx@...utronix.de, mingo@...nel.org, keith.lucas@...cle.com, 
	rick.p.edgecombe@...el.com, linux-mm@...ck.org, 
	Jorge Lucangeli Obes <jorgelo@...omium.org>, Jeff Xu <jeffxu@...gle.com>, 
	Kees Cook <keescook@...omium.org>, Stephen Röttger <sroettger@...gle.com>, 
	Jann Horn <jannh@...gle.com>
Subject: Re: [PATCH v6 0/5] x86/pkeys: update PKRU to enable pkey 0 before

Hi Aruna,

I added Rick who commented on the previous version of patch. I added
Kees/Jorge/Stephan/Yann,  they expressed interest in similar
functionality before. It would be best to keep them in future versions
of this patch.

I also add linux-mm for more reviews/feedback on signal handling path.

On Thu, Jun 27, 2024 at 2:17 PM Aruna Ramakrishna
<aruna.ramakrishna@...cle.com> wrote:
>
> v6 updates:
> - Rebased patchset to v6.10.0-rc5
> - Changed sig_prepare_pkru() back to enabling all pkeys, based on
> discussion with Jeff Xu
Thanks for taking the suggestion.

>
> As Jeff mentioned, I'm unsure if we need to retain the changes to the
> 32-bit functions. Maintainers - please advise.
>
It is possible to  reduce the size of change.
Not touching the ia32 or x32 code path also means less test in
multiple architectures and less risk of regression.
I will add comments in the specific  patch to clarify what I meant,
please give it a try to see if it makes sense.

-Jeff





-Jeff



> v5 updates:
> - No major changes, mostly a resend of v4 - except for updating the
>   commit description for patch 5/5
>
> v4 updates (based on review feedback from Thomas Gleixner):
> - Simplified update_pkru_in_sigframe()
> - Changed sigpkru to enable minimally required keys (init_pkru and
>   current
>   pkru)
> - Modified pkey_sighandler_tests.c to use kselfttest framework
> - Fixed commit descriptions
> - Fixed sigreturn use case (pointed out by Jeff Xu)
> - Added a new sigreturn test case
>
> v3 updates (based on review feedback from Ingo Molnar and Dave Hansen):
> - Split the original patch into 3:
>         - function interface changes
>         - helper functions
>         - functional change to write pkru on sigframe
> - Enabled all pkeys before XSAVE - i.e. wrpkru(0), rather than assuming
> that the alt sig stack is always protected by pkey 0.
> - Added a few test cases in pkey_sighandler_tests.c.
>
> I had some trouble adding these tests to
> tools/testing/selftests/mm/protection_keys.c, so they're in a separate
> file.
>
> Aruna Ramakrishna (4):
>   x86/pkeys: Add PKRU as a parameter in signal handling functions
>   x86/pkeys: Add helper functions to update PKRU on the sigframe
>   x86/pkeys: Update PKRU to enable all pkeys before XSAVE
>   x86/pkeys: Restore altstack before sigcontext
>
> Keith Lucas (1):
>   selftests/mm: Add new testcases for pkeys
>
>  arch/x86/include/asm/fpu/signal.h             |   2 +-
>  arch/x86/include/asm/sighandling.h            |  10 +-
>  arch/x86/kernel/fpu/signal.c                  |  27 +-
>  arch/x86/kernel/fpu/xstate.c                  |  13 +
>  arch/x86/kernel/fpu/xstate.h                  |   2 +
>  arch/x86/kernel/signal.c                      |  45 +-
>  arch/x86/kernel/signal_32.c                   |  12 +-
>  arch/x86/kernel/signal_64.c                   |  14 +-
>  tools/testing/selftests/mm/Makefile           |   2 +
>  tools/testing/selftests/mm/pkey-helpers.h     |  11 +-
>  .../selftests/mm/pkey_sighandler_tests.c      | 479 ++++++++++++++++++
>  tools/testing/selftests/mm/protection_keys.c  |  10 -
>  12 files changed, 583 insertions(+), 44 deletions(-)
>  create mode 100644 tools/testing/selftests/mm/pkey_sighandler_tests.c
>
>
> base-commit: f2661062f16b2de5d7b6a5c42a9a5c96326b8454
> prerequisite-patch-id: fc7cbe9ff3c554d556e2792f9ffaf29e6ad6ee21
> --
> 2.39.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ