Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp24517lfe; Fri, 15 Apr 2022 17:43:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyD9vV06OX4ni41igIusjXP/4QuTyaerjYxL1l0sIHgaRWIYJpThg0fBfHJld+tWJqkaDP X-Received: by 2002:a17:902:cf08:b0:151:9d28:f46f with SMTP id i8-20020a170902cf0800b001519d28f46fmr1443468plg.53.1650069787981; Fri, 15 Apr 2022 17:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650069787; cv=none; d=google.com; s=arc-20160816; b=OAkPshO9vQH+S2wxo0uBmOmDZM0sTAtizSUhsnZoLkIx+s7O4srJyn/3tGDh1404l4 V3r607IEeTOU2f/fevOabD9iaaURFCvIULaaH+xLfBwKBUKdu98siiYtubbuhgpny77u eVsv+AteeCgRXe2i8uZFjxL8DEbxW3kqSg4dtK1/Nlzd9gPRNlb4tLt2Fcy5zCRY1Glb YzxgyhD7yELlGF5lcQDOeB+wV3R+Ukc+EQ1G2tgFIrhOAiGbO5rwhshVvvWEt50IyXXg iVZKS0nt7s6luanZtlIzgRnBJ5sQrLlx21s6/o+j5xsLO0HnixVBLG4xThQ4eCBNQUWM ZcwQ== 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=3ULSaxPurhnJO15Fn6X/7h0qnqn1oEO+6YlvuIuPhf0=; b=pOHml3DQiwR4nlfFh+DtQ12e1FrT4dsQOLKehSVuZQ9YSbioupyrP88iGGMPhTFS+O lo26ugEQPBVehLoUw0V6KYfdoKlswIrLCh/4uPHgP/FgwDFsOR+L/GczspT18ILzJEoU VgYtgOXBskmwFmp2US2GLLUv61kFM1iv6XGSGSIN1/CByI2kDHzRvsQ/ZwgJVVaXXtXX anmXhkhvKrEtDpcZyIxjSC4ytFvAXSk5ZJh0hU1Ga08iR5wp2O7Nd5mKYmdd8fSocaYh v05uaonq3tPDuevftC6jbtMATH/xDA1ESmdKq31F4S1+YnCcXNaWUM/UtiDigHrxU0xZ 1Rag== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bq13-20020a056a000e0d00b004fa3a8dffd1si2759480pfb.136.2022.04.15.17.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:43:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6D75126AE6; Fri, 15 Apr 2022 17:34:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351255AbiDOHyn (ORCPT + 99 others); Fri, 15 Apr 2022 03:54:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbiDOHym (ORCPT ); Fri, 15 Apr 2022 03:54:42 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE21E972D2 for ; Fri, 15 Apr 2022 00:52:14 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1nfGkE-003DzD-BD; Fri, 15 Apr 2022 17:51:55 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 15 Apr 2022 15:51:54 +0800 Date: Fri, 15 Apr 2022 15:51:54 +0800 From: Herbert Xu To: Ard Biesheuvel Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , Linux Memory Management List , Linux ARM , Linux Kernel Mailing List , "David S. Miller" Subject: Re: [PATCH 07/10] crypto: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Message-ID: References: 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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org On Fri, Apr 15, 2022 at 09:49:12AM +0200, Ard Biesheuvel wrote: > > I'm not sure I understand what would go wrong if that assumption no > longer holds. It's very simple, we don't do anything to the pointer returned by kmalloc before returning it as a tfm or other object with an alignment of CRYPTO_MINALIGN. IOW if kmalloc starts returning pointers that are not aligned to CRYPTO_MINALIGN then we'd be lying to the compiler. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt