From patchwork Sun Sep 22 18:01:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 8148 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4XBYq61JD7z3wyT for ; Sun, 22 Sep 2024 18:01:54 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (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 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4XBYq33JSvz2rk; Sun, 22 Sep 2024 18:01:51 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4XBYq31gywz33JD; Sun, 22 Sep 2024 18:01:51 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4XBYq05qQ2z33Fx for ; Sun, 22 Sep 2024 18:01:48 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [172.28.1.161]) (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 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "people01.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4XBYpz5z8Jz1vp; Sun, 22 Sep 2024 18:01:47 +0000 (UTC) Received: by people01.haj.ipfire.org (Postfix, from userid 1078) id 4XBYpz4clZz2xxJ; Sun, 22 Sep 2024 18:01:47 +0000 (UTC) From: =?utf-8?q?Peter_M=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH] linux: Disable cachestat() system call Date: Sun, 22 Sep 2024 18:01:45 +0000 Message-Id: <20240922180145.835402-1-peter.mueller@ipfire.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Message-ID-Hash: NNDGM2T7YLPRW6LHZCXUKF57NCRUKC7N X-Message-ID-Hash: NNDGM2T7YLPRW6LHZCXUKF57NCRUKC7N X-MailFrom: pmueller@people01.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?utf-8?q?Peter_M=C3=BCller?= X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: >From the kernel's documentation: > Enable the cachestat system call, which queries the page > cache statistics of a file (number of cached pages, dirty > pages, pages marked for writeback, (recently) evicted pages). There is no legitimate use-case for this feature in IPFire, and grsecurity recommends disabling it to cut attack surface. Signed-off-by: Peter Müller --- config/kernel/kernel.config.aarch64-ipfire | 2 +- config/kernel/kernel.config.riscv64-ipfire | 2 +- config/kernel/kernel.config.x86_64-ipfire | 2 +- config/rootfiles/common/aarch64/linux | 1 - config/rootfiles/common/riscv64/linux | 1 - config/rootfiles/common/x86_64/linux | 1 - 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/config/kernel/kernel.config.aarch64-ipfire b/config/kernel/kernel.config.aarch64-ipfire index 74085de00..b2753cdbf 100644 --- a/config/kernel/kernel.config.aarch64-ipfire +++ b/config/kernel/kernel.config.aarch64-ipfire @@ -243,7 +243,7 @@ CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_KCMP=y CONFIG_RSEQ=y -CONFIG_CACHESTAT_SYSCALL=y +# CONFIG_CACHESTAT_SYSCALL is not set # CONFIG_DEBUG_RSEQ is not set CONFIG_HAVE_PERF_EVENTS=y CONFIG_GUEST_PERF_EVENTS=y diff --git a/config/kernel/kernel.config.riscv64-ipfire b/config/kernel/kernel.config.riscv64-ipfire index 451607c17..77487de34 100644 --- a/config/kernel/kernel.config.riscv64-ipfire +++ b/config/kernel/kernel.config.riscv64-ipfire @@ -245,7 +245,7 @@ CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_KCMP=y CONFIG_RSEQ=y -CONFIG_CACHESTAT_SYSCALL=y +# CONFIG_CACHESTAT_SYSCALL is not set # CONFIG_DEBUG_RSEQ is not set CONFIG_HAVE_PERF_EVENTS=y # CONFIG_PC104 is not set diff --git a/config/kernel/kernel.config.x86_64-ipfire b/config/kernel/kernel.config.x86_64-ipfire index 6f0f1bfa5..c17757421 100644 --- a/config/kernel/kernel.config.x86_64-ipfire +++ b/config/kernel/kernel.config.x86_64-ipfire @@ -264,7 +264,7 @@ CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_KCMP=y CONFIG_RSEQ=y -CONFIG_CACHESTAT_SYSCALL=y +# CONFIG_CACHESTAT_SYSCALL is not set # CONFIG_DEBUG_RSEQ is not set CONFIG_HAVE_PERF_EVENTS=y CONFIG_GUEST_PERF_EVENTS=y diff --git a/config/rootfiles/common/aarch64/linux b/config/rootfiles/common/aarch64/linux index 53dedd2f3..98eee80a7 100644 --- a/config/rootfiles/common/aarch64/linux +++ b/config/rootfiles/common/aarch64/linux @@ -7608,7 +7608,6 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER/build/include/config/BUILD_SALT #lib/modules/KVER/build/include/config/BUILTIN_RETURN_ADDRESS_STRIPS_PAC #lib/modules/KVER/build/include/config/CACHEFILES -#lib/modules/KVER/build/include/config/CACHESTAT_SYSCALL #lib/modules/KVER/build/include/config/CARL9170 #lib/modules/KVER/build/include/config/CARL9170_HWRNG #lib/modules/KVER/build/include/config/CARL9170_LEDS diff --git a/config/rootfiles/common/riscv64/linux b/config/rootfiles/common/riscv64/linux index dca2c7370..626238714 100644 --- a/config/rootfiles/common/riscv64/linux +++ b/config/rootfiles/common/riscv64/linux @@ -6940,7 +6940,6 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER/build/include/config/BUILDTIME_TABLE_SORT #lib/modules/KVER/build/include/config/BUILD_SALT #lib/modules/KVER/build/include/config/CACHEFILES -#lib/modules/KVER/build/include/config/CACHESTAT_SYSCALL #lib/modules/KVER/build/include/config/CADENCE_WATCHDOG #lib/modules/KVER/build/include/config/CARDBUS #lib/modules/KVER/build/include/config/CARL9170 diff --git a/config/rootfiles/common/x86_64/linux b/config/rootfiles/common/x86_64/linux index cecaf36fa..6505e9a54 100644 --- a/config/rootfiles/common/x86_64/linux +++ b/config/rootfiles/common/x86_64/linux @@ -7289,7 +7289,6 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER/build/include/config/BUILDTIME_TABLE_SORT #lib/modules/KVER/build/include/config/BUILD_SALT #lib/modules/KVER/build/include/config/CACHEFILES -#lib/modules/KVER/build/include/config/CACHESTAT_SYSCALL #lib/modules/KVER/build/include/config/CADENCE_WATCHDOG #lib/modules/KVER/build/include/config/CALL_DEPTH_TRACKING #lib/modules/KVER/build/include/config/CALL_PADDING