Change type of the prot parameter for kern_vm_mmap() from vm_prot_t to int.
This makes the code to pass whole word of the mmap(2) syscall argument prot to the syscall helper kern_vm_mmap(), which can validate all bits. The change provides temporal fix for sys/vm/mmap_test mmap__bad_arguments, which was broken after r313352. PR: 216976 Reported and tested by: ngie Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
272a2acfef
commit
1c2ad3e962
@ -72,7 +72,7 @@ void kmem_init_zero_region(void);
|
||||
void kmeminit(void);
|
||||
|
||||
int kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size,
|
||||
vm_prot_t prot, int flags, int fd, off_t pos);
|
||||
int prot, int flags, int fd, off_t pos);
|
||||
int kern_vm_mprotect(struct thread *td, vm_offset_t addr, vm_size_t size,
|
||||
vm_prot_t prot);
|
||||
int kern_vm_msync(struct thread *td, vm_offset_t addr, vm_size_t size,
|
||||
|
@ -196,7 +196,7 @@ sys_mmap(struct thread *td, struct mmap_args *uap)
|
||||
|
||||
int
|
||||
kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size,
|
||||
vm_prot_t prot, int flags, int fd, off_t pos)
|
||||
int prot, int flags, int fd, off_t pos)
|
||||
{
|
||||
struct file *fp;
|
||||
vm_size_t pageoff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user