From patchwork Sun Jun 21 09:38:44 2020 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: 3212 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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49qSCx3fnwz3wbg for ; Sun, 21 Jun 2020 09:38:53 +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 ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49qSCw16Zlz1MD; Sun, 21 Jun 2020 09:38:52 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49qSCw03YYz2xmj; Sun, 21 Jun 2020 09:38:52 +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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49qSCt2ZhHz2xmj for ; Sun, 21 Jun 2020 09:38:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49qSCs1JQgz1MD for ; Sun, 21 Jun 2020 09:38:48 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1592732329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6EZk8aKiD71cE1TSvAvP9wchQuL2eiZBiMOQKGsAqQ=; b=KWa3SXcVG57qzTnyPaQySej1gHnNvtCCCH509+2wKtXTJJPN4jBsbUV1esm+GfZlwJkVOZ l2g30/liUS4zrgDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1592732329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6EZk8aKiD71cE1TSvAvP9wchQuL2eiZBiMOQKGsAqQ=; b=kSVFlZM8jkvOFgUi7Hwc2jAsvinZEh9mK8cCMWgb7Fm55lb90c981F4iM0U38Jo7y0fpjW SAkk0uAtdZqLS83WEpm9/WsZt0Yal62TejvB+sLhnrSAYAzQ0Mx+wHEM0YQ2tBgRgGcf4e VByN10lvNsZjX1DoMPEpulVhiAqm+rjK6INFHQyzmWGgWgNTS2jzfJwPA45h5CL7vvZCPh NGJXgYVjHG7UOHch+LhGaldhTIJ86pdSVSQitfbTlLSBHTbCD3cJEgFCvic4D9JvgNHVvj JQLE1UIrVyf53kXlmVYiR3KaI4c6fDpNYviJR6TKBI6rt2Im3h8tu1tm8qfQ6A== To: development@lists.ipfire.org From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] kernel: enable CONFIG_PAGE_POISONING on aarch64 and armv5tel Message-ID: <39f9e032-50e4-fc53-753b-18c6b6b81ffe@ipfire.org> Date: Sun, 21 Jun 2020 09:38:44 +0000 MIME-Version: 1.0 Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Quoted from https://capsule8.com/blog/kernel-configuration-glossary/: > Significance: Medium > > Fill the pages with poison patterns after free_pages() and verify the patterns > before alloc_pages. The filling of the memory helps reduce the risk of > information leaks from freed data. This does have a potential performance > impact if enabled with the "page_poison=1" kernel boot option. This was forgotten for aarch64 and armv5tel, while a corresponding patch for x86_64 was merged as commit efd508e9f60d17d8d2205ba8ef3f03407c720fa8. Since Fireinfo only reports a few aarch64 and armv5tel systems running IPFire 2.x, enabling this seems to be not that critical to me. Anyway, sorry for the chaos... Partially fixes: #12362 Cc: Arne Fitzenreiter Signed-off-by: Peter Müller --- config/kernel/kernel.config.aarch64-ipfire | 4 +++- config/kernel/kernel.config.armv5tel-ipfire-multi | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/kernel/kernel.config.aarch64-ipfire b/config/kernel/kernel.config.aarch64-ipfire index c616cbb85..bd9e09c96 100644 --- a/config/kernel/kernel.config.aarch64-ipfire +++ b/config/kernel/kernel.config.aarch64-ipfire @@ -6357,7 +6357,9 @@ CONFIG_DEBUG_KERNEL=y # # CONFIG_PAGE_EXTENSION is not set # CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_PAGE_POISONING is not set +CONFIG_PAGE_POISONING=y +# CONFIG_PAGE_POISONING_NO_SANITY is not set +CONFIG_PAGE_POISONING_ZERO=y # CONFIG_DEBUG_PAGE_REF is not set # CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_OBJECTS is not set diff --git a/config/kernel/kernel.config.armv5tel-ipfire-multi b/config/kernel/kernel.config.armv5tel-ipfire-multi index 5280a6a62..d8ca5605b 100644 --- a/config/kernel/kernel.config.armv5tel-ipfire-multi +++ b/config/kernel/kernel.config.armv5tel-ipfire-multi @@ -6842,7 +6842,9 @@ CONFIG_DEBUG_KERNEL=y # # CONFIG_PAGE_EXTENSION is not set # CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_PAGE_POISONING is not set +CONFIG_PAGE_POISONING=y +# CONFIG_PAGE_POISONING_NO_SANITY is not set +CONFIG_PAGE_POISONING_ZERO=y # CONFIG_DEBUG_PAGE_REF is not set # CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_OBJECTS is not set