Re: [PATCH bpf] lib/buildid: handle memfd_secret() files in build_id_parse()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.10.24 18:22, Shakeel Butt wrote:
On Thu, Oct 17, 2024 at 11:17:19AM GMT, David Hildenbrand wrote:
On 16.10.24 20:39, Shakeel Butt wrote:
Ccing couple more folks who are doing similar work (ASI, guest_memfd)

Folks, what is the generic way to check if a given mapping has folios
unmapped from kernel address space?


Can't we just lookup the mapping and refuse these folios that really
shouldn't be looked at?

See gup_fast_folio_allowed() where we refuse secretmem_mapping().

That is exactly what this patch is doing. See [1].

Hah! I should have looked at the full patch not just the discussion where I was CCed :)

The reason I asked
this question was because I see parallel efforts related to guest_memfd
and ASI are going to unmap folios from direct map. (Yosry already
explained ASI is a bit different). We want a more robust and future
proof solution.

There was a discussion a while ago about having the abstraction of inaccessible mappings.

See https://lore.kernel.org/all/c87a4ba0-b9c4-4044-b0c3-c1112601494f@xxxxxxxxxx/

It would be a more future-proof replacement of the secretmem checks.

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux