Received: by 10.192.165.156 with SMTP id m28csp294491imm; Sun, 15 Apr 2018 23:30:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/5PxpU9EwW4QisuKGejIkRQnPaCuuLq2EejCBj8sR8QUD/umr6WfVjQcGgxhNuoNtOvtIZ X-Received: by 10.98.89.200 with SMTP id k69mr20588392pfj.100.1523860237755; Sun, 15 Apr 2018 23:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523860237; cv=none; d=google.com; s=arc-20160816; b=QgHiHXHgVlAVqvazqDBTvzsnfkPI0a1LweQ3teIfnZ7GkS75KvbgMY2Cvvqml0KsBT GFNOzWHrAqxOMPDc5Wvmu3MJa9oPe0HhMQbp/XSvMQE+gnDRgPYKljzD0K3r7/am3I5G 7+pDfw3eJVH6lFGSrJgchCAgeBqBvsVczLtCsBLiqO2x3NK7DKTWUAYji1zT1I81BTcC pyV0L4dIvhopjwQojdm5wCk8JbaxtuuT8NMKY4J6EIkB8SbIrHFrs1GAApSRAS9OVETr k7ZILQ3wIdKesiCiHqefqpDpM9u60+/8navjikv4fjxf7vuBeV5mUsxhUo1Dw7V5X/h0 gPUg== 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:dkim-signature:arc-authentication-results; bh=yvdMQCQPJYF87AmScV/IOXkvbIMXPVRmRfS2er34QmM=; b=delpk4Z+e+Ff3MY2zKERbd/YuRXkr78UNKWxNPRGyDc6At1yd4qKtkno+3TlqHitf4 xbouBr5JlZwHx4MaqIivHBQHTqMwiHxiAuIrEbaxLMS3vO1JB9DcmRYLih3W/mujQu0p E2pJ77JhEric3VCDvbHrq5XF+jvLym/HaPVy5HLh8cZp49QiGYzyrTrGVlkNtOKSZ0m7 FHzmm1T4UHXuBpP5m2ph2H19J/lYMbd6eYA3+mzYb8h0K06UfM5SvjrgQq/WQJJ3pT9w UkwhVpj518S5it2CTX1lYByf86MXfqEy+UOchaEazLLLs49oARkOlyCX+t4DOIzlqAga FLnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=C6KsDYur; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d13si9012173pgn.334.2018.04.15.23.30.23; Sun, 15 Apr 2018 23:30:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=C6KsDYur; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753330AbeDPGKt (ORCPT + 99 others); Mon, 16 Apr 2018 02:10:49 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:41900 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753301AbeDPGKs (ORCPT ); Mon, 16 Apr 2018 02:10:48 -0400 Received: by mail-wr0-f179.google.com with SMTP id v24so5360314wra.8 for ; Sun, 15 Apr 2018 23:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yvdMQCQPJYF87AmScV/IOXkvbIMXPVRmRfS2er34QmM=; b=C6KsDYur8MDijrhtYWFPbrjJdE6Uff3yOJJ1E/NAmHYoAPJ2A4C9ULWg7zsTR2TZOf Edju+brnxICHEu6rWoHCrGIi4XCoSKSrfM6mx/gZsVEyYN4syIBKxDjJgGkhvNDvAWXg MNEg6jaX9DOABJrvno4uStNeUx0aF2izrSTZ3xJEzqpWjnHPgf92YYzquONwg6smQRGt ZXvBlaC7IFONKcPHY7DXDzjZ99o2qgiq5aIoL2GvGG6s31IOIN3ZwYhta3uoh1goSSZ6 cN/S2V9kYaOgBlrgckH4/ztx4kiXx8ydqv9KXODxtkxFPriz+JWDXBd9l4yzCcIHmA0W I9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=yvdMQCQPJYF87AmScV/IOXkvbIMXPVRmRfS2er34QmM=; b=ahw+Zxhtdldnur/MHIdPnWowEBEt2a/NmX7OcYeOXLgiSc+C94vqX28YxIPQBgZzpC 5YIvfaVmzk85bwZA7u3YQHBUGSyyRsrJEXZs2VIDx8lUXM0iELnkwpnTFGNmx7zy7RAL IsjlvzhJ8EF20jh7bW3uDUGmHwD3kz7GGjXriX87PdRJGxZK1cvM7CmcUhRYgIoUQAkM 3kUWcTEfGAYTBoG+r4dFBC/P35vpShSLqE7UwnaYHBXMj9KFf0C19syQwzQ9amlhX5Tz EPgEndMeJ6DKZvbPuZNsRDQzx9U4eXxrMXWRmbmOWJtne4/b8qLR053OdXHxLe5UOinv OMQQ== X-Gm-Message-State: ALQs6tBVgOa3XRLh3+lWG9IcUt9YtBL4qL7ziQaRB1bOsK3NHiTo++cT kElZW7Iv73x21gDSmvvC3mA= X-Received: by 10.28.126.69 with SMTP id z66mr9553553wmc.56.1523859047508; Sun, 15 Apr 2018 23:10:47 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id 55sm24289882wrw.52.2018.04.15.23.10.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Apr 2018 23:10:46 -0700 (PDT) Date: Mon, 16 Apr 2018 08:10:44 +0200 From: Ingo Molnar To: Joao Moreira Cc: kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, x86@kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, gregkh@linuxfoundation.org, keescook@chromium.org Subject: Re: [PATCH 1/4] x86/crypto: camellia: Fix function prototypes Message-ID: <20180416061044.z6eb4psw2sbszemb@gmail.com> References: <20180415041542.5364-1-jmoreira@suse.de> <20180415041542.5364-2-jmoreira@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180415041542.5364-2-jmoreira@suse.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Joao Moreira wrote: > Convert the use of 'struct camellia_ctx *' to 'void *' in prototypes of > functions which are referenced through 'struct common_glue_func_entry', > making their prototypes match those of this struct and, consequently, > turning them compatible with CFI requirements. > > Whenever needed, cast 'void *' to 'struct camellia_ctx *'. > +static inline void camellia_enc_blk(void *ctx, u8 *dst, const u8 *src) > { > - __camellia_enc_blk(ctx, dst, src, false); > + __camellia_enc_blk((struct camellia_ctx *) ctx, dst, src, false); > } I don't see how this is an improvement: instead of having a proper type there's now an opaque type and an ugly (and dangerous) type cast. What does "compatible with CFI requirements" mean? Thanks, Ingo