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 321E9158649 for ; Wed, 10 May 2023 19:43:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 534FAE0AC0; Wed, 10 May 2023 19:42:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1A6F5E0AC0 for ; Wed, 10 May 2023 19:42:59 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E628C340BE8 for ; Wed, 10 May 2023 19:42:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B8E2A5E for ; Wed, 10 May 2023 19:42:56 +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: <1683747740.5e405511a6b6aec607753dd574ceaab82f4b428a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/scap-driver/files/, dev-util/scap-driver/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.3+.patch dev-util/scap-driver/scap-driver-0.29.3-r2.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: 5e405511a6b6aec607753dd574ceaab82f4b428a X-VCS-Branch: master Date: Wed, 10 May 2023 19:42:56 +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: 74551d91-782d-4571-b536-4b1b16dd04ad X-Archives-Hash: a728a1709a098c17b5ae52b88b3a9df8 commit: 5e405511a6b6aec607753dd574ceaab82f4b428a Author: Holger Hoffstätte applied-asynchrony com> AuthorDate: Tue May 2 13:45:18 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed May 10 19:42:20 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e405511 dev-util/scap-driver: fix build on kernel 6.3 Closes: https://bugs.gentoo.org/905328 Signed-off-by: Holger Hoffstätte applied-asynchrony.com> Closes: https://github.com/gentoo/gentoo/pull/30836 Signed-off-by: Sam James gentoo.org> .../files/0.29.3-fix-kmod-build-on-6.3+.patch | 20 ++++++++ dev-util/scap-driver/scap-driver-0.29.3-r2.ebuild | 60 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.3+.patch b/dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.3+.patch new file mode 100644 index 000000000000..6926df857179 --- /dev/null +++ b/dev-util/scap-driver/files/0.29.3-fix-kmod-build-on-6.3+.patch @@ -0,0 +1,20 @@ + +Bug: https://github.com/falcosecurity/libs/issues/1063 +Subset of patch taken from: https://github.com/falcosecurity/libs/pull/1071 + +diff --git a/driver/ppm_fillers.c b/driver/ppm_fillers.c +index 0441923c6d..cfa967f134 100644 +--- a/driver/ppm_fillers.c ++++ b/driver/ppm_fillers.c +@@ -1329,7 +1329,10 @@ int f_proc_startupdate(struct event_filler_arguments *args) + + if (exe_file != NULL) { + if (file_inode(exe_file) != NULL) { +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) ++ exe_writable |= (file_permission(exe_file, MAY_WRITE) == 0); ++ exe_writable |= inode_owner_or_capable(file_mnt_idmap(exe_file), file_inode(exe_file)); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) + exe_writable |= (inode_permission(current_user_ns(), file_inode(exe_file), MAY_WRITE) == 0); + exe_writable |= inode_owner_or_capable(current_user_ns(), file_inode(exe_file)); + #else diff --git a/dev-util/scap-driver/scap-driver-0.29.3-r2.ebuild b/dev-util/scap-driver/scap-driver-0.29.3-r2.ebuild new file mode 100644 index 000000000000..129db40bcb86 --- /dev/null +++ b/dev-util/scap-driver/scap-driver-0.29.3-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake linux-mod + +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="!