svn commit: r357899 - in head/sys: kern sys

Kyle Evans kevans at FreeBSD.org
Fri Feb 14 02:22:09 UTC 2020


Author: kevans
Date: Fri Feb 14 02:22:08 2020
New Revision: 357899
URL: https://svnweb.freebsd.org/changeset/base/357899

Log:
  u_char -> vm_prot_t in a couple of places, NFC
  
  The latter is a typedef of the former; the typedef exists and these bits are
  representing vmprot values, so use the correct type.
  
  Submitted by:	sigsys at gmail.com
  MFC after:	3 days

Modified:
  head/sys/kern/kern_descrip.c
  head/sys/kern/sys_capability.c
  head/sys/sys/capsicum.h
  head/sys/sys/file.h

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Fri Feb 14 00:29:21 2020	(r357898)
+++ head/sys/kern/kern_descrip.c	Fri Feb 14 02:22:08 2020	(r357899)
@@ -2898,7 +2898,7 @@ fget(struct thread *td, int fd, cap_rights_t *rightsp,
 }
 
 int
-fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, u_char *maxprotp,
+fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp,
     struct file **fpp)
 {
 	int error;

Modified: head/sys/kern/sys_capability.c
==============================================================================
--- head/sys/kern/sys_capability.c	Fri Feb 14 00:29:21 2020	(r357898)
+++ head/sys/kern/sys_capability.c	Fri Feb 14 02:22:08 2020	(r357899)
@@ -193,10 +193,10 @@ cap_check_failed_notcapable(const cap_rights_t *havep,
 /*
  * Convert capability rights into VM access flags.
  */
-u_char
+vm_prot_t
 cap_rights_to_vmprot(const cap_rights_t *havep)
 {
-	u_char maxprot;
+	vm_prot_t maxprot;
 
 	maxprot = VM_PROT_NONE;
 	if (cap_rights_is_set(havep, CAP_MMAP_R))

Modified: head/sys/sys/capsicum.h
==============================================================================
--- head/sys/sys/capsicum.h	Fri Feb 14 00:29:21 2020	(r357898)
+++ head/sys/sys/capsicum.h	Fri Feb 14 02:22:08 2020	(r357899)
@@ -514,7 +514,7 @@ int	cap_check(const cap_rights_t *havep, const cap_rig
 /*
  * Convert capability rights into VM access flags.
  */
-u_char	cap_rights_to_vmprot(const cap_rights_t *havep);
+vm_prot_t	cap_rights_to_vmprot(const cap_rights_t *havep);
 
 /*
  * For the purposes of procstat(1) and similar tools, allow kern_descrip.c to

Modified: head/sys/sys/file.h
==============================================================================
--- head/sys/sys/file.h	Fri Feb 14 00:29:21 2020	(r357898)
+++ head/sys/sys/file.h	Fri Feb 14 02:22:08 2020	(r357899)
@@ -247,7 +247,7 @@ extern int maxfilesperproc;	/* per process limit on nu
 
 int fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp);
 int fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp,
-    u_char *maxprotp, struct file **fpp);
+    vm_prot_t *maxprotp, struct file **fpp);
 int fget_read(struct thread *td, int fd, cap_rights_t *rightsp,
     struct file **fpp);
 int fget_write(struct thread *td, int fd, cap_rights_t *rightsp,


More information about the svn-src-all mailing list