Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
This commit is contained in:
kamil 2017-12-19 18:34:47 +00:00
parent 7211c03683
commit 885229d011
15 changed files with 45 additions and 141 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_netbsd.c,v 1.209 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: netbsd32_netbsd.c,v 1.210 2017/12/19 18:34:47 kamil Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.209 2017/12/19 08:48:19 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.210 2017/12/19 18:34:47 kamil Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@ -700,18 +700,6 @@ netbsd32_chroot(struct lwp *l, const struct netbsd32_chroot_args *uap, register_
return (sys_chroot(l, &ua, retval));
}
int
netbsd32_sbrk(struct lwp *l, const struct netbsd32_sbrk_args *uap, register_t *retval)
{
/* {
syscallarg(int) incr;
} */
struct sys_sbrk_args ua;
NETBSD32TO64_UAP(incr);
return (sys_sbrk(l, &ua, retval));
}
int
netbsd32_munmap(struct lwp *l, const struct netbsd32_munmap_args *uap, register_t *retval)
{

View File

@ -1,10 +1,10 @@
/* $NetBSD: netbsd32_syscall.h,v 1.131 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: netbsd32_syscall.h,v 1.132 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.116 2017/12/19 07:58:50 kamil Exp
* created from NetBSD: syscalls.master,v 1.117 2017/12/19 08:48:19 kamil Exp
*/
#ifndef _NETBSD32_SYS_SYSCALL_H_
@ -213,9 +213,7 @@
/* 67 is obsolete vread */
/* 68 is obsolete vwrite */
/* syscall: "netbsd32_sbrk" ret: "int" args: "netbsd32_intptr_t" */
#define NETBSD32_SYS_netbsd32_sbrk 69
/* 69 is obsolete sbrk */
/* 70 is obsolete sstk */
/* syscall: "compat_43_netbsd32_ommap" ret: "int" args: "netbsd32_voidp" "netbsd32_size_t" "int" "int" "int" "netbsd32_long" */
#define NETBSD32_SYS_compat_43_netbsd32_ommap 71

View File

@ -1,10 +1,10 @@
/* $NetBSD: netbsd32_syscallargs.h,v 1.131 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: netbsd32_syscallargs.h,v 1.132 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.116 2017/12/19 07:58:50 kamil Exp
* created from NetBSD: syscalls.master,v 1.117 2017/12/19 08:48:19 kamil Exp
*/
#ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@ -375,11 +375,6 @@ struct compat_12_netbsd32_msync_args {
};
check_syscall_args(compat_12_netbsd32_msync)
struct netbsd32_sbrk_args {
syscallarg(netbsd32_intptr_t) incr;
};
check_syscall_args(netbsd32_sbrk)
struct compat_43_netbsd32_ommap_args {
syscallarg(netbsd32_voidp) addr;
syscallarg(netbsd32_size_t) len;
@ -2734,8 +2729,6 @@ int compat_12_netbsd32_msync(struct lwp *, const struct compat_12_netbsd32_msync
int sys_vfork(struct lwp *, const void *, register_t *);
int netbsd32_sbrk(struct lwp *, const struct netbsd32_sbrk_args *, register_t *);
int compat_43_netbsd32_ommap(struct lwp *, const struct compat_43_netbsd32_ommap_args *, register_t *);
int netbsd32_ovadvise(struct lwp *, const struct netbsd32_ovadvise_args *, register_t *);

View File

@ -1,14 +1,14 @@
/* $NetBSD: netbsd32_syscalls.c,v 1.129 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: netbsd32_syscalls.c,v 1.130 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.116 2017/12/19 07:58:50 kamil Exp
* created from NetBSD: syscalls.master,v 1.117 2017/12/19 08:48:19 kamil Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.129 2017/12/19 08:48:19 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.130 2017/12/19 18:34:47 kamil Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@ -97,7 +97,7 @@ const char *const netbsd32_syscallnames[] = {
/* 66 */ "vfork",
/* 67 */ "#67 (obsolete vread)",
/* 68 */ "#68 (obsolete vwrite)",
/* 69 */ "netbsd32_sbrk",
/* 69 */ "#69 (obsolete sbrk)",
/* 70 */ "#70 (obsolete sstk)",
/* 71 */ "compat_43_netbsd32_ommap",
/* 72 */ "vadvise",
@ -627,7 +627,7 @@ const char *const altnetbsd32_syscallnames[] = {
/* 66 */ NULL, /* vfork */
/* 67 */ NULL, /* obsolete vread */
/* 68 */ NULL, /* obsolete vwrite */
/* 69 */ "sbrk",
/* 69 */ NULL, /* obsolete sbrk */
/* 70 */ NULL, /* obsolete sstk */
/* 71 */ NULL, /* compat_43_netbsd32_ommap */
/* 72 */ "ovadvise",

View File

@ -1,14 +1,14 @@
/* $NetBSD: netbsd32_sysent.c,v 1.129 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: netbsd32_sysent.c,v 1.130 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.116 2017/12/19 07:58:50 kamil Exp
* created from NetBSD: syscalls.master,v 1.117 2017/12/19 08:48:19 kamil Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.129 2017/12/19 08:48:19 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.130 2017/12/19 18:34:47 kamil Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -381,9 +381,8 @@ struct sysent netbsd32_sysent[] = {
.sy_call = sys_nosys,
}, /* 68 = filler */
{
ns(struct netbsd32_sbrk_args),
.sy_call = (sy_call_t *)netbsd32_sbrk
}, /* 69 = netbsd32_sbrk */
.sy_call = sys_nosys,
}, /* 69 = filler */
{
.sy_call = sys_nosys,
}, /* 70 = filler */

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_systrace_args.c,v 1.21 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: netbsd32_systrace_args.c,v 1.22 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call argument to DTrace register array converstion.
@ -522,13 +522,6 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_
*n_args = 0;
break;
}
/* netbsd32_sbrk */
case 69: {
const struct netbsd32_sbrk_args *p = params;
iarg[0] = SCARG(p, incr); /* netbsd32_intptr_t */
*n_args = 1;
break;
}
/* netbsd32_ommap */
case 71: {
const struct compat_43_netbsd32_ommap_args *p = params;
@ -4266,16 +4259,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
/* sys_vfork */
case 66:
break;
/* netbsd32_sbrk */
case 69:
switch(ndx) {
case 0:
p = "netbsd32_intptr_t";
break;
default:
break;
};
break;
/* netbsd32_ommap */
case 71:
switch(ndx) {
@ -9647,11 +9630,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* sys_vfork */
case 66:
/* netbsd32_sbrk */
case 69:
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* netbsd32_ommap */
case 71:
if (ndx == 0 || ndx == 1)

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.117 2017/12/19 08:48:19 kamil Exp $
$NetBSD: syscalls.master,v 1.118 2017/12/19 18:34:47 kamil Exp $
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@ -174,7 +174,7 @@
66 NOARGS { int|sys||vfork(void); }
67 OBSOL vread
68 OBSOL vwrite
69 STD { int|netbsd32||sbrk(netbsd32_intptr_t incr); }
69 OBSOL sbrk
70 OBSOL sstk
71 COMPAT_43 { int|netbsd32||ommap(netbsd32_voidp addr, \
netbsd32_size_t len, int prot, int flags, int fd, \

View File

@ -1,14 +1,14 @@
/* $NetBSD: init_sysent.c,v 1.316 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: init_sysent.c,v 1.317 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.287 2017/12/08 01:19:29 christos Exp
* created from NetBSD: syscalls.master,v 1.288 2017/12/19 08:48:19 kamil Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.316 2017/12/19 08:48:19 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.317 2017/12/19 18:34:47 kamil Exp $");
#include "opt_modular.h"
#include "opt_ntp.h"
@ -422,9 +422,8 @@ struct sysent sysent[] = {
.sy_call = sys_nosys,
}, /* 68 = filler */
{
ns(struct sys_sbrk_args),
.sy_call = (sy_call_t *)sys_sbrk
}, /* 69 = sbrk */
.sy_call = sys_nosys,
}, /* 69 = filler */
{
.sy_call = sys_nosys,
}, /* 70 = filler */

View File

@ -1,14 +1,14 @@
/* $NetBSD: syscalls.c,v 1.307 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: syscalls.c,v 1.308 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.287 2017/12/08 01:19:29 christos Exp
* created from NetBSD: syscalls.master,v 1.288 2017/12/19 08:48:19 kamil Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.307 2017/12/19 08:48:19 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.308 2017/12/19 18:34:47 kamil Exp $");
#if defined(_KERNEL_OPT)
#include "opt_modular.h"
@ -96,7 +96,7 @@ const char *const syscallnames[] = {
/* 66 */ "vfork",
/* 67 */ "#67 (obsolete vread)",
/* 68 */ "#68 (obsolete vwrite)",
/* 69 */ "sbrk",
/* 69 */ "#69 (obsolete sbrk)",
/* 70 */ "#70 (obsolete sstk)",
/* 71 */ "compat_43_ommap",
/* 72 */ "vadvise",
@ -633,7 +633,7 @@ const char *const altsyscallnames[] = {
/* 66 */ NULL, /* vfork */
/* 67 */ NULL, /* obsolete vread */
/* 68 */ NULL, /* obsolete vwrite */
/* 69 */ NULL, /* sbrk */
/* 69 */ NULL, /* obsolete sbrk */
/* 70 */ NULL, /* obsolete sstk */
/* 71 */ NULL, /* compat_43_ommap */
/* 72 */ "ovadvise",

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.288 2017/12/19 08:48:19 kamil Exp $
$NetBSD: syscalls.master,v 1.289 2017/12/19 18:34:47 kamil Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@ -175,7 +175,7 @@
66 STD { int|sys||vfork(void); }
67 OBSOL vread
68 OBSOL vwrite
69 STD { int|sys||sbrk(intptr_t incr); }
69 OBSOL sbrk
70 OBSOL sstk
71 COMPAT_43 MODULAR compat \
{ int|sys||mmap(void *addr, size_t len, int prot, \

View File

@ -1,4 +1,4 @@
/* $NetBSD: systrace_args.c,v 1.26 2017/12/19 08:51:09 kamil Exp $ */
/* $NetBSD: systrace_args.c,v 1.27 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call argument to DTrace register array converstion.
@ -522,13 +522,6 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_
*n_args = 0;
break;
}
/* sys_sbrk */
case 69: {
const struct sys_sbrk_args *p = params;
iarg[0] = SCARG(p, incr); /* intptr_t */
*n_args = 1;
break;
}
/* sys_mmap */
case 71: {
const struct compat_43_sys_mmap_args *p = params;
@ -4480,16 +4473,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
/* sys_vfork */
case 66:
break;
/* sys_sbrk */
case 69:
switch(ndx) {
case 0:
p = "intptr_t";
break;
default:
break;
};
break;
/* sys_mmap */
case 71:
switch(ndx) {
@ -10214,11 +10197,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* sys_vfork */
case 66:
/* sys_sbrk */
case 69:
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* sys_mmap */
case 71:
if (ndx == 0 || ndx == 1)

View File

@ -1,10 +1,10 @@
/* $NetBSD: rump_syscalls.c,v 1.134 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: rump_syscalls.c,v 1.135 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call vector and marshalling for rump.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.287 2017/12/08 01:19:29 christos Exp
* created from NetBSD: syscalls.master,v 1.288 2017/12/19 08:48:19 kamil Exp
*/
#ifdef RUMP_CLIENT
@ -15,7 +15,7 @@
#ifdef __NetBSD__
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.134 2017/12/19 08:48:19 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.135 2017/12/19 18:34:47 kamil Exp $");
#include <sys/fstypes.h>
#include <sys/proc.h>
@ -6777,8 +6777,9 @@ struct sysent rump_sysent[] = {
.sy_call = (sy_call_t *)rumpns_enosys,
}, /* 68 = filler */
{
.sy_flags = SYCALL_NOSYS,
.sy_call = (sy_call_t *)rumpns_enosys,
}, /* 69 = sbrk */
}, /* 69 = filler */
{
.sy_flags = SYCALL_NOSYS,
.sy_call = (sy_call_t *)rumpns_enosys,

View File

@ -1,10 +1,10 @@
/* $NetBSD: syscall.h,v 1.301 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: syscall.h,v 1.302 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.287 2017/12/08 01:19:29 christos Exp
* created from NetBSD: syscalls.master,v 1.288 2017/12/19 08:48:19 kamil Exp
*/
#ifndef _SYS_SYSCALL_H_
@ -213,9 +213,7 @@
/* 67 is obsolete vread */
/* 68 is obsolete vwrite */
/* syscall: "sbrk" ret: "int" args: "intptr_t" */
#define SYS_sbrk 69
/* 69 is obsolete sbrk */
/* 70 is obsolete sstk */
/* syscall: "compat_43_ommap" ret: "int" args: "void *" "size_t" "int" "int" "int" "long" */
#define SYS_compat_43_ommap 71

View File

@ -1,10 +1,10 @@
/* $NetBSD: syscallargs.h,v 1.285 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: syscallargs.h,v 1.286 2017/12/19 18:34:47 kamil Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.287 2017/12/08 01:19:29 christos Exp
* created from NetBSD: syscalls.master,v 1.288 2017/12/19 08:48:19 kamil Exp
*/
#ifndef _SYS_SYSCALLARGS_H_
@ -427,13 +427,6 @@ struct compat_12_sys_msync_args {
check_syscall_args(compat_12_sys_msync)
#endif /* !RUMP_CLIENT */
#ifndef RUMP_CLIENT
struct sys_sbrk_args {
syscallarg(intptr_t) incr;
};
check_syscall_args(sys_sbrk)
#endif /* !RUMP_CLIENT */
#ifndef RUMP_CLIENT
struct compat_43_sys_mmap_args {
syscallarg(void *) addr;
@ -3291,8 +3284,6 @@ int compat_12_sys_msync(struct lwp *, const struct compat_12_sys_msync_args *, r
int sys_vfork(struct lwp *, const void *, register_t *);
int sys_sbrk(struct lwp *, const struct sys_sbrk_args *, register_t *);
int compat_43_sys_mmap(struct lwp *, const struct compat_43_sys_mmap_args *, register_t *);
int sys_ovadvise(struct lwp *, const struct sys_ovadvise_args *, register_t *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_mmap.c,v 1.168 2017/12/19 08:48:19 kamil Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.169 2017/12/19 18:34:47 kamil Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.168 2017/12/19 08:48:19 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.169 2017/12/19 18:34:47 kamil Exp $");
#include "opt_compat_netbsd.h"
#include "opt_pax.h"
@ -88,25 +88,6 @@ range_test(struct vm_map *map, vaddr_t addr, vsize_t size, bool ismmap)
return res;
}
/*
* unimplemented VM system calls:
*/
/*
* sys_sbrk: sbrk system call.
*/
/* ARGSUSED */
int
sys_sbrk(struct lwp *l, const struct sys_sbrk_args *uap, register_t *retval)
{
/* {
syscallarg(intptr_t) incr;
} */
return ENOSYS;
}
/*
* sys_mincore: determine if pages are in core or not.
*/