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, 11 Oct 2022 18:27:56 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     Martin Fernandez <martin.fernandez@...ypsium.com>
Cc:     linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
        platform-driver-x86@...r.kernel.org, linux-mm@...ck.org,
        kunit-dev@...glegroups.com, linux-kselftest@...r.kernel.org,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
        ardb@...nel.org, dvhart@...radead.org, andy@...radead.org,
        gregkh@...uxfoundation.org, rafael@...nel.org, rppt@...nel.org,
        akpm@...ux-foundation.org, daniel.gutson@...ypsium.com,
        hughsient@...il.com, alex.bazhaniuk@...ypsium.com,
        alison.schofield@...el.com, keescook@...omium.org
Subject: Re: [PATCH v9 2/9] mm/mmzone: Tag pg_data_t with crypto capabilities

On Tue, Oct 11, 2022 at 10:28:44AM -0300, Martin Fernandez wrote:
> On 10/7/22, Kirill A. Shutemov <kirill@...temov.name> wrote:
> > On Mon, Jul 04, 2022 at 10:58:26AM -0300, Martin Fernandez wrote:
> >> Add a new member in the pg_data_t struct to tell whether the node
> >> corresponding to that pg_data_t is able to do hardware memory
> >> encryption.
> >>
> >> This will be read from sysfs.
> >>
> >> Signed-off-by: Martin Fernandez <martin.fernandez@...ypsium.com>
> >> ---
> >>  include/linux/mmzone.h | 3 +++
> >>  mm/page_alloc.c        | 1 +
> >>  2 files changed, 4 insertions(+)
> >>
> >> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> >> index aab70355d64f..6fd4785f1d05 100644
> >> --- a/include/linux/mmzone.h
> >> +++ b/include/linux/mmzone.h
> >> @@ -883,6 +883,9 @@ typedef struct pglist_data {
> >>  	struct task_struct *kcompactd;
> >>  	bool proactive_compact_trigger;
> >>  #endif
> >> +
> >> +	bool crypto_capable;
> >> +
> >
> > There's already pgdat->flags. Any reason we cannot encode it there?
> 
> Not really a reason, I'll considerate when I send then next version. I
> tried to quickly find for references of what kind of flags does it
> have, I didn't find any. Do you suggest it should work?

Maybe. Or maybe introduce capabilities bitfield and make crypto as one of
them.

We consider to re-use the approach for other cases. Like if the memory in
the node is TDX-compatible (there's more requirements for it than just
encryption).

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ