Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7126058rwb; Tue, 6 Dec 2022 01:16:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf7k51mJFClPCqGaQyGdlWeSV4hQjK887yi/8xjp1vy+RLVBnKC1lEp5heyJGM1dFYryXaL8 X-Received: by 2002:a17:902:e5ce:b0:189:d2df:ea23 with SMTP id u14-20020a170902e5ce00b00189d2dfea23mr9983710plf.10.1670318215711; Tue, 06 Dec 2022 01:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670318215; cv=none; d=google.com; s=arc-20160816; b=uVHDLYfBiMYNGqXHHS6hoP1DKIgLyRu1cwfjnlT1WA8U0F7UNMk3HYfEHaPib1piu4 /XqCBFIHbr577KsFKLGhtB+X93zh1uX71H3Bz9eVNp0eu2lQs+eA8KU/dXAhVYHKVN3i Z7a14Pq5hhEbbO2osPIGruf5A41dTkJt9BCMMlj1qFFOA/B7hDzZme3V/Jb9ZRM8ZJMD g5FafbTjzwCBiu0/tWOpwrGTh79cZ6ro8enJFN2TKpAet9mBDayb9SaDIMIIKOYJflJm w1yXN7Dv45RJ3SEIVNop2O+Ggz0pDtMtHP98HoHh5vw7elrBN1KR8x4pog8+TH2vhcr+ sFvg== 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=yIwQYk/IR4Xdy72t9Qjjgo0E4FMXtfrJnEmCjAoXcOY=; b=wU2aFMt1DpzkiTfRLXj3co2KBvdbn57682ufKpJGa0wOl3Ol7QVgvcDmBU1bnJumOn GfchJoO8Yp1HxISzomyew6OLfqmmQrLIycDKeYGCN3v7qEdYxt422pmZ14cy86JeAluI omFbiqbT+fg9uClbi0oAZ9dkBE6nHFqsS2r67kGg+xrZO2PO6fM6IPBoiKRHuqO0vfJp TlEY6a19WzZgXEOsjAPgr3jS04hRretHm9uYaOZi04j6z3DEqdlAL7ujU3fxRWluf/Yc xPlNEgqQ2u9JO0lB5lUdndnlozoatOE5sKavPTaJHf2haDI2xg/C+DK7WYhQ/aZME+DZ 80fQ== 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 i185-20020a6387c2000000b00478add2c2a7si6589465pge.648.2022.12.06.01.16.25; Tue, 06 Dec 2022 01:16:55 -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 S234292AbiLFJHN (ORCPT + 99 others); Tue, 6 Dec 2022 04:07:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234227AbiLFJHN (ORCPT ); Tue, 6 Dec 2022 04:07:13 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C57D2BFD for ; Tue, 6 Dec 2022 01:07:11 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1p2Tuu-004P1A-Qt; Tue, 06 Dec 2022 17:07:09 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 06 Dec 2022 17:07:08 +0800 Date: Tue, 6 Dec 2022 17:07:08 +0800 From: Herbert Xu To: Markus Stockhausen Cc: linux-crypto@vger.kernel.org Subject: Re: [PATCH 0/6] crypto/realtek: add new driver Message-ID: References: <20221013184026.63826-1-markus.stockhausen@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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, Dec 06, 2022 at 09:59:49AM +0100, Markus Stockhausen wrote: > > const struct rtcr_ahash_req *hexp = in; > > hreq->state = hexp->state; << *** maybe unaligned? *** Try const struct rctr_ahash_req __packed *hexp = in; This should tell the compiler to use unaligned accessors. > Comparing this to safeexcel_ahash_import() where I got my ideas from > one sees a similar coding: > > ... > const struct safexcel_ahash_export_state *export = in; This is equally broken unless that driver can only be used on platforms where unaligned access is legal (such as x86). Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt