Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp182052yba; Wed, 8 May 2019 18:40:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz+TX/jvU3/SkbLiX2iu2Xpv97rXhWeqHyJ9lt3SRU8/OIV2kDm+IZA3rbpwNIHzApdpeP X-Received: by 2002:a17:902:9689:: with SMTP id n9mr1454432plp.133.1557366036837; Wed, 08 May 2019 18:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557366036; cv=none; d=google.com; s=arc-20160816; b=jt517492laqXhUYj8cqYN6Du/j/JSlS+/50SLGTof6W3FYpB/3iHpM/X/5QeU+Lx/C 2cPnXyw26Ua08f0db5egzXEKMqREgL+J4Epuet9lByleoKkHigHj7MMVgdHlEdIsX1+1 weu/fUTF8jrNici7wDa9pFDuIDrHA8eVZWqaGAIYJyBRVOqUX+jigI9+Ep7ofgK8G4Ao GdlCgclR7mHVMnACWTW9Np4hndjCGP8+mg5STVNczwHeYNLCwwbqDYwDPSUrYj/aitex Abb/xq/pVy4Kie+5PYUNsISxuyCSuSzz/xyB3fKx5pifM8zRCE6WakIaHBy/aLUgf/L/ 9kbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zV20VJ4pELQ0PHbc1LhnPtRQ5k+X9ZVdfiv1uJS6xmU=; b=Bnxk7eiWdVNuP7Tf+CA87FN2OJRM5eWJeLs1mScqz8li46Z5rLY3IV5PtFWvGdKBts HLTNeq6W5vbAxZrN2Oc0Xk18bHbcrJK+5Cupguuac11ChNxhUXrsJdfXlgoNYSRs0TK5 VTDehhfQvKz9+cpUeyi9+B3xn6BlFouxAkGpXrV38iNGkDUoMRmume4lZhZzxCup59SI 9YcY31UKkjnJJCTOw58LiKowSixtWwJaQPj6UvnNvoqvx+IaPaKSVhX1ZyPj5e42ByG7 /Upp5Z5OLwssE7F16m1tDXxwEyS7NGequYKnq5aofRzqZYHkCnChV5e7fwA/5PiP64FE 4ihQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si935393pgc.98.2019.05.08.18.40.09; Wed, 08 May 2019 18:40:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726254AbfEIBjW (ORCPT + 99 others); Wed, 8 May 2019 21:39:22 -0400 Received: from [5.180.42.13] ([5.180.42.13]:51998 "EHLO deadmen.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfEIBjW (ORCPT ); Wed, 8 May 2019 21:39:22 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hOY1e-0007Vz-6G; Thu, 09 May 2019 09:39:10 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hOY1a-0006mz-3p; Thu, 09 May 2019 09:39:06 +0800 Date: Thu, 9 May 2019 09:39:06 +0800 From: Herbert Xu To: Kees Cook Cc: Eric Biggers , Joao Moreira , Ingo Molnar , Thomas Gleixner , Borislav Petkov , X86 ML , linux-crypto , LKML , Kernel Hardening Subject: Re: [PATCH v3 0/7] crypto: x86: Fix indirect function call casts Message-ID: <20190509013905.d3oflhz44lnqukzz@gondor.apana.org.au> References: <20190507161321.34611-1-keescook@chromium.org> <20190507170039.GB1399@sol.localdomain> <20190507215045.GA7528@sol.localdomain> <20190508133606.nsrzthbad5kynavp@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, May 08, 2019 at 02:08:25PM -0700, Kees Cook wrote: > > For example, quoting the existing code: > > asmlinkage void twofish_dec_blk(struct twofish_ctx *ctx, u8 *dst, > const u8 *src); So just make it asmlinkage void twofish_dec_blk(void *ctx, u8 *dst, const u8 *src); and you won't need any of these casts. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt