* [gentoo-commits] repo/gentoo:master commit in: dev-debug/scap-driver/files/, dev-debug/scap-driver/
@ 2024-03-12 2:53 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-03-12 2:53 UTC (permalink / raw
To: gentoo-commits
commit: 8534c90299b019823f5f221a0875786e64e8c03c
Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Mon Mar 11 15:34:09 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 12 02:50:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8534c902
dev-debug/scap-driver: fix build on kernel 6.8
Closes: https://bugs.gentoo.org/926768
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/35712
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/0.29.3-fix-kmod-build-on-6.8+.patch | 44 ++++++++++++++++++
dev-debug/scap-driver/scap-driver-0.29.3-r6.ebuild | 53 ++++++++++++++++++++++
2 files changed, 97 insertions(+)
diff --git a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.8+.patch b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.8+.patch
new file mode 100644
index 000000000000..b33ba164b97a
--- /dev/null
+++ b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.8+.patch
@@ -0,0 +1,44 @@
+
+Bug: https://bugs.gentoo.org/926768
+Minimal subset of changes from: https://github.com/falcosecurity/libs/pull/1632
+
+--- a/driver/ppm_events.c 2024-03-11 15:19:23.000000000 +0100
++++ b/driver/ppm_events.c 2024-03-11 15:22:48.230598879 +0100
+@@ -624,12 +624,16 @@ int val_to_ring(struct event_filler_argu
+ if (unlikely(len < 0))
+ return PPM_FAILURE_INVALID_USER_MEMORY;
+ } else {
+- len = (int)strlcpy(args->buffer + args->arg_data_offset,
++ len = (int)strscpy(args->buffer + args->arg_data_offset,
+ (const char *)(syscall_arg_t)val,
+ max_arg_size);
+
+- if (++len > (int)max_arg_size)
++ if (len == -E2BIG) {
+ len = max_arg_size;
++ } else {
++ len++;
++ }
++
+ }
+
+ /*
+@@ -640,12 +644,15 @@ int val_to_ring(struct event_filler_argu
+ /*
+ * Handle NULL pointers
+ */
+- len = (int)strlcpy(args->buffer + args->arg_data_offset,
++ len = (int)strscpy(args->buffer + args->arg_data_offset,
+ "(NULL)",
+ max_arg_size);
+
+- if (++len > (int)max_arg_size)
+- len = max_arg_size;
++ if (len == -E2BIG) {
++ len = max_arg_size;
++ } else {
++ len++;
++ }
+ }
+
+ break;
diff --git a/dev-debug/scap-driver/scap-driver-0.29.3-r6.ebuild b/dev-debug/scap-driver/scap-driver-0.29.3-r6.ebuild
new file mode 100644
index 000000000000..6874973ae601
--- /dev/null
+++ b/dev-debug/scap-driver/scap-driver-0.29.3-r6.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake linux-mod-r1
+
+DESCRIPTION="Kernel module for dev-debug/sysdig"
+HOMEPAGE="https://sysdig.com/"
+
+# The driver is part of falcosecurity/libs, but for versioning reasons we cannot (yet)
+# use semver-released packages; instead we pull in a commit that is used and known
+# to work with sysdig, see sysdig/cmake/modules/falcosecurity-libs.cmake for details.
+# For now the commit here and the one referenced in sysdig should be in sync.
+LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a"
+SRC_URI="https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz"
+S="${WORKDIR}/libs-${LIBS_COMMIT}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+RDEPEND="!<dev-debug/sysdig-${PV}[modules]"
+
+CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-5.18+.patch
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-6.2+.patch
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-6.3+.patch
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-6.4+.patch
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-6.7+.patch
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-6.8+.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ # we will use linux-mod, so just pretend to use bundled deps
+ # in order to make it through the cmake setup.
+ -DUSE_BUNDLED_DEPS=ON
+ -DCREATE_TEST_TARGETS=OFF
+ -DDRIVER_VERSION=${LIBS_COMMIT}
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ local modlist=( scap=:"${BUILD_DIR}"/driver/src )
+ local modargs=( KERNELDIR="${KV_OUT_DIR}" )
+
+ linux-mod-r1_src_compile
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-debug/scap-driver/files/, dev-debug/scap-driver/
@ 2024-07-24 12:36 Yixun Lan
0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2024-07-24 12:36 UTC (permalink / raw
To: gentoo-commits
commit: 848fa1ac70306f7eaa3513fe531c056b2458e52d
Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Fri Jul 5 10:56:54 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Jul 24 12:34:58 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=848fa1ac
dev-debug/scap-driver: add 0.17.2
This adds the latest & greatest version of the scap kernel driver.
Since we're now finally able to use proper version numbers we no
longer need to rely on random git commits.
Unfortunately this means we have to travel back in version-time;
this should not pose a problem as sysdig-0.38.x is pinned to this
version and will automatically do the right thing.
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
dev-debug/scap-driver/Manifest | 1 +
.../files/0.17.2-fix-kmod-build-on-6.10+.patch | 29 ++++++++++++++
dev-debug/scap-driver/scap-driver-0.17.2.ebuild | 46 ++++++++++++++++++++++
3 files changed, 76 insertions(+)
diff --git a/dev-debug/scap-driver/Manifest b/dev-debug/scap-driver/Manifest
index ea647a605682..7d0200368674 100644
--- a/dev-debug/scap-driver/Manifest
+++ b/dev-debug/scap-driver/Manifest
@@ -1 +1,2 @@
+DIST falcosecurity-libs-0.17.2.tar.gz 4424458 BLAKE2B cbe3a689d3d93a6896b94fd54b35665b11263c07690a36d40617651f97806b0177af657824f62259df95a984d598a34c17ff942c73e3abd774569607dc22380f SHA512 8bb449d91c12225c08d678ea9a8e97a5b5e8828788b56d5b83ec3b3c6ad5e25d4f56120dba523ac9c593d02ee155026e2d4d47587be6f73f373f06fe7ddc2a0c
DIST falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz 816972 BLAKE2B b47ae6a7677935500ebdab8aea7f4c49ef50b7175ec097e7213a1f041ac2b5aa642379924927ec12c84271016e9ab9d191c0c1d4ffacd6ade58b7a03c37f9221 SHA512 65e5916e5f9507fd867a5e9ba3b2670a1b73b7672a22479d3019e948a52ad74441d7e2ce1c74ebd0fdbd1ce66808efa49f285bd5180bceae9d4e6730a60787ce
diff --git a/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch b/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch
new file mode 100644
index 000000000000..11b3f41e7519
--- /dev/null
+++ b/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch
@@ -0,0 +1,29 @@
+
+Patch taken from: https://github.com/falcosecurity/libs/pull/1884
+
+From b52aec86c96f26e14afcdece6a6ccb6ce2f0a7ec Mon Sep 17 00:00:00 2001
+From: Federico Di Pierro <nierro92@gmail.com>
+Date: Thu, 30 May 2024 11:36:32 +0200
+Subject: [PATCH] fix(driver): fix build of kmod on linux 6.10.
+
+Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
+---
+ driver/main.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/driver/main.c b/driver/main.c
+index 1bcd600675..af1470b8d7 100644
+--- a/driver/main.c
++++ b/driver/main.c
+@@ -1649,8 +1649,10 @@ static inline int drop_nostate_event(ppm_event_code event_type,
+ if (close_fd < 0 || close_fd >= fdt->max_fds ||
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0))
+ !FD_ISSET(close_fd, fdt->open_fds)
+-#else
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0))
+ !fd_is_open(close_fd, fdt)
++#else
++ !test_bit(close_fd, fdt->open_fds)
+ #endif
+ ) {
+ drop = true;
diff --git a/dev-debug/scap-driver/scap-driver-0.17.2.ebuild b/dev-debug/scap-driver/scap-driver-0.17.2.ebuild
new file mode 100644
index 000000000000..ccc6d37ec84d
--- /dev/null
+++ b/dev-debug/scap-driver/scap-driver-0.17.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake linux-mod-r1
+
+DESCRIPTION="Kernel module for dev-debug/sysdig"
+HOMEPAGE="https://sysdig.com/"
+SRC_URI="https://github.com/falcosecurity/libs/archive/${PV}.tar.gz -> falcosecurity-libs-${PV}.tar.gz"
+S="${WORKDIR}/libs-${PV}"
+
+LICENSE="Apache-2.0 GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+RDEPEND="!<dev-debug/sysdig-${PV}[modules]"
+
+CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
+
+# We need to specify the driver version manually since we do not use a git tree.
+# This version can be found in the corresponding *sysdig* tree in cmake/modules/driver.cmake
+DRIVER_VERSION="7.2.0+driver"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-6.10+.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ # we will use linux-mod, so just pretend to use bundled deps
+ # in order to make it through the cmake setup.
+ -DUSE_BUNDLED_DEPS=ON
+ -DCREATE_TEST_TARGETS=OFF
+ -DDRIVER_VERSION="${DRIVER_VERSION}"
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ local modlist=( scap=:"${BUILD_DIR}"/driver/src )
+ local modargs=( KERNELDIR="${KV_OUT_DIR}" )
+
+ linux-mod-r1_src_compile
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-debug/scap-driver/files/, dev-debug/scap-driver/
@ 2024-11-01 17:29 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-11-01 17:29 UTC (permalink / raw
To: gentoo-commits
commit: 6368da8f793a85bb3821726e42bf9a89ef5beaf0
Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Mon Oct 14 12:42:03 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 1 17:28:22 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6368da8f
dev-debug/scap-driver: clean up old versions
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-debug/scap-driver/Manifest | 1 -
.../files/0.17.2-fix-kmod-build-on-6.10+.patch | 29 --------------
dev-debug/scap-driver/scap-driver-0.17.2.ebuild | 46 ----------------------
3 files changed, 76 deletions(-)
diff --git a/dev-debug/scap-driver/Manifest b/dev-debug/scap-driver/Manifest
index e2f920a0eef0..1004cab8d016 100644
--- a/dev-debug/scap-driver/Manifest
+++ b/dev-debug/scap-driver/Manifest
@@ -1,3 +1,2 @@
-DIST falcosecurity-libs-0.17.2.tar.gz 4424458 BLAKE2B cbe3a689d3d93a6896b94fd54b35665b11263c07690a36d40617651f97806b0177af657824f62259df95a984d598a34c17ff942c73e3abd774569607dc22380f SHA512 8bb449d91c12225c08d678ea9a8e97a5b5e8828788b56d5b83ec3b3c6ad5e25d4f56120dba523ac9c593d02ee155026e2d4d47587be6f73f373f06fe7ddc2a0c
DIST falcosecurity-libs-0.17.3.tar.gz 4425090 BLAKE2B 3d6300bba2303715581d9b35f63e453f85a3889fa93233d3b1ca69f6ba92b33e0a7d90bbd160b765487b44771a1d94f5a1fb380cf4e5130506a885471dddb7e7 SHA512 05707c404bdd45c2e944b903dbbc1e5e0e5991a3d4cbe9ea357efb35b5ad0c4ede7cdd7b056a7dde2543cc2c0b8d5d3b42606202128b7287a80a1da686de169e
DIST falcosecurity-libs-0.18.1.tar.gz 4473396 BLAKE2B 9e875430032adfc79db086e92e6bb356a9c87a529da27a613f49b18e7e32ebeb28e1859bdba8b35c826e9a0d9c77454d4b804e35d5bf13c2f077fed915355045 SHA512 eb9e4d770888d70cbcc9468a4044f50bbb16729f545660c9f1aa91da862410ee7cfa2702dba7eef161bf3a3e0b9090b64dd8e1694fdb83c55a6d2418d281042a
diff --git a/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch b/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch
deleted file mode 100644
index 11b3f41e7519..000000000000
--- a/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-
-Patch taken from: https://github.com/falcosecurity/libs/pull/1884
-
-From b52aec86c96f26e14afcdece6a6ccb6ce2f0a7ec Mon Sep 17 00:00:00 2001
-From: Federico Di Pierro <nierro92@gmail.com>
-Date: Thu, 30 May 2024 11:36:32 +0200
-Subject: [PATCH] fix(driver): fix build of kmod on linux 6.10.
-
-Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
----
- driver/main.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/driver/main.c b/driver/main.c
-index 1bcd600675..af1470b8d7 100644
---- a/driver/main.c
-+++ b/driver/main.c
-@@ -1649,8 +1649,10 @@ static inline int drop_nostate_event(ppm_event_code event_type,
- if (close_fd < 0 || close_fd >= fdt->max_fds ||
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0))
- !FD_ISSET(close_fd, fdt->open_fds)
--#else
-+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0))
- !fd_is_open(close_fd, fdt)
-+#else
-+ !test_bit(close_fd, fdt->open_fds)
- #endif
- ) {
- drop = true;
diff --git a/dev-debug/scap-driver/scap-driver-0.17.2.ebuild b/dev-debug/scap-driver/scap-driver-0.17.2.ebuild
deleted file mode 100644
index ccc6d37ec84d..000000000000
--- a/dev-debug/scap-driver/scap-driver-0.17.2.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake linux-mod-r1
-
-DESCRIPTION="Kernel module for dev-debug/sysdig"
-HOMEPAGE="https://sysdig.com/"
-SRC_URI="https://github.com/falcosecurity/libs/archive/${PV}.tar.gz -> falcosecurity-libs-${PV}.tar.gz"
-S="${WORKDIR}/libs-${PV}"
-
-LICENSE="Apache-2.0 GPL-2 MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
-
-RDEPEND="!<dev-debug/sysdig-${PV}[modules]"
-
-CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
-
-# We need to specify the driver version manually since we do not use a git tree.
-# This version can be found in the corresponding *sysdig* tree in cmake/modules/driver.cmake
-DRIVER_VERSION="7.2.0+driver"
-
-PATCHES=(
- "${FILESDIR}"/${PV}-fix-kmod-build-on-6.10+.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- # we will use linux-mod, so just pretend to use bundled deps
- # in order to make it through the cmake setup.
- -DUSE_BUNDLED_DEPS=ON
- -DCREATE_TEST_TARGETS=OFF
- -DDRIVER_VERSION="${DRIVER_VERSION}"
- )
-
- cmake_src_configure
-}
-
-src_compile() {
- local modlist=( scap=:"${BUILD_DIR}"/driver/src )
- local modargs=( KERNELDIR="${KV_OUT_DIR}" )
-
- linux-mod-r1_src_compile
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-01 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 17:29 [gentoo-commits] repo/gentoo:master commit in: dev-debug/scap-driver/files/, dev-debug/scap-driver/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-07-24 12:36 Yixun Lan
2024-03-12 2:53 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox