Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157043788
D18444.id51632.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D18444.id51632.diff
View Options
Index: sys/compat/freebsd32/syscalls.master
===================================================================
--- sys/compat/freebsd32/syscalls.master
+++ sys/compat/freebsd32/syscalls.master
@@ -388,7 +388,7 @@
uint32_t length1, uint32_t length2); }
202 AUE_SYSCTL STD { int freebsd32___sysctl(int *name, \
u_int namelen, void *old, \
- uint32_t *oldlenp, void *new, \
+ uint32_t *oldlenp, const void *new, \
uint32_t newlen); }
203 AUE_MLOCK NOPROTO { int mlock(const void *addr, \
size_t len); }
Index: sys/kern/kern_sysctl.c
===================================================================
--- sys/kern/kern_sysctl.c
+++ sys/kern/kern_sysctl.c
@@ -1772,7 +1772,7 @@
return (0);
if (req->newlen - req->newidx < l)
return (EINVAL);
- bcopy((char *)req->newptr + req->newidx, p, l);
+ bcopy((const char *)req->newptr + req->newidx, p, l);
req->newidx += l;
return (0);
}
@@ -1898,7 +1898,7 @@
return (EINVAL);
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
"sysctl_new_user()");
- error = copyin((char *)req->newptr + req->newidx, p, l);
+ error = copyin((const char *)req->newptr + req->newidx, p, l);
req->newidx += l;
return (error);
}
@@ -2126,8 +2126,8 @@
*/
int
userland_sysctl(struct thread *td, int *name, u_int namelen, void *old,
- size_t *oldlenp, int inkernel, void *new, size_t newlen, size_t *retval,
- int flags)
+ size_t *oldlenp, int inkernel, const void *new, size_t newlen,
+ size_t *retval, int flags)
{
int error = 0, memlocked;
struct sysctl_req req;
Index: sys/kern/syscalls.master
===================================================================
--- sys/kern/syscalls.master
+++ sys/kern/syscalls.master
@@ -1209,7 +1209,7 @@
u_int namelen,
_Out_writes_bytes_opt_(*oldlenp) void *old,
_Inout_opt_ size_t *oldlenp,
- _In_reads_bytes_opt_(newlen) void *new,
+ _In_reads_bytes_opt_(newlen) const void *new,
size_t newlen
);
} __sysctl sysctl_args int
Index: sys/sys/sysctl.h
===================================================================
--- sys/sys/sysctl.h
+++ sys/sys/sysctl.h
@@ -165,7 +165,7 @@
size_t oldlen;
size_t oldidx;
int (*oldfunc)(struct sysctl_req *, const void *, size_t);
- void *newptr;
+ const void *newptr;
size_t newlen;
size_t newidx;
int (*newfunc)(struct sysctl_req *, void *, size_t);
@@ -1083,7 +1083,7 @@
size_t *oldlenp, void *new, size_t newlen, size_t *retval,
int flags);
int userland_sysctl(struct thread *td, int *name, u_int namelen, void *old,
- size_t *oldlenp, int inkernel, void *new, size_t newlen,
+ size_t *oldlenp, int inkernel, const void *new, size_t newlen,
size_t *retval, int flags);
int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid,
int *nindx, struct sysctl_req *req);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 2:40 AM (14 h, 46 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33287550
Default Alt Text
D18444.id51632.diff (2 KB)
Attached To
Mode
D18444: const poison the `new` pointer of __sysctl.
Attached
Detach File
Event Timeline
Log In to Comment