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 X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3498C433E6 for ; Fri, 8 Jan 2021 21:18:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77D4C23A80 for ; Fri, 8 Jan 2021 21:18:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77D4C23A80 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iE2MLoYX4Kprg5qD2SM8CBIPnQkcJJpu+ehpfz8rAhA=; b=RZNQCt8f02MOnxs4OEnui9X0P bVcQxiJw51LqzbTsJm/rIow/7qqIWraphKxlpqu/R0vSBpCKhTHDSq8sOVT6fKygEeCIYf3hJwoXi YunrBpTOvQEFdSZfq8dpc8yxtumPYIb+//NHJoYzVFzeNPsBFAmvtRqyhOEnRXf271dyQUaTGwPwx Vwq6ACdTN5VxyhMPG/e01G45K3M2Qp7JnLhutHTIhlK+aCCQCPzJ45hC6Zt8wQ6WTEtNcr5aFVq3J oOWOjTq1IXToOr71IaXtACwWWtZyCpebFfpZ6AdDOWOmI6VWIJmJGjqpR0D3bJEBY8yBvpaEkPMjr Dtou4G0VA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxz7h-00029u-Cd; Fri, 08 Jan 2021 21:16:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxz7f-00029T-54 for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2021 21:16:39 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id AA67423A80; Fri, 8 Jan 2021 21:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610140597; bh=bjigwf/89JSjEVHxRjfk2laNrhGqBpQX0mFubaEYXK4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PSXY5/10M+CaVwDHwLXOBFKTWUgz1wlFmhUSA2wYDQcbe5VsSyDQ3dw68w2PF0O0l Rm94rM7z9EhSX8bJvDadessVDdZcLlkAndL9OPFcG/lJbOjmncvt723W+yRt0nMjpi h7JcyMmGi4pDZ4TURomy+8BFx+LeiRkOfS0AB+C166PbDQjnWs1aJzWnlfUFTpkh6Y HMHfPL7haPtHD4yCzAOp31Bj2iJzEZe96U0n5pLRjYWJ97l4JI46M5ai+Bt6AKatiu Nnq6gvH/zJQsG9NFFPwhoxviSh3p0kL2Cjs193B+RY1nApcreOCveq7wI1iJQKGx4V 3uE9y8G+q93og== Date: Fri, 8 Jan 2021 13:16:36 -0800 From: Eric Biggers To: Ard Biesheuvel Subject: Re: [PATCH v2] crypto: reduce minimum alignment of on-stack structures Message-ID: References: <20210108171706.10306-1-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210108171706.10306-1-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_161639_271612_EBF24D68 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, herbert@gondor.apana.org.au Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 08, 2021 at 06:17:06PM +0100, Ard Biesheuvel wrote: > diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h > index 6a733b171a5d..aa133dc3bf39 100644 > --- a/include/crypto/skcipher.h > +++ b/include/crypto/skcipher.h > @@ -128,7 +128,7 @@ struct skcipher_alg { > MAX_SYNC_SKCIPHER_REQSIZE + \ > (!(sizeof((struct crypto_sync_skcipher *)1 == \ > (typeof(tfm))1))) \ > - ] CRYPTO_MINALIGN_ATTR; \ > + ] __aligned(ARCH_SLAB_MINALIGN); \ > struct skcipher_request *name = (void *)__##name##_desc > Are you sure this is okay? __alignof__(struct skcipher_request) will still be CRYPTO_MINALIGN_ATTR, since it contains a field with that alignment. So technically isn't the full alignment still needed, as the compiler can assume that struct skcipher_request is CRYPTO_MINALIGN_ATTR-aligned? - Eric _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel