ima_mmap_file returning 0 to userspace as mmap result.

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

 



I just noticed that trinity was freaking out in places when mmap was
returning zero.  This surprised me, because I had the mmap_min_addr
sysctl set to 64k, so it wasn't a MAP_FIXED mapping that did it.

There's no mention of this return value in the man page, so I dug
into the kernel code, and it appears that we do..

sys_mmap
vm_mmap_pgoff
security_mmap_file
ima_file_mmap <- returns 0 if not PROT_EXEC

and then the 0 gets propagated up as a retval all the way to userspace.

It smells to me like we might be violating a standard or two here, and
instead of 0 ima should be returning -Esomething

thoughts?

	Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]