Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp204878pxm; Tue, 22 Feb 2022 21:07:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDKL9sp9GYID4JZQ/Sjj6fscLgeJKV2e73yv3+udTJiPmQT4N6ctshXtdWXZkBnJYw4L6m X-Received: by 2002:a05:6a00:2341:b0:4e1:5aa4:9aff with SMTP id j1-20020a056a00234100b004e15aa49affmr28255702pfj.8.1645592863305; Tue, 22 Feb 2022 21:07:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645592863; cv=none; d=google.com; s=arc-20160816; b=tmrq0sf4iKXGmo/nl/3FIajb5OTml7JGfh9Fxd9uCvZlSKBWMEpqPSyDy6a8A+f4/2 KiN/I9cuXT1EFT3nUscAv/pO2OHAGhJHq5rkJqFPRIGvrxvrWcxdYL7woBGFPw9iNw4R dwLhT3xabRQYFJolSnF/XK2dmiZHJS7yP/3NtFdl83KQOggVUahXAzKzOtUDGZMb/Vbj rUmpLTiYHH71J6z0LSuTKhhJfA5HhTTArkDP9kxqBVHTtTXFhek9+v4lijQ1u/hVUWjE g/flAxEgGrjopW7c5h3x3hBoQ46F2IRyvO79ZvHBL4JHDzc1RQ/9JAepf2I6w8iKAeyU j41w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=9E1NJ5/8+om6Pvs/aZpwBfWtP+MVK0ozL+snc8xdaBE=; b=zK6RhefJLLRm13wLEWftG+De7lGcVawD9HMtzavhP4xcB+ousIcpqRKqkK5Ub3fTZn ri+pKbKqtiuIrv1TljAxlyz8Ie9D0JHVHhY5Eoev6Q4huRJqunn0O2KU26txvD+vNyNa 1B3V8Rdc3YpUiQzFMEGkEO0dDyNXrnlZFLfQaKuXNlPfiZeU6G+WRrVSCv5+IfYV8NSm xVL5Z6X9QoTbR0I9PutnwytM6xYxpROQnF7GdX2/C8pWvYxMjPCsU9Ok9NOjriw8O8ns KftEKHJ+bkwB355eve11V19+tdz0d8h5gEqNS3C4+JiOWIOKz64/JcN8GKViLl/9ovbF h5Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12si14964089pfj.324.2022.02.22.21.07.04; Tue, 22 Feb 2022 21:07:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233587AbiBWCue (ORCPT + 99 others); Tue, 22 Feb 2022 21:50:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233116AbiBWCud (ORCPT ); Tue, 22 Feb 2022 21:50:33 -0500 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90F3C4D609 for ; Tue, 22 Feb 2022 18:50:06 -0800 (PST) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1nMhj9-00067c-Mt; Wed, 23 Feb 2022 13:50:04 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Wed, 23 Feb 2022 14:50:03 +1200 Date: Wed, 23 Feb 2022 14:50:03 +1200 From: Herbert Xu To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, ebiggers@kernel.org Subject: Re: [PATCH] crypto: crypto_xor - use helpers for unaligned accesses Message-ID: References: <20220215105717.184572-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220215105717.184572-1-ardb@kernel.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Feb 15, 2022 at 11:57:17AM +0100, Ard Biesheuvel wrote: > Dereferencing a misaligned pointer is undefined behavior in C, and may > result in codegen on architectures such as ARM that trigger alignments > traps and expensive fixups in software. > > Instead, use the get_aligned()/put_aligned() accessors, which are cheap > or even completely free when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y. > > In the converse case, the prior alignment checks ensure that the casts > are safe, and so no unaligned accessors are necessary. > > Signed-off-by: Ard Biesheuvel > --- > crypto/algapi.c | 24 +++++++++++++++++++++--- > include/crypto/algapi.h | 11 +++++++++-- > 2 files changed, 30 insertions(+), 5 deletions(-) Ard, could you please take a look at the two kbuild reports and see if there is an issue that needs to be resolved? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt