Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1835669ybn; Thu, 26 Sep 2019 02:59:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXNpEo0e754+t9foBRgLs39gTafBYe7evzKg2llYzYWcZZ4uioxgBQ7BP/VW2jRw4fyKnH X-Received: by 2002:a05:6402:1251:: with SMTP id l17mr2573302edw.270.1569491965052; Thu, 26 Sep 2019 02:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569491965; cv=none; d=google.com; s=arc-20160816; b=m15UDVVd0R4bjIq1dMjM1tW+xCfQ/njIQ4xHIedAMOB8ChaJuLpVO/8c74ybt1/oPA tWWBhyHuDohA/4Gvb1wngLMD11DYFkSGMrP3GwvyDwpyPulNuomtGu63UAchkTadjAOY u45STOSnSB//okM7+PFBh5k0Yo19wOOjxKdWJfmTYrJs5O0l4JIS+E6X7ooM+zNWq7KU Ng5v4a0Rse3RiAAnXWukStk642pZFn74ssl1H7U9Dxc0/Eo+WRRzYu2d7FMyg4DjPMlL 86hIVm+sQBGRqZvTNBbklafcwlLnqIlQ0IfKdxrUnMbY1GRwXEYsGlDgRHXdrMX2ovp4 E0kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=V7YzOVzGpdhxsAdmwy0xS3DmtYyZj7aWsqnxFjthGFc=; b=Vc7/UkSLV07Ym+/yXmZvGoXMNtpPmm2aMzHR9TmVTB07UW0F5AyoKv/4inDK5jM5SH kg32OoJ5rLMRIz057uQk09EORfTOd0oL5uCBtR6bQ+shRkTAJLdCmNKGYy05K/9514OM RRCAzMxCXdfcdgE+XLdf14cma3pzRh4fQpkyN/vx6YDoUaKFY5ml8L7aZgpKynAHEfRE L0ORGtskQi98rValU/iuTc4KP1P7/zqBiLoziZ7KPUgqq6ESwNNlqzK4nNnDr1RvYHEl 7vBVFy91VoQT4BVrV8E9AZZvPH4DPsfarfvW3INQdajgemec9K0ybIsjBLuiJdG+M2jY 5c+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IqaKJoMO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24si885883edy.417.2019.09.26.02.58.59; Thu, 26 Sep 2019 02:59:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b=IqaKJoMO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725813AbfIYVTi (ORCPT + 99 others); Wed, 25 Sep 2019 17:19:38 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35013 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbfIYVTh (ORCPT ); Wed, 25 Sep 2019 17:19:37 -0400 Received: by mail-wm1-f65.google.com with SMTP id y21so283978wmi.0 for ; Wed, 25 Sep 2019 14:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V7YzOVzGpdhxsAdmwy0xS3DmtYyZj7aWsqnxFjthGFc=; b=IqaKJoMO5a38/jY9fU9cblH8HPi6GO9JpL0xjFCfIEhxR/LsbfLENFFYitNEVTiJ0p oH84clwPp8CYMies3vcW680s28VrIYdBXYSdySTp5S+c1yOxAbGUWhbEAecfpVZgs8r+ 3/3W6IEKHNuVei/kaJ15XKZjVqHJq4ZqiTZ5G63GWhhmcx5Pdh8B7Gqj23UnjdMWxt5f CWWObwM5dlWcWFKhkKhY40P248B/6/erylQo2oHEOSZ723m8ldTlz+vMxcnSCR7ZpoVR XjXUsR6Em/jLUMuYPsbogDZ5bX4TQrcTkQra1YppWFCQKgyxJgZ35cL4raMTUrvrUq0M 4mjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V7YzOVzGpdhxsAdmwy0xS3DmtYyZj7aWsqnxFjthGFc=; b=Eeqf6djc6Phq2fQLcQpv79JY0TcnM5Kz0YOAwJCcR5tIGxXEJTssAfk4rWVgYbVUIy aXPQDYnzG6gA0jQE/EXVQbW5UO7T5lXBBG+9TMUb+tMz1EWZNBd9KK5q9zm+cYTnga8I oNgvZMK67NpsjEHOpehgLYTtMdCN25dENTDwPa1dhcjPZ9e84MUn5sLgn4AXLVvXw4Ju FeAkxRZwe7nZZXCPbzINs1JqxLtfECXI+VUy3T4PsELZ17RCe1ejNd/AvvVr2AkmAlc8 mt2OiM+MVDrDmiTSdz5NB7k6E+VzfUauvBbu7FqEZcEhomF2EA0rTIXE7wpfMeO93AE2 7OkA== X-Gm-Message-State: APjAAAVghYRR26Jc0r4oTQkqfUvrzL8uc5nEWE5Y36bsymQkaSmqEuQl 8u3ar0p3Qh6sItoRUMJgsboPYyrRXR5EqDHvBUpjXA== X-Received: by 2002:a1c:3cc3:: with SMTP id j186mr156255wma.119.1569446375423; Wed, 25 Sep 2019 14:19:35 -0700 (PDT) MIME-Version: 1.0 References: <20190925161255.1871-1-ard.biesheuvel@linaro.org> <20190925161255.1871-12-ard.biesheuvel@linaro.org> In-Reply-To: From: Ard Biesheuvel Date: Wed, 25 Sep 2019 23:19:22 +0200 Message-ID: Subject: Re: [RFC PATCH 11/18] int128: move __uint128_t compiler test to Kconfig To: Linus Torvalds Cc: Linux Crypto Mailing List , Linux ARM , Herbert Xu , David Miller , Greg KH , "Jason A . Donenfeld" , Samuel Neves , Dan Carpenter , Arnd Bergmann , Eric Biggers , Andy Lutomirski , Will Deacon , Marc Zyngier , Catalin Marinas Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, 25 Sep 2019 at 23:01, Linus Torvalds wrote: > > On Wed, Sep 25, 2019 at 9:14 AM Ard Biesheuvel > wrote: > > > > config ARCH_SUPPORTS_INT128 > > bool > > + depends on !$(cc-option,-D__SIZEOF_INT128__=0) > > Hmm. Does this actually work? > > If that "depends on" now ends up being 'n', afaik the people who > _enable_ it just do a > > select ARCH_SUPPORTS_INT128 > > and now you'll end up with the Kconfig erroring out with > > WARNING: unmet direct dependencies detected for ARCH_SUPPORTS_INT128 > > and then you end up with CONFIG_ARCH_SUPPORTS_INT128 anyway, instead > of the behavior you _want_ to get, which is to not get that CONFIG > defined at all. > > So I heartily agree with your intent, but I don't think that model > works. I think you need to change the cases that currently do > > select ARCH_SUPPORTS_INT128 > > to instead have that cc-option test. > > And take all the above with a pinch of salt. Maybe what you are doing > works, and I am just missing some piece of the puzzle. But I _think_ > it's broken, and you didn't test with a compiler that doesn't support > that thing properly. > I think you may be right. Instead, I'll add a separate CC_HAS_INT128 symbol with the $(cc-option) test, and replace occurrences of select ARCH_SUPPORTS_INT128 with select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 which is a slightly cleaner approach in any case.