Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp711248ybz; Wed, 15 Apr 2020 17:15:44 -0700 (PDT) X-Google-Smtp-Source: APiQypLH5r5IXLGuMQe5vGiFTgy3P3Pn/C1pqnmf5I4aPK4vByj4KDybKuRVuj/c2VdCjpHmKWUp X-Received: by 2002:a17:906:a857:: with SMTP id dx23mr7481885ejb.52.1586996144259; Wed, 15 Apr 2020 17:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586996144; cv=none; d=google.com; s=arc-20160816; b=hDXhkB/sGpgqe4PAr8h9u9EKfFMB2gcutL7FPnw+wyIZlFC/Q12D6JdvEhqLLThRA9 1778hK9g08kWLD+n/PxloxbMQ1tTA7oUplpjHCvltwd712UBc+4ZWvXBvMZ4Y07KlyyF InKEhv4IBt46YK98JV9oYimjsocAqq8gr9LcFdk4GwzfBli9bJL1h9jeg9CdMpS88yQo EYUqKTJq/Ya1zcqj7Xp1Y4q3CmN4B+A/HPqADp+QymW4hAnfygrv6rg3yMgY8V/4I2SI hF3xCPmqNr/Bc3IoBxSTT1IAtJwIYYJOVvVekNh62TPRZIUlZjUBhJwR5v0/Ou7qVrCd lVJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=W+ikqrmBIBEKvVkXBn0UllA+OtUbb2X28KHF+kd9Sus=; b=ThPTWlj4poOG/2uE/wfdnQszqRBQDfthxtYtPgsvIoWsvq0qNbI1UwyEyO9OJXGGN5 n82XvDj1GWFuy8ci3HakOzuFC2EtYZEAwkp69cSI8ga7AxVMOHqomoItDRGZRzeVUAHN HXjgQTklEQgLHuwNOGIKw31cuJLjlyqqRbJ9UWBHWLTAWoEVS4enkt4WHQpv+5OrfmEH 4YRD324gcMZufXKood89L2qEugYSj9ztoAzWJX61w6f2OCDhQ7itF3YgjoOBQDR8t1v0 wfDne1NljfR8KXkhnJGwAtShoj+9c7cy8Zl1xL4l2O6IZRuoNE43t5wiWzzsfH16dVV3 dtJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AKVoTgD+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z90si4853838ede.477.2020.04.15.17.15.21; Wed, 15 Apr 2020 17:15:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AKVoTgD+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1414888AbgDOPov (ORCPT + 99 others); Wed, 15 Apr 2020 11:44:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1414848AbgDOPo3 (ORCPT ); Wed, 15 Apr 2020 11:44:29 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8A01C061A0E for ; Wed, 15 Apr 2020 08:44:28 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id a23so149549plm.1 for ; Wed, 15 Apr 2020 08:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=W+ikqrmBIBEKvVkXBn0UllA+OtUbb2X28KHF+kd9Sus=; b=AKVoTgD+v3LRySKFXD0u43wjuBan3xtaU0vntmRP548nKCKRJn0SCAgfW2hl+sug79 xeeqyfuxOZgKSwZexJXDW24RXk+8RRO3rl1fPT5DUYrHkg6LRxn2QntT1+3CxgcBplIQ PlGTKYDsfv4jrzvd5bekUSg8KqL742ven3KBA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=W+ikqrmBIBEKvVkXBn0UllA+OtUbb2X28KHF+kd9Sus=; b=ouiW6oWJX0rIfzHgNMjt54tDdKEvrDzbB85Y7mSkC0HwoLnaFj8QzNlybundbBtiX0 VbRBTJ/L61bzE6EJSfw4vmH2PiXbw1QNYT7hdFNvwPPDcMceIOH0XFWvgKK+wLetyuQA krqg1PtUXUGMAG23H3qwOmodGpQnjY6JVjgwBiqZEyAYidhGBkoZUxrX6wjwAhE7At7Z mRkk5sDJ33jvZ6pfVKOUsNIeqgWy5WxwW36xHt9O1CCj5bjUmLlESxGacxvuvDqJUWvF q8/zZAGmnvkD0Gu/M9hTWwTITC358vLKAOtxYqGcUr7mUNzOcnGEbSglo0QT9tOYMXg5 012A== X-Gm-Message-State: AGi0PuYbcEVHAOwXNbBZnmPJ/PzD7rqJBM8IVCELiQByRH+Kjf68w160 Cf/h8F4Bl7xYM4bMN4ed+JHj/A== X-Received: by 2002:a17:902:9b8f:: with SMTP id y15mr5654954plp.169.1586965468363; Wed, 15 Apr 2020 08:44:28 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f30sm15052172pje.29.2020.04.15.08.44.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 08:44:27 -0700 (PDT) Date: Wed, 15 Apr 2020 08:44:26 -0700 From: Kees Cook To: Ard Biesheuvel Cc: Nick Desaulniers , Kristof Beyls , Stephen Hines , Luis Lozano , Russell King - ARM Linux admin , Arnd Bergmann , Jian Cai , Linus Walleij , Peter Smith , Stefan Agner , David Howells , Mauro Carvalho Chehab , Manoj Gupta , Benjamin Gaignard , "Joel Fernandes (Google)" , clang-built-linux , Ilie Halip , Masahiro Yamada , Krzysztof Kozlowski , Bartosz Golaszewski , Sami Tolvanen , "Eric W. Biederman" , "Steven Rostedt (VMware)" , Jian Cai , Doug Anderson , Dan Williams , Linux ARM , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , Patrick Bellasi , Masami Hiramatsu , Tejun Heo , Andrew Morton Subject: Re: [PATCH] ARM: do not assemble iwmmxt.S with LLVM toolchain Message-ID: <202004150833.E2E9A89E0@keescook> References: <20200409232728.231527-1-caij2003@gmail.com> <20200410123301.GX25745@shell.armlinux.org.uk> <202004141258.6D9CB92507@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 12:32:17PM +0200, Ard Biesheuvel wrote: > To reiterate my point: I strongly prefer minor asm surgery over > elaborate Kconfig plumbing if it means we can retain the functionality > even when using LLVM tools. In particular, the use of macros to > implement missing ISA support should be considered before any other > solution, as these are already being used widely across architectures > to fill in such gaps. Yeah, this seems like the right place to start from. It sounded like there were cases where the people with knowledge needed to accomplish the macro creation were not always immediately available. But, yes, let's get iwmmxt fixed up. > This code has been around since 2004. It has never been possible to > assemble it with Clang's assembler. So the only thing this patch gives > you is the ability to switch from a .config where IWMMXT was disabled > by hand to one where it gets disabled automatically by Kconfig. Right -- I meant "let's fix iwmmxt with macro magic" not "let's disable it". I did want to point out the Kconfig disabling may be needed in other cases. > So what hard-won ground are we losing here? Did IWMMXT recently get > enabled in a defconfig that you care about? It's a CI's ability to do randconfig builds to catch new stuff. (i.e. where "disabled by hand" isn't part of the process.) Since there are multiple CIs doing multi-architecture builds we need to get these things fixed upstream, not a CI's local patch stacks or Kconfig whitelists, etc. And when the expertise isn't available to fix arch-specific stuff, Kconfig negative depends seems like a reasonable middle ground. I, too, prefer fixes that allow Clang to do its work without wrecking things for GNU as. > I am not disagreeing with you here, and I have worked with Nick, > Nathan and Stefan on numerous occasions to get Clang related build > issues solved. Yup! Totally; this thread just looked very familiar to me from doing treewide stuff and I didn't want what I thought looked like the core points to get lost in the details. :) -- Kees Cook