diff options
author | Ed Maste <emaste@FreeBSD.org> | 2018-06-27 14:45:13 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2018-06-27 14:45:13 +0000 |
commit | e8a1ec3e059000c939e42cc3c22036fad0474ac5 (patch) | |
tree | ec097402d8c36501396fa1ae296a64ebc238bbce /sys/sys/syscallsubr.h | |
parent | d207040226887e74dec15733a1338c31c59f1b37 (diff) | |
download | src-e8a1ec3e059000c939e42cc3c22036fad0474ac5.tar.gz src-e8a1ec3e059000c939e42cc3c22036fad0474ac5.zip |
Split kern_break from sys_break and use it in linuxulator
Previously the linuxulator's linux_brk invoked the FreeBSD sys_break
syscall implementation directly. Instead, move the bulk of the existing
implementation to kern_break, and call that from both sys_break and
linux_brk.
This also addresses a minor bug in linux_brk in that we now return the
actual (rounded up) break address, rather than the requested value.
Reviewed by: brooks (earlier version)
Sponsored by: Turing Robotic Industries
Differential Revision: https://reviews.freebsd.org/D16019
Notes
Notes:
svn path=/head/; revision=335702
Diffstat (limited to 'sys/sys/syscallsubr.h')
-rw-r--r-- | sys/sys/syscallsubr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 33e16c1f7f0c..5ec4fa33f534 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -76,6 +76,7 @@ int kern_adjtime(struct thread *td, struct timeval *delta, int kern_alternate_path(struct thread *td, const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd); int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); +int kern_break(struct thread *td, uintptr_t *addr); int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds); int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); |