From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1543570-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2EB4315800A for <garchives@archives.gentoo.org>; Sat, 5 Aug 2023 04:32:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4BD662BC01A; Sat, 5 Aug 2023 04:32:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2E64D2BC01A for <gentoo-commits@lists.gentoo.org>; Sat, 5 Aug 2023 04:32:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EB4F9340D8C for <gentoo-commits@lists.gentoo.org>; Sat, 5 Aug 2023 04:32:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21F53ECF for <gentoo-commits@lists.gentoo.org>; Sat, 5 Aug 2023 04:32:17 +0000 (UTC) From: "Sam James" <sam@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org> Message-ID: <1691209934.f342efa52fb54c55f009b694af1899e431300629.sam@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: libsandbox/, libsandbox/trace/linux/, src/, /, libsandbox/trace/ X-VCS-Repository: proj/sandbox X-VCS-Files: configure.ac libsandbox/local.mk libsandbox/trace/common.c libsandbox/trace/linux/i386.c libsandbox/trace/linux/s390.c libsandbox/trace/linux/sparc.c libsandbox/trace/linux/x86_64.c src/options.c X-VCS-Directories: libsandbox/ libsandbox/trace/linux/ src/ / libsandbox/trace/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f342efa52fb54c55f009b694af1899e431300629 X-VCS-Branch: master Date: Sat, 5 Aug 2023 04:32:17 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 29db1814-1797-4fb4-ad53-f337ee07af8f X-Archives-Hash: 84901db183db535e532ddd72153add87 commit: f342efa52fb54c55f009b694af1899e431300629 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Jul 21 14:57:05 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Aug 5 04:32:14 2023 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=f342efa5 Rename multiple personalities feature "schizo" isn't a particularly sensitive term, and it's not very clear what it means to non-native English speakers anyway. Name it after what the feature really does: multiple (Linux) personality support using ptrace. Signed-off-by: Sam James <sam <AT> gentoo.org> configure.ac | 50 ++++++++++++++++++++--------------------- libsandbox/local.mk | 8 +++---- libsandbox/trace/common.c | 2 +- libsandbox/trace/linux/i386.c | 2 +- libsandbox/trace/linux/s390.c | 6 ++--- libsandbox/trace/linux/sparc.c | 6 ++--- libsandbox/trace/linux/x86_64.c | 8 +++---- src/options.c | 6 ++--- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/configure.ac b/configure.ac index 5746702..e5e9722 100644 --- a/configure.ac +++ b/configure.ac @@ -48,12 +48,12 @@ AC_PREFIX_DEFAULT([/usr]) dnl multiple personality support (x86 & x86_64: multilib) AC_MSG_CHECKING([for multiple personalities]) -AC_ARG_ENABLE([schizo], - [AS_HELP_STRING([--enable-schizo],[Support multiple personalities])], - [],[enable_schizo="auto"]) -AC_MSG_RESULT([$enable_schizo]) -SB_SCHIZO_SETTINGS= -AC_DEFUN([SB_CHECK_SCHIZO],[dnl +AC_ARG_ENABLE([personalities], + [AS_HELP_STRING([--enable-personalities],[Support multiple Linux personalities using ptrace])], + [],[enable_personalities="auto"]) +AC_MSG_RESULT([$enable_personalities]) +SB_PERSONALITIES_SETTINGS= +AC_DEFUN([SB_CHECK_PERSONALITIES],[dnl AC_MSG_CHECKING([checking for $1/$2 compiler support]) ac_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $2" @@ -62,42 +62,42 @@ AC_DEFUN([SB_CHECK_SCHIZO],[dnl ], [ return 0 ], [ - enable_schizo=yes - AS_VAR_APPEND([SB_SCHIZO_SETTINGS], " $1:$2") - AS_VAR_APPEND([SB_SCHIZO_HEADERS], " libsandbox/trace_syscalls_$1.h") + enable_personalities=yes + AS_VAR_APPEND([SB_PERSONALITIES_SETTINGS], " $1:$2") + AS_VAR_APPEND([SB_PERSONALITIES_HEADERS], " libsandbox/trace_syscalls_$1.h") AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED([SB_SCHIZO_$1], 1, [Support for $1/$2 is available]) + AC_DEFINE_UNQUOTED([SB_PERSONALITIES_$1], 1, [Support for $1/$2 is available]) ], [ AC_MSG_RESULT([no]) ]) CFLAGS=$ac_save_CFLAGS ]) -if test "x$enable_schizo" != "xno" ; then - enable_schizo=no +if test "x$enable_personalities" != "xno" ; then + enable_personalities=no case $host in i686*linux*|\ x86_64*linux*) - SB_CHECK_SCHIZO([x86_64], [-m64]) - SB_CHECK_SCHIZO([x86], [-m32]) - SB_CHECK_SCHIZO([x32], [-mx32]) + SB_CHECK_PERSONALITIES([x86_64], [-m64]) + SB_CHECK_PERSONALITIES([x86], [-m32]) + SB_CHECK_PERSONALITIES([x32], [-mx32]) ;; s390*linux*) - SB_CHECK_SCHIZO([s390x], [-m64]) - SB_CHECK_SCHIZO([s390], [-m31]) + SB_CHECK_PERSONALITIES([s390x], [-m64]) + SB_CHECK_PERSONALITIES([s390], [-m31]) ;; sparc*linux*) - SB_CHECK_SCHIZO([sparc64], [-m64]) - SB_CHECK_SCHIZO([sparc], [-m32]) + SB_CHECK_PERSONALITIES([sparc64], [-m64]) + SB_CHECK_PERSONALITIES([sparc], [-m32]) ;; esac - SB_SCHIZO_SETTINGS=${SB_SCHIZO_SETTINGS# } - if test "x$enable_schizo" != "xno" ; then - AC_DEFINE_UNQUOTED([SB_SCHIZO], ["$SB_SCHIZO_SETTINGS"], [Enable multiple personalities support]) + SB_PERSONALITIES_SETTINGS=${SB_PERSONALITIES_SETTINGS# } + if test "x$enable_personalities" != "xno" ; then + AC_DEFINE_UNQUOTED([SB_PERSONALITIES], ["$SB_PERSONALITIES_SETTINGS"], [Enable multiple personalities support]) fi fi -AC_SUBST(SB_SCHIZO_SETTINGS) -AC_SUBST(SB_SCHIZO_HEADERS) -AM_CONDITIONAL([SB_SCHIZO], [test "x$enable_schizo" != "xno"]) +AC_SUBST(SB_PERSONALITIES_SETTINGS) +AC_SUBST(SB_PERSONALITIES_HEADERS) +AM_CONDITIONAL([SB_PERSONALITIES], [test "x$enable_personalities" != "xno"]) dnl this test fills up the stack and then triggers a segfault ... dnl but it's hard to wrap things without a stack, so let's ignore diff --git a/libsandbox/local.mk b/libsandbox/local.mk index 50bc54d..dd78a76 100644 --- a/libsandbox/local.mk +++ b/libsandbox/local.mk @@ -76,17 +76,17 @@ TRACE_MAKE_HEADER = \ $(SB_AWK) $(GEN_TRACE_SCRIPT) -v MODE=gen | \ $(COMPILE) -E -P -include $(top_srcdir)/headers.h - $$f | \ $(SB_AWK) $(GEN_TRACE_SCRIPT) -v syscall_prefix=$$t > $$header -%D%/trace_syscalls.h: $(SYMBOLS_FILE) $(GEN_TRACE_SCRIPT) $(SB_SCHIZO_HEADERS) +%D%/trace_syscalls.h: $(SYMBOLS_FILE) $(GEN_TRACE_SCRIPT) $(SB_PERSONALITIES_HEADERS) @$(MKDIR_P) %D% -if SB_SCHIZO +if SB_PERSONALITIES $(AM_V_GEN)touch $@ else $(AM_V_GEN)t= f= header=$@; $(TRACE_MAKE_HEADER) endif -$(SB_SCHIZO_HEADERS): $(SYMBOLS_FILE) $(GEN_TRACE_SCRIPT) +$(SB_PERSONALITIES_HEADERS): $(SYMBOLS_FILE) $(GEN_TRACE_SCRIPT) @$(MKDIR_P) %D% - $(AM_V_GEN)for pers in $(SB_SCHIZO_SETTINGS) ; do \ + $(AM_V_GEN)for pers in $(SB_PERSONALITIES_SETTINGS) ; do \ t=_$${pers%:*}; \ f=$${pers#*:}; \ header="%D%/trace_syscalls$${t}.h"; \ diff --git a/libsandbox/trace/common.c b/libsandbox/trace/common.c index f426887..767839a 100644 --- a/libsandbox/trace/common.c +++ b/libsandbox/trace/common.c @@ -7,7 +7,7 @@ static int trace_get_sysnum(void *vregs); static long trace_raw_ret(void *vregs); static unsigned long trace_arg(void *vregs, int num); -#ifndef SB_SCHIZO +#ifndef SB_PERSONALITIES static const struct syscall_entry syscall_table[] = { #define S(s) { SB_SYS_##s, SB_NR_##s, #s }, #include "trace_syscalls.h" diff --git a/libsandbox/trace/linux/i386.c b/libsandbox/trace/linux/i386.c index f9476aa..722efb4 100644 --- a/libsandbox/trace/linux/i386.c +++ b/libsandbox/trace/linux/i386.c @@ -8,7 +8,7 @@ static bool _trace_possible(const void *data) (ehdr->e_machine == EM_386); } -#ifdef SB_SCHIZO +#ifdef SB_PERSONALITIES static const struct syscall_entry syscall_table[] = { #define S(s) { SB_SYS_x86_##s, SB_NR_##s, #s }, #include "trace_syscalls_x86.h" diff --git a/libsandbox/trace/linux/s390.c b/libsandbox/trace/linux/s390.c index acbf894..2c7a9be 100644 --- a/libsandbox/trace/linux/s390.c +++ b/libsandbox/trace/linux/s390.c @@ -1,10 +1,10 @@ #undef _trace_possible #define _trace_possible _trace_possible -#ifdef SB_SCHIZO +#ifdef SB_PERSONALITIES static const struct syscall_entry syscall_table_32[] = { -#ifdef SB_SCHIZO_s390 +#ifdef SB_PERSONALITIES_s390 #define S(s) { SB_SYS_s390_##s, SB_NR_##s, #s }, #include "trace_syscalls_s390.h" #undef S @@ -12,7 +12,7 @@ static const struct syscall_entry syscall_table_32[] = { { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, }; static const struct syscall_entry syscall_table_64[] = { -#ifdef SB_SCHIZO_s390x +#ifdef SB_PERSONALITIES_s390x #define S(s) { SB_SYS_s390x_##s, SB_NR_##s, #s }, #include "trace_syscalls_s390x.h" #undef S diff --git a/libsandbox/trace/linux/sparc.c b/libsandbox/trace/linux/sparc.c index 36d737a..6050dc9 100644 --- a/libsandbox/trace/linux/sparc.c +++ b/libsandbox/trace/linux/sparc.c @@ -16,10 +16,10 @@ #undef _trace_possible #define _trace_possible _trace_possible -#ifdef SB_SCHIZO +#ifdef SB_PERSONALITIES static const struct syscall_entry syscall_table_32[] = { -#ifdef SB_SCHIZO_sparc +#ifdef SB_PERSONALITIES_sparc #define S(s) { SB_SYS_sparc_##s, SB_NR_##s, #s }, #include "trace_syscalls_sparc.h" #undef S @@ -27,7 +27,7 @@ static const struct syscall_entry syscall_table_32[] = { { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, }; static const struct syscall_entry syscall_table_64[] = { -#ifdef SB_SCHIZO_sparc64 +#ifdef SB_PERSONALITIES_sparc64 #define S(s) { SB_SYS_sparc64_##s, SB_NR_##s, #s }, #include "trace_syscalls_sparc64.h" #undef S diff --git a/libsandbox/trace/linux/x86_64.c b/libsandbox/trace/linux/x86_64.c index aff1edb..d01e00f 100644 --- a/libsandbox/trace/linux/x86_64.c +++ b/libsandbox/trace/linux/x86_64.c @@ -1,10 +1,10 @@ #undef _trace_possible #define _trace_possible _trace_possible -#ifdef SB_SCHIZO +#ifdef SB_PERSONALITIES static const struct syscall_entry syscall_table_32[] = { -#ifdef SB_SCHIZO_x86 +#ifdef SB_PERSONALITIES_x86 #define S(s) { SB_SYS_x86_##s, SB_NR_##s, #s }, #include "trace_syscalls_x86.h" #undef S @@ -12,7 +12,7 @@ static const struct syscall_entry syscall_table_32[] = { { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, }; static const struct syscall_entry syscall_table_64[] = { -#ifdef SB_SCHIZO_x86_64 +#ifdef SB_PERSONALITIES_x86_64 #define S(s) { SB_SYS_x86_64_##s, SB_NR_##s, #s }, #include "trace_syscalls_x86_64.h" #undef S @@ -20,7 +20,7 @@ static const struct syscall_entry syscall_table_64[] = { { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, }; static const struct syscall_entry syscall_table_x32[] = { -#ifdef SB_SCHIZO_x32 +#ifdef SB_PERSONALITIES_x32 #define S(s) { SB_SYS_x32_##s, SB_NR_##s, #s }, #include "trace_syscalls_x32.h" #undef S diff --git a/src/options.c b/src/options.c index 5332318..2105fdc 100644 --- a/src/options.c +++ b/src/options.c @@ -69,10 +69,10 @@ static void show_version(void) #else "next is OK! :D\n" #endif -#ifndef SB_SCHIZO -# define SB_SCHIZO "no" +#ifndef SB_PERSONALITIES +# define SB_PERSONALITIES "no" #endif - " schizo: " SB_SCHIZO "\n" + " personalities: " SB_PERSONALITIES "\n" "\nconfigured with these options:\n%s\n", sb_sonfigure_opts );