Message ID | 20241014105912.3207374-20-ryan.roberts@arm.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B075D1A43B for <linux-mm@archiver.kernel.org>; Mon, 14 Oct 2024 11:00:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C36496B00A6; Mon, 14 Oct 2024 07:00:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE61B6B00A7; Mon, 14 Oct 2024 07:00:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAE4A6B00A8; Mon, 14 Oct 2024 07:00:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7C7206B00A6 for <linux-mm@kvack.org>; Mon, 14 Oct 2024 07:00:31 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 23402A0D74 for <linux-mm@kvack.org>; Mon, 14 Oct 2024 11:00:17 +0000 (UTC) X-FDA: 82671914010.13.B060233 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf03.hostedemail.com (Postfix) with ESMTP id 53B7620028 for <linux-mm@kvack.org>; Mon, 14 Oct 2024 11:00:26 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728903557; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zTmw5JCDPKyesvf4SHt2c/Iv1pPV+8Di4FJdKvNluCo=; b=VmaYbp0p3S+/beY9sW7mA3HvlhJXn8kQvrZLw63rHSbacMRfrTuUDB5UYYgayOlnnL6f7f Pv5eOpm4WOlCLG13eL7n2YjWMKy9bcU3b4GbfsF3h5Vd4j7xZZTkqrW4vm1oOp8t475Z/1 TJXty204m2f7mjEEfRUb1eXJt9NKaYg= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728903557; a=rsa-sha256; cv=none; b=DgornHToAf5cBZH5rcFdWenrWo7ZgVrKEOzhgkIgprH/+V2ATFIjuTnMTMojDZdiVYTmx5 /2wz2A6dBHSHVaAB/mtbyD1gNrf78Fqnir7ouj9gSIfOnMi7QE3PGddQZ7Y36ce3AyNlsS 9FWKbCCFpH8BIeNWIqJTU0PtQ6JFasU= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 61C921688; Mon, 14 Oct 2024 04:00:58 -0700 (PDT) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0597C3F51B; Mon, 14 Oct 2024 04:00:25 -0700 (PDT) From: Ryan Roberts <ryan.roberts@arm.com> To: "David S. Miller" <davem@davemloft.net>, Andrew Morton <akpm@linux-foundation.org>, Anshuman Khandual <anshuman.khandual@arm.com>, Ard Biesheuvel <ardb@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, David Hildenbrand <david@redhat.com>, Greg Marsden <greg.marsden@oracle.com>, Herbert Xu <herbert@gondor.apana.org.au>, Ivan Ivanov <ivan.ivanov@suse.com>, Kalesh Singh <kaleshsingh@google.com>, Marc Zyngier <maz@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Matthias Brugger <mbrugger@suse.com>, Miroslav Benes <mbenes@suse.cz>, Will Deacon <will@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com>, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH v1 20/57] crypto: Remove PAGE_SIZE compile-time constant assumption Date: Mon, 14 Oct 2024 11:58:27 +0100 Message-ID: <20241014105912.3207374-20-ryan.roberts@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241014105912.3207374-1-ryan.roberts@arm.com> References: <20241014105514.3206191-1-ryan.roberts@arm.com> <20241014105912.3207374-1-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 53B7620028 X-Stat-Signature: t48j967cczjbxw5jx51xu8kjea4r8u8p X-HE-Tag: 1728903626-340239 X-HE-Meta: U2FsdGVkX1/QXg8uRvKoB1jlhVsD0wLIfeYxCr283N1NeKS+zM8SNFuFjox2QzHOAEd3/LbiBjR4h5waljEUBURAfHKdpo/A21RqgPrEL41gMUA7R/5v71PawGU4vXayzzWJJre43uZfj94WIPly8HYIKzQwzjm4QecTtWGQf1yaGZ2MpWd4yy7MsOHXi78DrrSLxAQ1Eo1GRJxP+WRTQLn+moyqCXioF1xQfaq+fDCvKHWaMd1+ucsAX+EXVN/5ZYvXbpWFIz7Ev/FGR5/dgas/gFMBK0Bbyp0N0IR4z7HmozT6cnyg1yWZVQyA18jfmKWLmKQFQXQia3O4sWo/PI1JEBtyqrwI19ducqM5dSX+S9xWJwNUTPCytzgBwL28h3YfCSF9DknqMQHM1BB3JYMBNzDpVIbt2GC2F1S9KWaLvam9p7mlXd+Hh6HKweBKXlj6R/qMDGFuWsIGaOD5g2I406HWJ6vGslu68PMdQ5S+q9mo8CnfmUQ1nTDeOk0ryrjga2x7Wc8Rcskw6a4oDmcmYiKfjppD3R8zM4+aEHDLSmrVOj04HbiNqztM246K62FUUkMn73eZIDZc1eJICg0tp8NxRv40GXcKkSbafO/p0hnyjGI4LyKsJonSltvKZf2Khb40/d6lfZwuMibVwQ3oFS/zfYj8rhdkrVBqalrzDb2wstl0wLxfeCddWOM/pt/a9J+cp5SOcbD15emlVGArF3UREPD3XyXEfipJGR9ir+DURXIrl6iTc/S/cCmyK2IZOcZ82j1Z8Ymxvt95mVFfkRPo6oIcpHe6zVjow0YcRJkaG7DSj75SQqK683Add/15sZ+WXm9pqmcYiOBz7xbk14eCDEhYd1kKO+CtKF4BBvFF8TxF9ZkeyomdZiWvjhqJQTYcRTmyRO9rbeBhQSpSccop6EZZYSxn6wI68vflSm2EO9qKL5arCAbKi/cK4Ko2QCXOcjn7vfQ6FI3 ahNpKKGP HLP+KN+jzIcHz/truR2cdBBjOi2zPmJ1gUaIdJrt/89FhbuKyKhFr4ZJMa5b+y2Jrf20i/N2CbWfE5yPYRLxtALoeA2tGxfgx2hxh/mysqqTx15lYFYlkxdIlcWK5Rg6446djvjAq17OuTahhcf/jsAQL5C5fPLw+FKxTDe1WdSL/ELZDNYEU32Nf0UlDSxtOrQ0UDvGeeiGb9glCSM0EF1SA3+G1/MypXmYi X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Boot-time page size selection for arm64
|
expand
|
On Mon, Oct 14, 2024 at 11:58:27AM +0100, Ryan Roberts wrote: > To prepare for supporting boot-time page size selection, refactor code > to remove assumptions about PAGE_SIZE being compile-time constant. Code > intended to be equivalent when compile-time page size is active. > > Updated BUILD_BUG_ON() to test against limit. > > Signed-off-by: Ryan Roberts <ryan.roberts@arm.com> > --- > > ***NOTE*** > Any confused maintainers may want to read the cover note here for context: > https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/ > > crypto/lskcipher.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/crypto/lskcipher.c b/crypto/lskcipher.c index cdb4897c63e6f..2b84cefba7cd1 100644 --- a/crypto/lskcipher.c +++ b/crypto/lskcipher.c @@ -79,8 +79,8 @@ static int crypto_lskcipher_crypt_unaligned( u8 *tiv; u8 *p; - BUILD_BUG_ON(MAX_CIPHER_BLOCKSIZE > PAGE_SIZE || - MAX_CIPHER_ALIGNMASK >= PAGE_SIZE); + BUILD_BUG_ON(MAX_CIPHER_BLOCKSIZE > PAGE_SIZE_MIN || + MAX_CIPHER_ALIGNMASK >= PAGE_SIZE_MIN); tiv = kmalloc(PAGE_SIZE, GFP_ATOMIC); if (!tiv)
To prepare for supporting boot-time page size selection, refactor code to remove assumptions about PAGE_SIZE being compile-time constant. Code intended to be equivalent when compile-time page size is active. Updated BUILD_BUG_ON() to test against limit. Signed-off-by: Ryan Roberts <ryan.roberts@arm.com> --- ***NOTE*** Any confused maintainers may want to read the cover note here for context: https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/ crypto/lskcipher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)