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] [day] [month] [year] [list]
Message-ID: <8828d51f-bbcf-4d08-b99f-a2cf64fe4b75@suse.cz>
Date: Mon, 8 Dec 2025 10:02:15 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: John Hubbard <jhubbard@...dia.com>,
 "Kalyazin, Nikita" <kalyazin@...zon.co.uk>,
 "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
 "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "kvmarm@...ts.linux.dev" <kvmarm@...ts.linux.dev>,
 "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
 "linux-mm@...ck.org" <linux-mm@...ck.org>,
 "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
 "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>
Cc: "pbonzini@...hat.com" <pbonzini@...hat.com>,
 "corbet@....net" <corbet@....net>, "maz@...nel.org" <maz@...nel.org>,
 "oupton@...nel.org" <oupton@...nel.org>,
 "joey.gouly@....com" <joey.gouly@....com>,
 "suzuki.poulose@....com" <suzuki.poulose@....com>,
 "yuzenghui@...wei.com" <yuzenghui@...wei.com>,
 "catalin.marinas@....com" <catalin.marinas@....com>,
 "will@...nel.org" <will@...nel.org>, "seanjc@...gle.com"
 <seanjc@...gle.com>, "tglx@...utronix.de" <tglx@...utronix.de>,
 "mingo@...hat.com" <mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>,
 "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
 "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
 "luto@...nel.org" <luto@...nel.org>,
 "peterz@...radead.org" <peterz@...radead.org>,
 "willy@...radead.org" <willy@...radead.org>,
 "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
 "david@...nel.org" <david@...nel.org>,
 "lorenzo.stoakes@...cle.com" <lorenzo.stoakes@...cle.com>,
 "Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>,
 "rppt@...nel.org" <rppt@...nel.org>, "surenb@...gle.com"
 <surenb@...gle.com>, "mhocko@...e.com" <mhocko@...e.com>,
 "ast@...nel.org" <ast@...nel.org>,
 "daniel@...earbox.net" <daniel@...earbox.net>,
 "andrii@...nel.org" <andrii@...nel.org>,
 "martin.lau@...ux.dev" <martin.lau@...ux.dev>,
 "eddyz87@...il.com" <eddyz87@...il.com>, "song@...nel.org"
 <song@...nel.org>, "yonghong.song@...ux.dev" <yonghong.song@...ux.dev>,
 "john.fastabend@...il.com" <john.fastabend@...il.com>,
 "kpsingh@...nel.org" <kpsingh@...nel.org>, "sdf@...ichev.me"
 <sdf@...ichev.me>, "haoluo@...gle.com" <haoluo@...gle.com>,
 "jolsa@...nel.org" <jolsa@...nel.org>, "jgg@...pe.ca" <jgg@...pe.ca>,
 "peterx@...hat.com" <peterx@...hat.com>, "jannh@...gle.com"
 <jannh@...gle.com>, "pfalcato@...e.de" <pfalcato@...e.de>,
 "shuah@...nel.org" <shuah@...nel.org>, "riel@...riel.com"
 <riel@...riel.com>, "baohua@...nel.org" <baohua@...nel.org>,
 "ryan.roberts@....com" <ryan.roberts@....com>,
 "jgross@...e.com" <jgross@...e.com>,
 "yu-cheng.yu@...el.com" <yu-cheng.yu@...el.com>,
 "kas@...nel.org" <kas@...nel.org>, "coxu@...hat.com" <coxu@...hat.com>,
 "kevin.brodsky@....com" <kevin.brodsky@....com>,
 "ackerleytng@...gle.com" <ackerleytng@...gle.com>,
 "maobibo@...ngson.cn" <maobibo@...ngson.cn>,
 "prsampat@....com" <prsampat@....com>,
 "mlevitsk@...hat.com" <mlevitsk@...hat.com>,
 "isaku.yamahata@...el.com" <isaku.yamahata@...el.com>,
 "jmattson@...gle.com" <jmattson@...gle.com>,
 "jthoughton@...gle.com" <jthoughton@...gle.com>,
 "linux-arm-kernel@...ts.infradead.org"
 <linux-arm-kernel@...ts.infradead.org>,
 "vannapurve@...gle.com" <vannapurve@...gle.com>,
 "jackmanb@...gle.com" <jackmanb@...gle.com>,
 "aneesh.kumar@...nel.org" <aneesh.kumar@...nel.org>,
 "patrick.roy@...ux.dev" <patrick.roy@...ux.dev>,
 "Thomson, Jack" <jackabt@...zon.co.uk>,
 "Itazuri, Takahiro" <itazur@...zon.co.uk>,
 "Manwaring, Derek" <derekmn@...zon.com>, "Cali, Marco"
 <xmarcalx@...zon.co.uk>
Subject: Re: [PATCH v8 03/13] mm: introduce AS_NO_DIRECT_MAP

On 12/5/25 19:35, John Hubbard wrote:
> On 12/5/25 8:58 AM, Kalyazin, Nikita wrote:
>> From: Patrick Roy <patrick.roy@...ux.dev>
>> 
>> Add AS_NO_DIRECT_MAP for mappings where direct map entries of folios are
>> set to not present. Currently, mappings that match this description are
>> secretmem mappings (memfd_secret()). Later, some guest_memfd
>> configurations will also fall into this category.
>> 
>> Reject this new type of mappings in all locations that currently reject
>> secretmem mappings, on the assumption that if secretmem mappings are
>> rejected somewhere, it is precisely because of an inability to deal with
>> folios without direct map entries, and then make memfd_secret() use
>> AS_NO_DIRECT_MAP on its address_space to drop its special
>> vma_is_secretmem()/secretmem_mapping() checks.
>> 
>> This drops a optimization in gup_fast_folio_allowed() where
>> secretmem_mapping() was only called if CONFIG_SECRETMEM=y. secretmem is
>> enabled by default since commit b758fe6df50d ("mm/secretmem: make it on
>> by default"), so the secretmem check did not actually end up elided in
>> most cases anymore anyway.
> 
> The above paragraph can be part (most) of a commit description for
> a separate patch for the gup aspects. Let's split it out that way,
> because it is a distinct change, and the diffs can stand alone
> from this patch here.

I assume the separated gup change will be ordered as the earlier one,
because keeping "check_secretmem" together with newly checking
mapping_no_direct_map() would be incorrect. Make sense.

> thanks,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ