From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B08F9C4332F for ; Wed, 4 Jan 2023 03:47:58 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4NmwY909PLz3cBX for ; Wed, 4 Jan 2023 14:47:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.a=rsa-sha256 header.s=fm3 header.b=Na1lG4DR; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=pqjKnzwj; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=russell.cc (client-ip=66.111.4.27; helo=out3-smtp.messagingengine.com; envelope-from=ruscur@russell.cc; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.a=rsa-sha256 header.s=fm3 header.b=Na1lG4DR; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=pqjKnzwj; dkim-atps=neutral Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4NmwWj0kxmz3c6P for ; Wed, 4 Jan 2023 14:46:41 +1100 (AEDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2E3085C00D5; Tue, 3 Jan 2023 22:46:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 03 Jan 2023 22:46:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=russell.cc; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1672803999; x= 1672890399; bh=gFFDVFxDhdh78/CM4G8bL0eEgbbPLaakK8kfr6x0JhE=; b=N a1lG4DR86EmLpQcrnMJnJqJji9JaMIdpDuywtCJA18f1RTTK9LO16DzXOs3/cne4 VpVrsOct8fX4vktFubf1f9u065v3ByjgvA3SllldmBW7jq8ZoMfFNjm17mKSTnES 11hKLKF013WFT/LMZepYO/xpzO7WruRNu0Wo6H44Iic1G3IbnZ92H93P7n0yQQh/ Zup5aj4jveGSARziTfMqPZFs1aeGgn5lgT07gTPoyUknMIlTTirQiT9L4ZyPDmj0 DanIrPm2HYfKlLKz/bJ73CHlgiIGy1MYjO/aw7tliwT3EyFPm+7lim2O/4N3r8dM mHvZLh6jJcLq2EgOzcerA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1672803999; x= 1672890399; bh=gFFDVFxDhdh78/CM4G8bL0eEgbbPLaakK8kfr6x0JhE=; b=p qjKnzwjD26l/tPMOffdoelalhSmEtGSOT6U8psk0KIXHDIPKol1agMyfc/iSyVcB bc6ikoJo9tN0KRTzNyx62A41G1yJVr1ruNaDjvZ7RZeonLCbfTnqFARlbYk4DTSU tGN1PVdEpYJFbknrNyCeyblzy4C/TtYHi8xeZ0c+wLwzOKpC77FRs5iCz7GTaw1Q Icmx99kC6aKd7G8oQnfVWGztKTAhwmuVBsSV8D9vlXnnsHJ985Q4TTyX2mIyd+Qn IHDebdh1D8E/GRkK3T0D82DQoo9wQTKin4052aCVA5o4kwuKfE8UcqVC9yNmwb/x u7zG3xb9t6h20+AiOQYdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeehgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdduhedmnecujfgurhepkffuhf fvveffjghftgfgfgggsehtqhertddtreejnecuhfhrohhmpeftuhhsshgvlhhlucevuhhr rhgvhicuoehruhhstghurhesrhhushhsvghllhdrtggtqeenucggtffrrghtthgvrhhnpe etgfeilefhueefvedvkeehieefjefgfeegheetudekiefguddutdeukeetveelleenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehruhhstghurh esrhhushhsvghllhdrtggt X-ME-Proxy: Feedback-ID: i4421424f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 3 Jan 2023 22:46:36 -0500 (EST) Message-ID: <4739e474a2e8d6339f0f37b1bfa6bc1fd71d81d3.camel@russell.cc> Subject: Re: [PATCH 2/4] powerpc/pseries: Fix alignment of PLPKS structures and buffers From: Russell Currey To: Andrew Donnellan , linuxppc-dev@lists.ozlabs.org Date: Wed, 04 Jan 2023 14:46:34 +1100 In-Reply-To: <20221220071626.1426786-3-ajd@linux.ibm.com> References: <20221220071626.1426786-1-ajd@linux.ibm.com> <20221220071626.1426786-3-ajd@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.2 (3.46.2-1.fc37) MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nayna@linux.ibm.com, gjoyce@linux.ibm.com, bgray@linux.ibm.com, brking@linux.ibm.com, gcwilson@linux.ibm.com, stefanb@linux.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 2022-12-20 at 18:16 +1100, Andrew Donnellan wrote: > A number of structures and buffers passed to PKS hcalls have > alignment > requirements, which could on occasion cause problems: >=20 > - Authorisation structures must be 16-byte aligned and must not cross > a > =C2=A0 page boundary >=20 > - Label structures must not cross page coundaries >=20 > - Password output buffers must not cross page boundaries >=20 > Round up the allocations of these structures/buffers to the next > power of > 2 to make sure this happens. >=20 > Reported-by: Benjamin Gray > Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform > KeyStore") > Signed-off-by: Andrew Donnellan >=20 Reviewed-by: Russell Currey