[arch-commits] Commit in sysdig/trunk (PKGBUILD linux-5.1.patch)
Date: Friday, May 31, 2019 @ 07:34:51 Author: mtorromeo Revision: 475860 upgpkg: sysdig 0.26.1-1 Modified: sysdig/trunk/PKGBUILD Deleted: sysdig/trunk/linux-5.1.patch -+ PKGBUILD|7 linux-5.1.patch | 1635 -- 2 files changed, 2 insertions(+), 1640 deletions(-) Modified: PKGBUILD === --- PKGBUILD2019-05-31 07:32:30 UTC (rev 475859) +++ PKGBUILD2019-05-31 07:34:51 UTC (rev 475860) @@ -3,7 +3,7 @@ # Contribuitor: Christian Babeux pkgname=sysdig -pkgver=0.26.0 +pkgver=0.26.1 pkgrel=1 pkgdesc="Open source system-level exploration and troubleshooting tool" arch=('x86_64') @@ -13,17 +13,14 @@ makedepends=('cmake' 'pandoc') source=("https://github.com/draios/sysdig/archive/$pkgver/$pkgname-$pkgver.tar.gz"; "bashcomp-location.patch" -"linux-5.1.patch" "glibc.patch") -sha256sums=('bf0f119d6c5216d25fe8acb0d340b0df01e32fc56119653da5928a1113a976fe' +sha256sums=('4bc59f4e958c9b971ecb4d6fe98fe0be27a185b87106c76aaf4614ab3ef7129e' 'aaee8a0ff414a24c5d5a479229324be1667bc5eb70702838f5d617fd986f947b' -'4f0666813276af5d07314afc71986b1b4f1b2dc59cb517936a138adf63133077' '9d9ee715500cb5c3709cf6a77e95421edaaae5f15dbb1c7c8ad2147cc9637939') prepare() { cd "$srcdir"/$pkgname-$pkgver patch -p1 -i "$srcdir"/bashcomp-location.patch - patch -p1 -i "$srcdir"/linux-5.1.patch patch -p1 -i "$srcdir"/glibc.patch } Deleted: linux-5.1.patch === --- linux-5.1.patch 2019-05-31 07:32:30 UTC (rev 475859) +++ linux-5.1.patch 2019-05-31 07:34:51 UTC (rev 475860) @@ -1,1635 +0,0 @@ -From a6ab1e66fc05a02178e051ea2441633996d5871e Mon Sep 17 00:00:00 2001 -From: Nathan Baker <7409217+natha...@users.noreply.github.com> -Date: Thu, 23 May 2019 09:59:06 -0400 -Subject: [PATCH] Changes to build the kmod with 5.1 kernels [SMAGENT-1643] - (#1413) - -[SMAGENT-1643] Changes to build the kmod with 5.1 kernels - -* The syscall_get_arguments function changed its parameters. -* The mmap symbols changed header locations -* Wrapped the kernel version check in a function - driver/main.c | 21 ++- - driver/ppm.h | 2 + - driver/ppm_events.c | 47 +++--- - driver/ppm_fillers.c | 345 -- - driver/ppm_flag_helpers.h | 3 +- - 5 files changed, 227 insertions(+), 191 deletions(-) - -diff --git a/driver/main.c b/driver/main.c -index a2b0b6453..fc8768584 100644 a/driver/main.c -+++ b/driver/main.c -@@ -216,6 +216,15 @@ do { \ - pr_info(fmt, ##__VA_ARGS__);\ - } while (0) - -+inline void ppm_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned long *args) -+{ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)) -+syscall_get_arguments(task, regs, 0, 6, args); -+#else -+syscall_get_arguments(task, regs, args); -+#endif -+} -+ - /* compat tracepoint functions */ - static int compat_register_trace(void *func, const char *probename, struct tracepoint *tp) - { -@@ -1284,11 +1293,10 @@ static const unsigned char compat_nas[21] = { - #ifdef _HAS_SOCKETCALL - static enum ppm_event_type parse_socketcall(struct event_filler_arguments *filler_args, struct pt_regs *regs) - { -- unsigned long __user args[2]; -+ unsigned long __user args[6] = {}; - unsigned long __user *scargs; - int socketcall_id; -- -- syscall_get_arguments(current, regs, 0, 2, args); -+ ppm_syscall_get_arguments(current, regs, args); - socketcall_id = args[0]; - scargs = (unsigned long __user *)args[1]; - -@@ -1403,6 +1411,7 @@ static inline void record_drop_x(struct ppm_consumer_t *consumer, struct timespe - static inline int drop_nostate_event(enum ppm_event_type event_type, -struct pt_regs *regs) - { -+ unsigned long args[6] = {}; - unsigned long arg = 0; - int close_fd = -1; - struct files_struct *files; -@@ -1424,7 +1433,8 @@ static inline int drop_nostate_event(enum ppm_event_type event_type, -* The invalid fd events don't matter to userspace in dropping mode, -* so we do this before the UF_NEVER_DROP check -*/ -- syscall_get_arguments(current, regs, 0, 1, &arg); -+ ppm_syscall_get_arguments(current, regs, args); -+ arg = args[0]; - close_fd = (int)arg; - - files = current->files; -@@ -1444,7 +1454,8 @@ static inline int drop_nostate_event(enum ppm_event_type event_type, - case PPME_SYSCALL_FCNTL_E: - case PPME_SYSCALL_FCNTL_X: - // cmd arg -- syscall_get_arguments(current, regs, 1, 1, &arg); -+ ppm_syscall_
[arch-commits] Commit in sysdig/trunk (PKGBUILD linux-5.1.patch)
Date: Wednesday, May 22, 2019 @ 16:02:44 Author: mtorromeo Revision: 468598 patched for linux 5.1 Added: sysdig/trunk/linux-5.1.patch Modified: sysdig/trunk/PKGBUILD -+ PKGBUILD| 11 linux-5.1.patch | 1607 ++ 2 files changed, 1614 insertions(+), 4 deletions(-) Modified: PKGBUILD === --- PKGBUILD2019-05-22 15:47:32 UTC (rev 468597) +++ PKGBUILD2019-05-22 16:02:44 UTC (rev 468598) @@ -4,7 +4,7 @@ pkgname=sysdig pkgver=0.25 -pkgrel=1 +pkgrel=2 pkgdesc="Open source system-level exploration and troubleshooting tool" arch=('x86_64') url="https://www.sysdig.com/"; @@ -12,13 +12,16 @@ depends=('dkms' 'jsoncpp' 'luajit' 'curl' 'jq' 'libb64' 'intel-tbb' 'grpc') makedepends=('cmake' 'pandoc') source=("https://github.com/draios/sysdig/archive/$pkgver/$pkgname-$pkgver.tar.gz"; -"bashcomp-location.patch") -sha256sums=('8c22df9703ce953ff962de5b148dacbb96810956bf2c8d7a73239898f725684c' -'aaee8a0ff414a24c5d5a479229324be1667bc5eb70702838f5d617fd986f947b') +"bashcomp-location.patch" +"linux-5.1.patch") +sha256sums=('4ab2d3cebb49e3b059bf974d68cef4cedc141d1544fa2b252cfa1cdf3ee33fdd' +'aaee8a0ff414a24c5d5a479229324be1667bc5eb70702838f5d617fd986f947b' +'4440ad68b2c8d7f4d6a13adcc0c901bb07faece70bb91a4e0b5e5c744dd9603b') prepare() { cd "$srcdir"/$pkgname-$pkgver patch -p1 -i "$srcdir"/bashcomp-location.patch + patch -p1 -i "$srcdir"/linux-5.1.patch } build() { Added: linux-5.1.patch === --- linux-5.1.patch (rev 0) +++ linux-5.1.patch 2019-05-22 16:02:44 UTC (rev 468598) @@ -0,0 +1,1607 @@ +diff --git a/driver/main.c b/driver/main.c +index a2b0b64..cdd8d2d 100644 +--- a/driver/main.c b/driver/main.c +@@ -1284,11 +1284,14 @@ static const unsigned char compat_nas[21] = { + #ifdef _HAS_SOCKETCALL + static enum ppm_event_type parse_socketcall(struct event_filler_arguments *filler_args, struct pt_regs *regs) + { +- unsigned long __user args[2]; ++ unsigned long __user args[6] = {}; + unsigned long __user *scargs; + int socketcall_id; +- +- syscall_get_arguments(current, regs, 0, 2, args); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)) ++ syscall_get_arguments(current, regs, 0, 6, args); ++#else ++ syscall_get_arguments(current, regs, args); ++#endif + socketcall_id = args[0]; + scargs = (unsigned long __user *)args[1]; + +@@ -1403,6 +1406,7 @@ static inline void record_drop_x(struct ppm_consumer_t *consumer, struct timespe + static inline int drop_nostate_event(enum ppm_event_type event_type, +struct pt_regs *regs) + { ++ unsigned long args[6] = {}; + unsigned long arg = 0; + int close_fd = -1; + struct files_struct *files; +@@ -1424,7 +1428,12 @@ static inline int drop_nostate_event(enum ppm_event_type event_type, +* The invalid fd events don't matter to userspace in dropping mode, +* so we do this before the UF_NEVER_DROP check +*/ +- syscall_get_arguments(current, regs, 0, 1, &arg); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)) ++ syscall_get_arguments(current, regs, 0, 6, args); ++#else ++ syscall_get_arguments(current, regs, args); ++#endif ++ arg = args[0]; + close_fd = (int)arg; + + files = current->files; +@@ -1444,7 +1453,12 @@ static inline int drop_nostate_event(enum ppm_event_type event_type, + case PPME_SYSCALL_FCNTL_E: + case PPME_SYSCALL_FCNTL_X: + // cmd arg +- syscall_get_arguments(current, regs, 1, 1, &arg); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)) ++ syscall_get_arguments(current, regs, 0, 6, args); ++#else ++ syscall_get_arguments(current, regs, args); ++#endif ++ arg = args[1]; + if (arg != F_DUPFD && arg != F_DUPFD_CLOEXEC) + drop = true; + break; +diff --git a/driver/ppm_events.c b/driver/ppm_events.c +index cc3eb98..db13d07 100644 +--- a/driver/ppm_events.c b/driver/ppm_events.c +@@ -244,14 +244,20 @@ inline u32 compute_snaplen(struct event_filler_arguments *args, char *buf, u32 l + if (err == 0) { + if(args->event_type == PPME_SOCKET_SENDTO_X) + { ++ unsigned long syscall_args[6] = {}; + unsigned long val; + struct sockaddr __user * usrsockaddr; + /* +* Get the address +