From c80b19b26aae45c9d1af87adb20604481377ecf8 Mon Sep 17 00:00:00 2001 From: panchenbo Date: Mon, 7 Aug 2023 16:06:37 +0800 Subject: [PATCH] fix sw_64 support incomplete (cherry picked from commit a424ac35441a0901d582c2aa235e03747d5d061a) --- audit-Add-sw64-architecture.patch | 723 +++++++++++++++++++++++++++++- audit.spec | 7 +- 2 files changed, 708 insertions(+), 22 deletions(-) diff --git a/audit-Add-sw64-architecture.patch b/audit-Add-sw64-architecture.patch index 11f06a9..cc014f4 100644 --- a/audit-Add-sw64-architecture.patch +++ b/audit-Add-sw64-architecture.patch @@ -1,19 +1,25 @@ -From df547703bb90026dcff152e64bc55503ad26d815 Mon Sep 17 00:00:00 2001 -From: wuzx -Date: Fri, 18 Nov 2022 13:19:49 +0800 -Subject: [PATCH] Add sw64 architecture +From 3ae7272de0450074b60e263831cfc632c2da6bac Mon Sep 17 00:00:00 2001 +From: panchenbo +Date: Thu, 20 Jul 2023 14:24:11 +0800 +Subject: [PATCH] add sw_64 support -Add sw64 architecture in file bindings/swig/python/audit.py config.guess config.sub lib/libaudit.h src/libev/ev.c and tools/ausyscall/ausyscall.c to support sw64 architecture. - -Signed-off-by: wuzx --- - bindings/swig/python/audit.py | 1 + - config.guess | 8 ++++++++ - config.sub | 1 + - lib/libaudit.h | 1 + - src/libev/ev.c | 3 +++ - tools/ausyscall/ausyscall.c | 6 ++++++ - 6 files changed, 20 insertions(+) + bindings/swig/python/audit.py | 1 + + bindings/swig/python3/audit.py | 1 + + config.guess | 8 + + config.h.in | 3 + + config.sub | 1 + + configure.ac | 14 +- + lib/Makefile.am | 21 ++ + lib/libaudit.h | 1 + + lib/lookup_table.c | 16 ++ + lib/machinetab.h | 4 + + lib/sw_64_table.h | 475 +++++++++++++++++++++++++++++++++ + src/autrace.c | 4 +- + src/libev/ev.c | 5 +- + tools/ausyscall/ausyscall.c | 6 + + 14 files changed, 557 insertions(+), 3 deletions(-) + create mode 100644 lib/sw_64_table.h diff --git a/bindings/swig/python/audit.py b/bindings/swig/python/audit.py index 69631a7..14fa89b 100644 @@ -27,6 +33,18 @@ index 69631a7..14fa89b 100644 MACH_ARM = _audit.MACH_ARM MACH_AARCH64 = _audit.MACH_AARCH64 MACH_PPC64LE = _audit.MACH_PPC64LE +diff --git a/bindings/swig/python3/audit.py b/bindings/swig/python3/audit.py +index f2b9a8b..c7ff3d4 100644 +--- a/bindings/swig/python3/audit.py ++++ b/bindings/swig/python3/audit.py +@@ -609,6 +609,7 @@ MACH_S390 = _audit.MACH_S390 + MACH_ALPHA = _audit.MACH_ALPHA + MACH_ARM = _audit.MACH_ARM + MACH_AARCH64 = _audit.MACH_AARCH64 ++MACH_SW_64 = _audit.MACH_SW_64 + MACH_PPC64LE = _audit.MACH_PPC64LE + FAIL_IGNORE = _audit.FAIL_IGNORE + FAIL_LOG = _audit.FAIL_LOG diff --git a/config.guess b/config.guess index b33c9e8..69e3005 100755 --- a/config.guess @@ -46,6 +64,20 @@ index b33c9e8..69e3005 100755 alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; +diff --git a/config.h.in b/config.h.in +index 613a1fe..ff7f81d 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -203,6 +203,9 @@ + /* Define if you want to enable Arm eabi processor support. */ + #undef WITH_ARM + ++/* Define if you want to enable SW_64 processor support. */ ++#undef WITH_SW_64 ++ + /* Define to empty if `const' does not conform to ANSI C. */ + #undef const + diff --git a/config.sub b/config.sub index b51fb8c..76babe9 100755 --- a/config.sub @@ -58,22 +90,673 @@ index b51fb8c..76babe9 100755 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | alphapca5[67] | alpha64pca5[67] \ +diff --git a/configure.ac b/configure.ac +index f2f2950..53ffae2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -37,7 +37,7 @@ echo Configuring auditd $VERSION + + AC_CONFIG_MACRO_DIR([m4]) + AC_CANONICAL_TARGET +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([gnu subdir-objects]) + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + OLDLIBS="$LIBS" +@@ -363,6 +363,18 @@ fi + AM_CONDITIONAL(USE_AARCH64, test x$use_aarch64 = xyes) + AC_MSG_RESULT($use_aarch64) + ++withval="" ++AC_MSG_CHECKING(whether to include sw_64 processor support) ++AC_ARG_WITH(sw_64, ++AS_HELP_STRING([--with-sw_64],[enable Sw_64 processor support]), ++use_sw_64=$withval, ++use_sw_64=no) ++if test x$use_sw_64 != xno ; then ++ AC_DEFINE(WITH_SW_64,1,[Define if you want to enable Sw_64 processor support.]) ++fi ++AM_CONDITIONAL(USE_SW_64, test x$use_sw_64 = xyes) ++AC_MSG_RESULT($use_sw_64) ++ + withval="" + AC_MSG_CHECKING(whether to use apparmor) + AC_ARG_WITH(apparmor, +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 12e5861..8e82928 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -53,6 +53,9 @@ endif + if USE_AARCH64 + BUILT_SOURCES += aarch64_tables.h + endif ++if USE_SW_64 ++BUILT_SOURCES += sw_64_tables.h ++endif + noinst_PROGRAMS = gen_actiontabs_h gen_errtabs_h gen_fieldtabs_h \ + gen_flagtabs_h gen_fstypetabs_h gen_ftypetabs_h gen_i386_tables_h \ + gen_machinetabs_h gen_msg_typetabs_h \ +@@ -64,6 +67,9 @@ endif + if USE_AARCH64 + noinst_PROGRAMS += gen_aarch64_tables_h + endif ++if USE_SW_64 ++noinst_PROGRAMS += gen_sw_64_tables_h ++endif + gen_actiontabs_h_SOURCES = gen_tables.c gen_tables.h actiontab.h + gen_actiontabs_h_CFLAGS = '-DTABLE_H="actiontab.h"' + $(gen_actiontabs_h_OBJECTS): CC=$(CC_FOR_BUILD) +@@ -107,6 +113,21 @@ aarch64_tables.h: gen_aarch64_tables_h Makefile + ./gen_aarch64_tables_h --lowercase --i2s --s2i aarch64_syscall > $@ + endif + ++if USE_SW_64 ++gen_sw_64_tables_h_SOURCES = gen_tables.c gen_tables.h sw_64_table.h ++gen_sw_64_tables_h_CFLAGS = '-DTABLE_H="sw_64_table.h"' ++$(gen_sw_64_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_sw_64_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) ++$(gen_sw_64_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++$(gen_sw_64_tables_h_OBJECTS): LDFLAGS=$(LDFLAGS_FOR_BUILD) ++gen_sw_64_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_sw_64_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_sw_64_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++gen_sw_64_tables_h$(BUILD_EXEEXT): LDFLAGS=$(LDFLAGS_FOR_BUILD) ++sw_64_tables.h: gen_sw_64_tables_h Makefile ++ ./gen_sw_64_tables_h --lowercase --i2s --s2i sw_64_syscall > $@ ++endif ++ + gen_errtabs_h_SOURCES = gen_tables.c gen_tables.h errtab.h + gen_errtabs_h_CFLAGS = '-DTABLE_H="errtab.h"' + $(gen_errtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) diff --git a/lib/libaudit.h b/lib/libaudit.h -index 3a8e8c8..16af222 100644 +index 3a8e8c8..e09e6a7 100644 --- a/lib/libaudit.h +++ b/lib/libaudit.h @@ -561,6 +561,7 @@ typedef enum { MACH_S390X, MACH_S390, MACH_ALPHA, // Deprecated but has to stay -+ MACH_SW_64, // Deprecated but has to stay ++ MACH_SW_64, MACH_ARM, MACH_AARCH64, MACH_PPC64LE +diff --git a/lib/lookup_table.c b/lib/lookup_table.c +index 23678a4..2a2af3d 100644 +--- a/lib/lookup_table.c ++++ b/lib/lookup_table.c +@@ -41,6 +41,9 @@ + #ifdef WITH_AARCH64 + #include "aarch64_tables.h" + #endif ++#ifdef WITH_SW_64 ++#include "sw_64_tables.h" ++#endif + #include "i386_tables.h" + #include "ppc_tables.h" + #include "s390_tables.h" +@@ -76,6 +79,10 @@ static const struct int_transtab elftab[] = { + #ifdef WITH_AARCH64 + { MACH_AARCH64, AUDIT_ARCH_AARCH64}, + #endif ++#ifdef WITH_SW_64 ++#define CONFIG_ELF_MAGIC 0x9916 ++ { MACH_SW_64, AUDIT_ARCH_SW64}, ++#endif + }; + #define AUDIT_ELF_NAMES (sizeof(elftab)/sizeof(elftab[0])) + +@@ -133,6 +140,11 @@ int audit_name_to_syscall(const char *sc, int machine) + found = aarch64_syscall_s2i(sc, &res); + break; + #endif ++#ifdef WITH_SW_64 ++ case MACH_SW_64: ++ found = sw_64_syscall_s2i(sc, &res); ++ break; ++#endif + #endif + default: + return -1; +@@ -166,6 +178,10 @@ const char *audit_syscall_to_name(int sc, int machine) + #ifdef WITH_AARCH64 + case MACH_AARCH64: + return aarch64_syscall_i2s(sc); ++#endif ++#ifdef WITH_SW_64 ++ case MACH_SW_64: ++ return sw_64_syscall_i2s(sc); + #endif + } + #endif +diff --git a/lib/machinetab.h b/lib/machinetab.h +index 75e3ab9..65ca203 100644 +--- a/lib/machinetab.h ++++ b/lib/machinetab.h +@@ -30,6 +30,7 @@ _S(MACH_PPC64LE, "ppc64le") + _S(MACH_PPC, "ppc" ) + _S(MACH_S390X, "s390x" ) + _S(MACH_S390, "s390" ) ++ + #ifdef WITH_ARM + _S(MACH_ARM, "armeb" ) + _S(MACH_ARM, "arm" ) +@@ -42,3 +43,6 @@ _S(MACH_ARM, "armv7b") + #ifdef WITH_AARCH64 + _S(MACH_AARCH64, "aarch64" ) + #endif ++#ifdef WITH_SW_64 ++_S(MACH_SW_64, "sw_64" ) ++#endif +diff --git a/lib/sw_64_table.h b/lib/sw_64_table.h +new file mode 100644 +index 0000000..6935afc +--- /dev/null ++++ b/lib/sw_64_table.h +@@ -0,0 +1,475 @@ ++/* sw_64_table.h -- ++ * Copyright 2005-07,2010-12,2014,2016 Red Hat Inc., Durham, North Carolina. ++ * All Rights Reserved. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Authors: ++ * Steve Grubb ++ */ ++ ++_S(0, "osf_syscall") ++_S(1, "exit") ++_S(2, "fork") ++_S(3, "read") ++_S(4, "write") ++_S(5, "osf_old_open") ++_S(6, "close") ++_S(7, "osf_wait4") ++_S(8, "osf_old_creat") ++_S(9, "link") ++_S(10, "unlink") ++_S(11, "osf_execve") ++_S(12, "chdir") ++_S(13, "fchdir") ++_S(14, "mknod") ++_S(15, "chmod") ++_S(16, "chown") ++_S(17, "brk") ++_S(18, "osf_getfsstat") ++_S(19, "lseek") ++_S(20, "getxpid") ++_S(21, "osf_mount") ++_S(22, "umount") ++_S(23, "setuid") ++_S(24, "getxuid") ++_S(25, "exec_with_loader") ++_S(26, "ptrace") ++_S(27, "osf_nrecvmsg") ++_S(28, "osf_nsendmsg") ++_S(29, "osf_nrecvfrom") ++_S(30, "osf_naccept") ++_S(31, "osf_ngetpeername") ++_S(32, "osf_ngetsockname") ++_S(33, "access") ++_S(34, "osf_chflags") ++_S(35, "osf_fchflags") ++_S(36, "sync") ++_S(37, "kill") ++_S(38, "osf_old_stat") ++_S(39, "setpgid") ++_S(40, "osf_old_lstat") ++_S(41, "dup") ++_S(42, "pipe") ++_S(43, "osf_set_program_attributes") ++_S(44, "osf_profil") ++_S(45, "open") ++_S(46, "osf_old_sigaction") ++_S(47, "getxgid") ++_S(48, "osf_sigprocmask") ++_S(49, "osf_getlogin") ++_S(50, "osf_setlogin") ++_S(51, "acct") ++_S(52, "sigpending") ++ ++_S(54, "ioctl") ++_S(55, "osf_reboot") ++_S(56, "osf_revoke") ++_S(57, "symlink") ++_S(58, "readlink") ++_S(59, "execve") ++_S(60, "umask") ++_S(61, "chroot") ++_S(62, "osf_old_fstat") ++_S(63, "getpgrp") ++_S(64, "getpagesize") ++_S(65, "osf_mremap") ++_S(66, "vfork") ++_S(67, "stat") ++_S(68, "lstat") ++_S(69, "osf_sbrk") ++_S(70, "osf_sstk") ++_S(71, "mmap") ++_S(72, "osf_old_vadvise") ++_S(73, "munmap") ++_S(74, "mprotect") ++_S(75, "madvise") ++_S(76, "vhangup") ++_S(77, "osf_kmodcall") ++_S(78, "osf_mincore") ++_S(79, "getgroups") ++_S(80, "setgroups") ++_S(81, "osf_old_getpgrp") ++_S(82, "setpgrp") ++_S(83, "osf_setitimer") ++_S(84, "osf_old_wait") ++_S(85, "osf_table") ++_S(86, "osf_getitimer") ++_S(87, "gethostname") ++_S(88, "sethostname") ++_S(89, "getdtablesize") ++_S(90, "dup2") ++_S(91, "fstat") ++_S(92, "fcntl") ++_S(93, "osf_select") ++_S(94, "poll") ++_S(95, "fsync") ++_S(96, "setpriority") ++_S(97, "socket") ++_S(98, "connect") ++_S(99, "accept") ++_S(100, "getpriority") ++_S(101, "send") ++_S(102, "recv") ++_S(103, "sigreturn") ++_S(104, "bind") ++_S(105, "setsockopt") ++_S(106, "listen") ++_S(107, "osf_plock") ++_S(108, "osf_old_sigvec") ++_S(109, "osf_old_sigblock") ++_S(110, "osf_old_sigsetmask") ++_S(111, "sigsuspend") ++_S(112, "osf_sigstack") ++_S(113, "recvmsg") ++_S(114, "sendmsg") ++_S(115, "osf_old_vtrace") ++_S(116, "osf_gettimeofday") ++_S(117, "osf_getrusage") ++_S(118, "getsockopt") ++_S(119, "socketcall") ++_S(120, "readv") ++_S(121, "writev") ++_S(122, "osf_settimeofday") ++_S(123, "fchown") ++_S(124, "fchmod") ++_S(125, "recvfrom") ++_S(126, "setreuid") ++_S(127, "setregid") ++_S(128, "rename") ++_S(129, "truncate") ++_S(130, "ftruncate") ++_S(131, "flock") ++_S(132, "setgid") ++_S(133, "sendto") ++_S(134, "shutdown") ++_S(135, "socketpair") ++_S(136, "mkdir") ++_S(137, "rmdir") ++_S(138, "osf_utimes") ++_S(139, "osf_old_sigreturn") ++_S(140, "osf_adjtime") ++_S(141, "getpeername") ++_S(142, "osf_gethostid") ++_S(143, "osf_sethostid") ++_S(144, "getrlimit") ++_S(145, "setrlimit") ++_S(146, "osf_old_killpg") ++_S(147, "setsid") ++_S(148, "quotactl") ++_S(149, "osf_oldquota") ++_S(150, "getsockname") ++ ++_S(153, "osf_pid_block") ++_S(154, "osf_pid_unblock") ++ ++_S(156, "sigaction") ++_S(157, "osf_sigwaitprim") ++_S(158, "osf_nfssvc") ++_S(159, "osf_getdirentries") ++_S(160, "osf_statfs") ++_S(161, "osf_fstatfs") ++ ++_S(163, "osf_asynch_daemon") ++_S(164, "osf_getfh") ++_S(165, "osf_getdomainname") ++_S(166, "setdomainname") ++ ++_S(169, "osf_exportfs") ++_S(170, "bpf") ++_S(171, "userfaultfd") ++_S(172, "membarrier") ++_S(173, "mlock2") ++ ++_S(181, "osf_alt_plock") ++ ++_S(184, "osf_getmnt") ++ ++_S(187, "osf_alt_sigpending") ++_S(188, "osf_alt_setsid") ++ ++_S(199, "osf_swapon") ++_S(200, "msgctl") ++_S(201, "msgget") ++_S(202, "msgrcv") ++_S(203, "msgsnd") ++_S(204, "semctl") ++_S(205, "semget") ++_S(206, "semop") ++_S(207, "osf_utsname") ++_S(208, "lchown") ++_S(209, "osf_shmat") ++_S(210, "shmctl") ++_S(211, "shmdt") ++_S(212, "shmget") ++_S(213, "osf_mvalid") ++_S(214, "osf_getaddressconf") ++_S(215, "osf_msleep") ++_S(216, "osf_mwakeup") ++_S(217, "msync") ++_S(218, "osf_signal") ++_S(219, "osf_utc_gettime") ++_S(220, "osf_utc_adjtime") ++ ++_S(222, "osf_security") ++_S(223, "osf_kloadcall") ++ ++_S(233, "getpgid") ++_S(234, "getsid") ++_S(235, "sigaltstack") ++_S(236, "osf_waitid") ++_S(237, "osf_priocntlset") ++_S(238, "osf_sigsendset") ++_S(239, "osf_set_speculative") ++_S(240, "osf_msfs_syscall") ++_S(241, "osf_sysinfo") ++_S(242, "osf_uadmin") ++_S(243, "osf_fuser") ++_S(244, "osf_proplist_syscall") ++_S(245, "osf_ntp_adjtime") ++_S(246, "osf_ntp_gettime") ++_S(247, "osf_pathconf") ++_S(248, "osf_fpathconf") ++ ++_S(250, "osf_uswitch") ++_S(251, "osf_usleep_thread") ++_S(252, "osf_audcntl") ++_S(253, "osf_audgen") ++_S(254, "sysfs") ++_S(255, "osf_subsys_info") ++_S(256, "osf_getsysinfo") ++_S(257, "osf_setsysinfo") ++_S(258, "osf_afs_syscall") ++_S(259, "osf_swapctl") ++_S(260, "osf_memcntl") ++_S(261, "osf_fdatasync") ++ ++_S(300, "bdflush") ++_S(301, "sethae") ++_S(302, "mount") ++_S(303, "old_adjtimex") ++_S(304, "swapoff") ++_S(305, "getdents") ++_S(306, "create_module") ++_S(307, "init_module") ++_S(308, "delete_module") ++_S(309, "get_kernel_syms") ++_S(310, "syslog") ++_S(311, "reboot") ++_S(312, "clone") ++_S(313, "uselib") ++_S(314, "mlock") ++_S(315, "munlock") ++_S(316, "mlockall") ++_S(317, "munlockall") ++_S(318, "sysinfo") ++_S(319, "_sysctl") ++/* 320 was sys_idle. */ ++_S(321, "oldumount") ++_S(322, "swapon") ++_S(323, "times") ++_S(324, "personality") ++_S(325, "setfsuid") ++_S(326, "setfsgid") ++_S(327, "ustat") ++_S(328, "statfs") ++_S(329, "fstatfs") ++_S(330, "sched_setparam") ++_S(331, "sched_getparam") ++_S(332, "sched_setscheduler") ++_S(333, "sched_getscheduler") ++_S(334, "sched_yield") ++_S(335, "sched_get_priority_max") ++_S(336, "sched_get_priority_min") ++_S(337, "sched_rr_get_interval") ++_S(338, "afs_syscall") ++_S(339, "uname") ++_S(340, "nanosleep") ++_S(341, "mremap") ++_S(342, "nfsservctl") ++_S(343, "setresuid") ++_S(344, "getresuid") ++_S(345, "pciconfig_read") ++_S(346, "pciconfig_write") ++_S(347, "query_module") ++_S(348, "prctl") ++_S(349, "pread") ++_S(350, "pwrite") ++_S(351, "rt_sigreturn") ++_S(352, "rt_sigaction") ++_S(353, "rt_sigprocmask") ++_S(354, "rt_sigpending") ++_S(355, "rt_sigtimedwait") ++_S(356, "rt_sigqueueinfo") ++_S(357, "rt_sigsuspend") ++_S(358, "select") ++_S(359, "gettimeofday") ++_S(360, "settimeofday") ++_S(361, "getitimer") ++_S(362, "setitimer") ++_S(363, "utimes") ++_S(364, "getrusage") ++_S(365, "wait4") ++_S(366, "adjtimex") ++_S(367, "getcwd") ++_S(368, "capget") ++_S(369, "capset") ++_S(370, "sendfile") ++_S(371, "setresgid") ++_S(372, "getresgid") ++_S(373, "dipc") ++_S(374, "pivot_root") ++_S(375, "mincore") ++_S(376, "pciconfig_iobase") ++_S(377, "getdents64") ++_S(378, "gettid") ++_S(379, "readahead") ++/* 380 is unused */ ++_S(381, "tkill") ++_S(382, "setxattr") ++_S(383, "lsetxattr") ++_S(384, "fsetxattr") ++_S(385, "getxattr") ++_S(386, "lgetxattr") ++_S(387, "fgetxattr") ++_S(388, "listxattr") ++_S(389, "llistxattr") ++_S(390, "flistxattr") ++_S(391, "removexattr") ++_S(392, "lremovexattr") ++_S(393, "fremovexattr") ++_S(394, "futex") ++_S(395, "sched_setaffinity") ++_S(396, "sched_getaffinity") ++_S(397, "tuxcall") ++_S(398, "io_setup") ++_S(399, "io_destroy") ++_S(400, "io_getevents") ++_S(401, "io_submit") ++_S(402, "io_cancel") ++_S(405, "exit_group") ++_S(406, "lookup_dcookie") ++_S(407, "epoll_create") ++_S(408, "epoll_ctl") ++_S(409, "epoll_wait") ++_S(410, "remap_file_pages") ++_S(411, "set_tid_address") ++_S(412, "restart_syscall") ++_S(413, "fadvise64") ++_S(414, "timer_create") ++_S(415, "timer_settime") ++_S(416, "timer_gettime") ++_S(417, "timer_getoverrun") ++_S(418, "timer_delete") ++_S(419, "clock_settime") ++_S(420, "clock_gettime") ++_S(421, "lock_getres") ++_S(422, "clock_nanosleep") ++_S(423, "semtimedop") ++_S(424, "tgkill") ++_S(425, "stat64") ++_S(426, "lstat64") ++_S(427, "fstat64") ++_S(428, "vserver") ++_S(429, "mbind") ++_S(430, "get_mempolicy") ++_S(431, "set_mempolicy") ++_S(432, "mq_open") ++_S(433, "mq_unlink") ++_S(434, "mq_timedsend") ++_S(435, "mq_timedreceive") ++_S(436, "mq_notify") ++_S(437, "mq_getsetattr") ++_S(438, "waitid") ++_S(439, "add_key") ++_S(440, "request_key") ++_S(441, "keyctl") ++_S(442, "ioprio_set") ++_S(443, "ioprio_get") ++_S(444, "inotify_init") ++_S(445, "inotify_add_watch") ++_S(446, "inotify_rm_watch") ++_S(447, "fdatasync") ++_S(448, "kexec_load") ++_S(449, "migrate_pages") ++_S(450, "openat") ++_S(451, "mkdirat") ++_S(452, "mknodat") ++_S(453, "fchownat") ++_S(454, "futimesat") ++_S(455, "fstatat64") ++_S(456, "unlinkat") ++_S(457, "renameat") ++_S(458, "linkat") ++_S(459, "symlinkat") ++_S(460, "readlinkat") ++_S(461, "fchmodat") ++_S(462, "faccessat") ++_S(463, "pselect6") ++_S(464, "ppoll") ++_S(465, "unshare") ++_S(466, "set_robust_list") ++_S(467, "get_robust_list") ++_S(468, "splice") ++_S(469, "sync_file_range") ++_S(470, "tee") ++_S(471, "vmsplice") ++_S(472, "move_pages") ++_S(473, "getcpu") ++_S(474, "epoll_pwait") ++_S(475, "utimensat") ++_S(476, "signalfd") ++_S(477, "timerfd") ++_S(478, "eventfd") ++_S(479, "recvmmsg") ++_S(480, "fallocate") ++_S(481, "timerfd_create") ++_S(482, "timerfd_settime") ++_S(483, "timerfd_gettime") ++_S(484, "signalfd4") ++_S(485, "eventfd2") ++_S(486, "epoll_create1") ++_S(487, "dup3") ++_S(488, "pipe2") ++_S(489, "inotify_init1") ++_S(490, "preadv") ++_S(491, "pwritev") ++_S(492, "rt_tgsigqueueinfo") ++_S(493, "perf_event_open") ++_S(494, "fanotify_init") ++_S(495, "fanotify_mark") ++_S(496, "prlimit64") ++_S(497, "name_to_handle_at") ++_S(498, "open_by_handle_at") ++_S(499, "clock_adjtime") ++_S(500, "syncfs") ++_S(501, "setns") ++_S(502, "accept4") ++_S(503, "sendmmsg") ++_S(504, "process_vm_readv") ++_S(505, "process_vm_writev") ++_S(506, "kcmp") ++_S(507, "finit_module") ++_S(508, "sched_setattr") ++_S(509, "sched_getattr") ++_S(510, "renameat2") ++_S(511, "getrandom") ++_S(512, "memfd_create") ++_S(513, "execveat") ++_S(514, "seccomp") ++_S(515, "copy_file_range") ++_S(516, "preadv2") ++_S(517, "pwritev2") ++_S(518, "statx") +\ No newline at end of file +diff --git a/src/autrace.c b/src/autrace.c +index 7f104e6..20a7f20 100644 +--- a/src/autrace.c ++++ b/src/autrace.c +@@ -62,7 +62,9 @@ static int insert_rule(int audit_fd, const char *field) + rc = 0; + if (machine != MACH_AARCH64) { + rc |= audit_rule_syscallbyname_data(rule, "open"); +- rc |= audit_rule_syscallbyname_data(rule, "creat"); ++ if (machine != MACH_SW_64){ ++ rc |= audit_rule_syscallbyname_data(rule, "creat"); ++ } + rc |= audit_rule_syscallbyname_data(rule, "rename"); + rc |= audit_rule_syscallbyname_data(rule, "unlink"); + rc |= audit_rule_syscallbyname_data(rule, "mknod"); diff --git a/src/libev/ev.c b/src/libev/ev.c -index 5ff936c..72765b5 100644 +index 5ff936c..c8548dd 100644 --- a/src/libev/ev.c +++ b/src/libev/ev.c +@@ -493,7 +493,7 @@ + + #if EV_USE_IOURING + # include +-# if !SYS_io_uring_setup && __linux && !__alpha ++# if !SYS_io_uring_setup && __linux && !__alpha && !__sw_64 + # define SYS_io_uring_setup 425 + # define SYS_io_uring_enter 426 + # define SYS_io_uring_wregister 427 @@ -828,6 +828,8 @@ struct signalfd_siginfo #define ECB_MEMORY_FENCE __asm__ __volatile__ (".set mips2; sync; .set mips0" : : : "memory") #elif defined __alpha__ @@ -92,7 +775,7 @@ index 5ff936c..72765b5 100644 || defined __ia64__ \ || defined __m68k__ \ diff --git a/tools/ausyscall/ausyscall.c b/tools/ausyscall/ausyscall.c -index 4fb8f09..206e9ff 100644 +index 4fb8f09..4065321 100644 --- a/tools/ausyscall/ausyscall.c +++ b/tools/ausyscall/ausyscall.c @@ -73,6 +73,12 @@ int main(int argc, char *argv[]) @@ -101,7 +784,7 @@ index 4fb8f09..206e9ff 100644 stderr); +#ifndef WITH_SW_64 + } else if (strcmp("sw_64", argv[i]) == 0) { -+ fputs("Sw_64 eabi processor support is not enabled\n", ++ fputs("Sw_64 processor support is not enabled\n", + stderr); + exit(1); +#endif @@ -109,5 +792,5 @@ index 4fb8f09..206e9ff 100644 } else if (strcmp("arm", argv[i]) == 0) { fputs("Arm eabi processor support is not enabled\n", -- -2.33.0 +2.27.0 diff --git a/audit.spec b/audit.spec index 5eef9ed..c219489 100644 --- a/audit.spec +++ b/audit.spec @@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing Name: audit Epoch: 1 Version: 3.0.1 -Release: 10 +Release: 11 License: GPLv2+ and LGPLv2+ URL: https://people.redhat.com/sgrubb/audit/ Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -126,7 +126,7 @@ cp %{SOURCE1} . autoreconf -f -i %configure --sbindir=/sbin --libdir=/%{_lib} --with-python=no \ --with-python3=yes \ - --enable-gssapi-krb5=yes --with-arm --with-aarch64 \ + --enable-gssapi-krb5=yes --with-arm --with-aarch64 --with-sw_64\ --with-libcap-ng=yes --enable-zos-remote \ %ifarch %{golang_arches} --with-golang \ @@ -381,6 +381,9 @@ fi %attr(644,root,root) %{_mandir}/man8/*.8.gz %changelog +* Mon Aug 7 2023 panchenbo - 1:3.0.1-11 +- fix sw_64 support incomplete + * Thu Jun 8 2023 xuraoqing - 1:3.0.1-10 - backport patches from upstream -- Gitee