Thread (48 messages) 48 messages, 10 authors, 2020-09-01

Re: [PATCH v1 1/4] [RFC] fs/trampfd: Implement the trampoline file descriptor API

From: Madhavan T. Venkataraman <hidden>
Date: 2020-07-28 14:58:57
Also in: linux-arm-kernel, linux-fsdevel, linux-integrity, linux-security-module, lkml

Thanks. See inline..

On 7/28/20 9:50 AM, Oleg Nesterov wrote:
On 07/28, madvenka@linux.microsoft.com wrote:
quoted
+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.
?
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help