From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 2A88C158451 for ; Thu, 11 Jan 2024 14:13:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 50C41E2A52; Thu, 11 Jan 2024 14:13:03 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F115CE2A52 for ; Thu, 11 Jan 2024 14:13:02 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 440313431AB for ; Thu, 11 Jan 2024 14:13:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D7454AE5 for ; Thu, 11 Jan 2024 14:13:00 +0000 (UTC) From: "Sam James" 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" Message-ID: <1704982357.5bb9dff0d4ad83a6cc07858b5a70a336a4150860.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/scap-driver/, dev-util/scap-driver/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.7+.patch dev-util/scap-driver/scap-driver-0.29.3-r5.ebuild X-VCS-Directories: dev-util/scap-driver/files/ dev-util/scap-driver/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 5bb9dff0d4ad83a6cc07858b5a70a336a4150860 X-VCS-Branch: master Date: Thu, 11 Jan 2024 14:13:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 10f64106-406b-418d-a64c-ad010ca8e2ac X-Archives-Hash: 03637b10bbc7718224676d7fd5fe5080 commit: 5bb9dff0d4ad83a6cc07858b5a70a336a4150860 Author: Holger Hoffstätte applied-asynchrony com> AuthorDate: Mon Jan 1 14:54:39 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jan 11 14:12:37 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bb9dff0 dev-util/scap-driver: fix build on kernel 6.7 Closes: https://bugs.gentoo.org/921163 Signed-off-by: Holger Hoffstätte applied-asynchrony.com> Signed-off-by: Sam James gentoo.org> .../files/0.29.3-fix-kmod-build-on-6.7+.patch | 21 +++++++++ dev-util/scap-driver/scap-driver-0.29.3-r5.ebuild | 52 ++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.7+.patch b/dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.7+.patch new file mode 100644 index 000000000000..a6db9e2d751c --- /dev/null +++ b/dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.7+.patch @@ -0,0 +1,21 @@ + +Bug: https://bugs.gentoo.org/921163 +Subset of patch taken from: https://github.com/falcosecurity/libs/commit/bf0afa0cacb775582fde134500fe66af38f1eb59 + +--- a/driver/ppm_fillers.c 2024-01-01 15:05:13.000000000 +0100 ++++ b/driver/ppm_fillers.c 2024-01-01 15:15:59.893048651 +0100 +@@ -430,7 +430,13 @@ struct file *ppm_get_mm_exe_file(struct + { + struct file *exe_file; + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0) ++ // Since linux 6.7.0, `get_file_rcu` is no more a define and takes a double pointer parameter. ++ // See https://github.com/torvalds/linux/commit/0ede61d8589cc2d93aa78230d74ac58b5b8d0244. ++ rcu_read_lock(); ++ exe_file = get_file_rcu(&mm->exe_file); ++ rcu_read_unlock(); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) + rcu_read_lock(); + exe_file = rcu_dereference(mm->exe_file); + if (exe_file && !get_file_rcu(exe_file)) diff --git a/dev-util/scap-driver/scap-driver-0.29.3-r5.ebuild b/dev-util/scap-driver/scap-driver-0.29.3-r5.ebuild new file mode 100644 index 000000000000..099b02873376 --- /dev/null +++ b/dev-util/scap-driver/scap-driver-0.29.3-r5.ebuild @@ -0,0 +1,52 @@ +# 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-util/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="!