Thread (61 messages) 61 messages, 8 authors, 2025-09-03

Re: [PATCH v6 mm-new 04/10] bpf: mark vma->vm_mm as trusted

From: Yafang Shao <hidden>
Date: 2025-08-29 03:05:41
Also in: bpf, linux-mm

On Thu, Aug 28, 2025 at 7:11 PM Lorenzo Stoakes
[off-list ref] wrote:
On Thu, Aug 28, 2025 at 02:12:12PM +0800, Yafang Shao wrote:
quoted
On Wed, Aug 27, 2025 at 11:46 PM Lorenzo Stoakes
[off-list ref] wrote:
quoted
On Tue, Aug 26, 2025 at 03:19:42PM +0800, Yafang Shao wrote:
quoted
Every VMA must have an associated mm_struct, and it is safe to access
Err this isn't true? Pretty sure special VMAs don't have that set.
I’m not aware of any VMA that doesn’t belong to an mm_struct. If there
is such a case, it would be helpful if you could point it out. In any
case, I’ll remove the VMA-related code in the next version since it’s
unnecessary.
If you lok at get_vma_name() in fs/proc/task_mmu.c you'll see:

        if (!vma->vm_mm) {
                *name = "[vdso]";
                return;
        }

So a VDSO will have this condition.

I did a quick drgn()/printk() test and didn't see any, but maybe my system - but
in any case this appears to be a valid situation that can arise, presumably
because it's a VMA somehow shared with multiple mm's or something truly god
awful like that :)
Thanks for clarifying that.

-- 
Regards
Yafang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help