|
Message-ID: <dc41589a-647a-ba59-5376-abbf5d07c6e7@linux.microsoft.com> Date: Tue, 28 Jul 2020 09:58:52 -0500 From: "Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com> To: Oleg Nesterov <oleg@...hat.com> Cc: kernel-hardening@...ts.openwall.com, linux-api@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-fsdevel@...r.kernel.org, linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org, x86@...nel.org Subject: Re: [PATCH v1 1/4] [RFC] fs/trampfd: Implement the trampoline file descriptor API Thanks. See inline.. On 7/28/20 9:50 AM, Oleg Nesterov wrote: > On 07/28, madvenka@...ux.microsoft.com wrote: >> +bool is_trampfd_vma(struct vm_area_struct *vma) >> +{ >> + struct file *file = vma->vm_file; >> + >> + if (!file) >> + return false; >> + return !strcmp(file->f_path.dentry->d_name.name, trampfd_name); > Hmm, this looks obviously wrong or I am totally confused. A user can > create a file named "[trampfd]", mmap it, and fool trampfd_fault() ? > > Why not > > return file->f_op == trampfd_fops; This is definitely the correct check. I will fix it. > > ? > >> +EXPORT_SYMBOL_GPL(is_trampfd_vma); > why is it exported? This is in common code and is called by arch code. Should I not export it? I guess since the symbol is not used by any modules, I don't need to export it. Please confirm and I will fix this. Madhavan
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.