* [gentoo-commits] proj/sandbox:master commit in: libsandbox/, libsandbox/trace/linux/, src/, /, libsandbox/trace/
@ 2023-08-05 4:32 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-08-05 4:32 UTC (permalink / raw
To: gentoo-commits
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
);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-05 4:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-05 4:32 [gentoo-commits] proj/sandbox:master commit in: libsandbox/, libsandbox/trace/linux/, src/, /, libsandbox/trace/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox