svn commit: r335177 - in head/sys: compat/freebsd32 compat/linux i386/ibcs2 kern vm
Brooks Davis
brooks at FreeBSD.org
Thu Jun 14 21:27:27 UTC 2018
Author: brooks
Date: Thu Jun 14 21:27:25 2018
New Revision: 335177
URL: https://svnweb.freebsd.org/changeset/base/335177
Log:
Name the implementation of brk and sbrk sys_break().
The break() system call was renamed (several times) starting in v3
AT&T UNIX when C was invented and break was a language keyword. The
last vestage of a need for it to be called something else (eg obreak)
was removed in r225617 which consistantly prefixed all syscall
implementations.
Reviewed by: emaste, kib (older version)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15638
Modified:
head/sys/compat/freebsd32/syscalls.master
head/sys/compat/linux/linux_misc.c
head/sys/i386/ibcs2/syscalls.master
head/sys/kern/capabilities.conf
head/sys/kern/syscalls.master
head/sys/vm/vm_unix.c
Modified: head/sys/compat/freebsd32/syscalls.master
==============================================================================
--- head/sys/compat/freebsd32/syscalls.master Thu Jun 14 21:22:14 2018 (r335176)
+++ head/sys/compat/freebsd32/syscalls.master Thu Jun 14 21:27:25 2018 (r335177)
@@ -87,8 +87,7 @@
int mode, int dev); }
15 AUE_CHMOD NOPROTO { int chmod(char *path, int mode); }
16 AUE_CHOWN NOPROTO { int chown(char *path, int uid, int gid); }
-17 AUE_NULL NOPROTO { caddr_t obreak(char *nsize); } break \
- obreak_args int
+17 AUE_NULL NOPROTO { caddr_t break(char *nsize); }
18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \
struct statfs32 *buf, long bufsize, \
int mode); }
Modified: head/sys/compat/linux/linux_misc.c
==============================================================================
--- head/sys/compat/linux/linux_misc.c Thu Jun 14 21:22:14 2018 (r335176)
+++ head/sys/compat/linux/linux_misc.c Thu Jun 14 21:27:25 2018 (r335177)
@@ -231,7 +231,7 @@ linux_brk(struct thread *td, struct linux_brk_args *ar
{
struct vmspace *vm = td->td_proc->p_vmspace;
vm_offset_t new, old;
- struct obreak_args /* {
+ struct break_args /* {
char * nsize;
} */ tmp;
@@ -242,7 +242,7 @@ linux_brk(struct thread *td, struct linux_brk_args *ar
old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize);
new = (vm_offset_t)args->dsend;
tmp.nsize = (char *)new;
- if (((caddr_t)new > vm->vm_daddr) && !sys_obreak(td, &tmp))
+ if (((caddr_t)new > vm->vm_daddr) && !sys_break(td, &tmp))
td->td_retval[0] = (long)new;
else
td->td_retval[0] = (long)old;
Modified: head/sys/i386/ibcs2/syscalls.master
==============================================================================
--- head/sys/i386/ibcs2/syscalls.master Thu Jun 14 21:22:14 2018 (r335176)
+++ head/sys/i386/ibcs2/syscalls.master Thu Jun 14 21:27:25 2018 (r335177)
@@ -57,7 +57,7 @@
15 AUE_CHMOD STD { int ibcs2_chmod(char *path, int mode); }
16 AUE_CHOWN STD { int ibcs2_chown(char *path, int uid, \
int gid); }
-17 AUE_NULL NOPROTO { int obreak(caddr_t nsize); }
+17 AUE_NULL NOPROTO { caddr_t break(caddr_t nsize); }
18 AUE_STAT STD { int ibcs2_stat(char* path, \
struct ibcs2_stat *st); }
19 AUE_LSEEK STD { long ibcs2_lseek(int fd, long offset, \
Modified: head/sys/kern/capabilities.conf
==============================================================================
--- head/sys/kern/capabilities.conf Thu Jun 14 21:22:14 2018 (r335176)
+++ head/sys/kern/capabilities.conf Thu Jun 14 21:27:25 2018 (r335177)
@@ -438,7 +438,7 @@ oaio_write
##
## Allow simple VM operations on the current process.
##
-obreak
+break
##
## Allow AIO operations by file descriptor, subject to capability rights.
Modified: head/sys/kern/syscalls.master
==============================================================================
--- head/sys/kern/syscalls.master Thu Jun 14 21:22:14 2018 (r335176)
+++ head/sys/kern/syscalls.master Thu Jun 14 21:27:25 2018 (r335177)
@@ -118,8 +118,7 @@
15 AUE_CHMOD STD { int chmod(_In_z_ char *path, int mode); }
16 AUE_CHOWN STD { int chown(_In_z_ char *path, \
int uid, int gid); }
-17 AUE_NULL STD { caddr_t obreak(_In_ char *nsize); } break \
- obreak_args int
+17 AUE_NULL STD { caddr_t break(_In_ char *nsize); }
18 AUE_GETFSSTAT COMPAT4 { int getfsstat( \
_Out_writes_bytes_opt_(bufsize) \
struct ostatfs *buf, \
Modified: head/sys/vm/vm_unix.c
==============================================================================
--- head/sys/vm/vm_unix.c Thu Jun 14 21:22:14 2018 (r335176)
+++ head/sys/vm/vm_unix.c Thu Jun 14 21:27:25 2018 (r335177)
@@ -61,12 +61,12 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_map.h>
#ifndef _SYS_SYSPROTO_H_
-struct obreak_args {
+struct break_args {
char *nsize;
};
#endif
int
-sys_obreak(struct thread *td, struct obreak_args *uap)
+sys_break(struct thread *td, struct break_args *uap)
{
#if !defined(__aarch64__) && !defined(__riscv__)
struct vmspace *vm = td->td_proc->p_vmspace;
@@ -196,11 +196,8 @@ sys_obreak(struct thread *td, struct obreak_args *uap)
*
* XXX If the pages cannot be wired, no error is returned.
*/
- if ((map->flags & MAP_WIREFUTURE) == MAP_WIREFUTURE) {
- if (bootverbose)
- printf("obreak: MAP_WIREFUTURE set\n");
+ if ((map->flags & MAP_WIREFUTURE) == MAP_WIREFUTURE)
do_map_wirefuture = TRUE;
- }
} else if (new < old) {
rv = vm_map_delete(map, new, old);
if (rv != KERN_SUCCESS) {
More information about the svn-src-head
mailing list