From 78b59e550cc1c452728abf0c6ce24c1958ed716a Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Mon, 11 Mar 2019 20:26:09 +0200 Subject: [PATCH] kernel: remove stty/gtty syscalls --- kernel/os/sysent.c | 10 ++++------ kernel/syscall/ioctl.c | 15 --------------- usr/src/cmd/abi/appcert/etc/etc.alt.in | 2 +- usr/src/cmd/sgs/include/conv.h | 2 +- usr/src/cmd/sgs/libconv/common/corenote.c | 10 +++++----- usr/src/cmd/sgs/libconv/common/corenote.msg | 6 ++---- usr/src/cmd/truss/systable.c | 4 ++-- usr/src/lib/libproc/common/proc_names.c | 4 ++-- usr/src/uts/intel/os/name_to_sysnum | 2 -- 9 files changed, 17 insertions(+), 38 deletions(-) diff --git a/kernel/os/sysent.c b/kernel/os/sysent.c index efe21e5f65..f16a719c76 100644 --- a/kernel/os/sysent.c +++ b/kernel/os/sysent.c @@ -80,7 +80,6 @@ time_t gtime(); int getloadavg(int *, int); int rusagesys(int, void *, void *, void *, void *); int getpagesizes(int, size_t *, int); -int gtty(int, intptr_t); #if defined(__i386) || defined(__amd64) int hrtsys(struct hrtsysa *, rval_t *); #endif /* __i386 || __amd64 */ @@ -122,7 +121,6 @@ int sigtimedwait(sigset_t *, siginfo_t *, timespec_t *); int getsetcontext(int, void *); int fstatat(int, char *, struct stat *, int); int stime(time_t); -int stty(int, intptr_t); int syssync(); int sysacct(char *); clock_t times(struct tms *); @@ -437,8 +435,8 @@ struct sysent sysent[NSYSCALL] = /* 28 */ SYSENT_LOADABLE(), /* (was fstat) */ /* 29 */ SYSENT_CI("pause", pause, 0), /* 30 */ SYSENT_LOADABLE(), /* (was utime) */ - /* 31 */ SYSENT_CI("stty", stty, 2), - /* 32 */ SYSENT_CI("gtty", gtty, 2), + /* 31 */ SYSENT_LOADABLE(), + /* 32 */ SYSENT_LOADABLE(), /* 33 */ SYSENT_LOADABLE(), /* (was access) */ /* 34 */ SYSENT_CI("nice", nice, 1), /* 35 */ IF_LP64( @@ -800,8 +798,8 @@ struct sysent sysent32[NSYSCALL] = /* 28 */ SYSENT_LOADABLE32(), /* (was fstat) */ /* 29 */ SYSENT_CI("pause", pause, 0), /* 30 */ SYSENT_LOADABLE32(), /* (was utime) */ - /* 31 */ SYSENT_CI("stty", stty, 2), - /* 32 */ SYSENT_CI("gtty", gtty, 2), + /* 31 */ SYSENT_LOADABLE32(), + /* 32 */ SYSENT_LOADABLE32(), /* 33 */ SYSENT_LOADABLE32(), /* (was access) */ /* 34 */ SYSENT_CI("nice", nice, 1), /* 35 */ SYSENT_CI("statfs", statfs32, 4), diff --git a/kernel/syscall/ioctl.c b/kernel/syscall/ioctl.c index dfc804e26c..3e148ea9b3 100644 --- a/kernel/syscall/ioctl.c +++ b/kernel/syscall/ioctl.c @@ -159,18 +159,3 @@ ioctl(int fdes, int cmd, intptr_t arg) releasef(fdes); return (rv); } - -/* - * Old stty and gtty. (Still.) - */ -int -stty(int fdes, intptr_t arg) -{ - return (ioctl(fdes, TIOCSETP, arg)); -} - -int -gtty(int fdes, intptr_t arg) -{ - return (ioctl(fdes, TIOCGETP, arg)); -} diff --git a/usr/src/cmd/abi/appcert/etc/etc.alt.in b/usr/src/cmd/abi/appcert/etc/etc.alt.in index 022efc086f..8b77172c1c 100644 --- a/usr/src/cmd/abi/appcert/etc/etc.alt.in +++ b/usr/src/cmd/abi/appcert/etc/etc.alt.in @@ -40,7 +40,7 @@ # # ############################################################################### -ALT_USAGE:inadvertant_static_linking:static linking inadevertantly brings in private symbols:*:__getcontext|__sigaction|_bufsync|_cerror|_dgettext|_doprnt|_doscan|_ecvt|_fcvt|_findbuf|_findiop|_getsp|_memcmp|_memmove|_memset|_mutex_unlock|_psignal|_realbufend|_setbufend|_siguhandler|_smbuf|_thr_getspecific|_thr_keycreate|_thr_main|_thr_setspecific|_xflsbuf|gtty|stty: +ALT_USAGE:inadvertant_static_linking:static linking inadevertantly brings in private symbols:*:__getcontext|__sigaction|_bufsync|_cerror|_dgettext|_doprnt|_doscan|_ecvt|_fcvt|_findbuf|_findiop|_getsp|_memcmp|_memmove|_memset|_mutex_unlock|_psignal|_realbufend|_setbufend|_siguhandler|_smbuf|_thr_getspecific|_thr_keycreate|_thr_main|_thr_setspecific|_xflsbuf: ############################################################################### ALT_USAGE:getdomainname:possible getdomainname() replacements:libnsl.so.1:getdomainname: ############################################################################### diff --git a/usr/src/cmd/sgs/include/conv.h b/usr/src/cmd/sgs/include/conv.h index 9b093f2869..933a0c5b19 100644 --- a/usr/src/cmd/sgs/include/conv.h +++ b/usr/src/cmd/sgs/include/conv.h @@ -354,7 +354,7 @@ typedef union { } Conv_cnote_fltset_buf_t; /* conv_cnote_sysset() */ -#define CONV_CNOTE_SYSSET_BUFSIZE 3183 +#define CONV_CNOTE_SYSSET_BUFSIZE 3179 typedef union { Conv_inv_buf_t inv_buf; char buf[CONV_CNOTE_SYSSET_BUFSIZE]; diff --git a/usr/src/cmd/sgs/libconv/common/corenote.c b/usr/src/cmd/sgs/libconv/common/corenote.c index 9423d9cd5b..74d0779dbe 100644 --- a/usr/src/cmd/sgs/libconv/common/corenote.c +++ b/usr/src/cmd/sgs/libconv/common/corenote.c @@ -207,7 +207,7 @@ conv_cnote_syscall(Word sysnum, Conv_fmt_flags_t fmt_flags, MSG_SYS_STIME, MSG_SYS_PCSAMPLE, MSG_SYS_ALARM, MSG_SYS_FSTAT, MSG_SYS_PAUSE, MSG_SYS_30, - MSG_SYS_STTY, MSG_SYS_GTTY, + MSG_SYS_31, MSG_SYS_32, MSG_SYS_ACCESS, MSG_SYS_NICE, MSG_SYS_STATFS, MSG_SYS_SYNC, MSG_SYS_KILL, MSG_SYS_FSTATFS, @@ -1856,8 +1856,8 @@ conv_cnote_fltset(uint32_t *maskarr, int n_mask, MSG_SYS_FSTAT_ALT_SIZE /* 28 */ + \ MSG_SYS_PAUSE_ALT_SIZE /* 29 */ + \ MSG_SYS_30_SIZE /* 30 (unused) */ + \ - MSG_SYS_STTY_ALT_SIZE /* 31 */ + \ - MSG_SYS_GTTY_ALT_SIZE /* 32 */ + \ + MSG_SYS_31_SIZE /* 31 */ + \ + MSG_SYS_32_SIZE /* 32 */ + \ \ /* sysset_t[1] - System Calls [33 - 64] */ \ MSG_SYS_ACCESS_ALT_SIZE /* 33 */ + \ @@ -2176,8 +2176,8 @@ conv_cnote_sysset(uint32_t *maskarr, int n_mask, { 0x08000000, MSG_SYS_FSTAT_ALT }, { 0x10000000, MSG_SYS_PAUSE_ALT }, { 0x20000000, MSG_SYS_30 }, - { 0x40000000, MSG_SYS_STTY_ALT }, - { 0x80000000, MSG_SYS_GTTY_ALT }, + { 0x40000000, MSG_SYS_31 }, + { 0x80000000, MSG_SYS_32 }, { 0, 0 } }; static const Val_desc vda1[] = { /* System Calls [33 - 64] */ diff --git a/usr/src/cmd/sgs/libconv/common/corenote.msg b/usr/src/cmd/sgs/libconv/common/corenote.msg index 7ee745c625..190c2087bf 100644 --- a/usr/src/cmd/sgs/libconv/common/corenote.msg +++ b/usr/src/cmd/sgs/libconv/common/corenote.msg @@ -645,10 +645,8 @@ @ MSG_SYS_PAUSE "[ pause ]" # 29 @ MSG_SYS_PAUSE_ALT "pause" @ MSG_SYS_30 "30" # 30 (u) -@ MSG_SYS_STTY "[ stty ]" # 31 -@ MSG_SYS_STTY_ALT "stty" -@ MSG_SYS_GTTY "[ gtty ]" # 32 -@ MSG_SYS_GTTY_ALT "gtty" +@ MSG_SYS_31 "31" # 31 (u) +@ MSG_SYS_32 "32" # 32 (u) @ MSG_SYS_ACCESS "[ access ]" # 33 @ MSG_SYS_ACCESS_ALT "access" @ MSG_SYS_NICE "[ nice ]" # 34 diff --git a/usr/src/cmd/truss/systable.c b/usr/src/cmd/truss/systable.c index 20eefecc9b..c34a593ef3 100644 --- a/usr/src/cmd/truss/systable.c +++ b/usr/src/cmd/truss/systable.c @@ -250,8 +250,8 @@ const struct systable systable[] = { {"fstat", 2, DEC, NOV, DEC, HEX}, /* 28 */ {"pause", 0, DEC, NOV}, /* 29 */ { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX}, -{"stty", 2, DEC, NOV, DEC, DEC}, /* 31 */ -{"gtty", 2, DEC, NOV, DEC, DEC}, /* 32 */ +{ NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX}, +{ NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX}, {"access", 2, DEC, NOV, STG, ACC}, /* 33 */ {"nice", 1, DEC, NOV, DEC}, /* 34 */ {"statfs", 4, DEC, NOV, STG, HEX, DEC, DEC}, /* 35 */ diff --git a/usr/src/lib/libproc/common/proc_names.c b/usr/src/lib/libproc/common/proc_names.c index a8c9ee8034..0eef5d7b65 100644 --- a/usr/src/lib/libproc/common/proc_names.c +++ b/usr/src/lib/libproc/common/proc_names.c @@ -142,8 +142,8 @@ static const char *const systable[] = { "fstat", /* 28 */ "pause", /* 29 */ NULL, /* 30 */ - "stty", /* 31 */ - "gtty", /* 32 */ + NULL, /* 31 */ + NULL, /* 32 */ "access", /* 33 */ "nice", /* 34 */ "statfs", /* 35 */ diff --git a/usr/src/uts/intel/os/name_to_sysnum b/usr/src/uts/intel/os/name_to_sysnum index 2e173a06e4..e46826ad8c 100644 --- a/usr/src/uts/intel/os/name_to_sysnum +++ b/usr/src/uts/intel/os/name_to_sysnum @@ -27,8 +27,6 @@ pcsample 26 alarm 27 fstat 28 pause 29 -stty 31 -gtty 32 access 33 nice 34 statfs 35 -- 2.11.4.GIT