Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp709444ybz; Wed, 15 Apr 2020 17:13:21 -0700 (PDT) X-Google-Smtp-Source: APiQypLllh4Y+J+xNQUo8cFVjpSOdmsGkdKdYU7OPUGHoYzge2CQeO/Kup2VNsV3fI33IylABKHF X-Received: by 2002:a17:906:310e:: with SMTP id 14mr7589233ejx.177.1586996001175; Wed, 15 Apr 2020 17:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586996001; cv=none; d=google.com; s=arc-20160816; b=WI4KyNlrtdm80lLB7MOxGCiNOU9RXc/i5QooayhCYAC/YL+E+yXGwYGfLvCKWBpkDE hsYqK0tNBA1STvhkMRsyfO44XtK57WkzDRUAlI7cniDX62Z962PiXHL0BH/GhsB2MaFX 9RNOTUQNkVQYX/uqW5pX7xDq/ppXR2dLwT8lBThGUyJco8DzjLTwovQ2EbkuYfhhhXll aD/EwVFM6jW+DRtOKhe6e2aPpgIHljlIvlMKDXEUZ2CalSMF00djrFaIPflZqxgpBIdo 9Pb5gnsypNjXL0MAaIVSwVvH/cUZiO+wPd5G/hxyTtLcWDP68JIBqQFCG93kiQg1BmvT bOmA== 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; bh=Q6y0RY1r/bsSQu1Pjhp5jZO0J0vCNZAdOGGiFado0tg=; b=IQHaCYij4WrtEzJGUVa6yL6kp4iYRYscIdDNLDazR7cLIe+u4ZiRBAg846w8ErVf8q vui2uIAEoRIbj7j/eU3ojJhkjDqMPCJ2hqcpLqYQMe+1L1gScjqtumMZUaq6eUopqfD7 8X5aysjzrKHHBRhFL9X8ZW2m5ANWkcR6CHEGzouTJnn//UvbdHFkKFh5Gab3pdNPOiYZ CM0v84Mhw7WWd/ASxYHSdOCi5eb0hODAkz5pVNCqv/ygNO8N2ekBR6hvnOJq10wYSW69 1YrbQMEvUx0uDbs/MHbSSF9f9KRPosSKzh4mxx9M4dSaQJ9ohqwOvI6yK3/gPIVZ52Em 0JTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=ZeyHf1lp; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw20si11942840edb.53.2020.04.15.17.12.57; Wed, 15 Apr 2020 17:13:21 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=ZeyHf1lp; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388669AbgDOOqN (ORCPT + 99 others); Wed, 15 Apr 2020 10:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S370934AbgDOOp7 (ORCPT ); Wed, 15 Apr 2020 10:45:59 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E21EC061A0E for ; Wed, 15 Apr 2020 07:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Q6y0RY1r/bsSQu1Pjhp5jZO0J0vCNZAdOGGiFado0tg=; b=ZeyHf1lpXQg+EMSv8Vfok/G9o ZJsoZldDhcd6jFsf4UKnLOBvEET5e+YndugH+ve6UE9kS3I6DjJnt9fQ6bFucg/hQSUbxYDgjM8L4 RfzeXUZsn4k5GYAnWSSXOyTfqeW9tYzbrl7DusejqBnJRx9iLtpXjR8y6QbNvmEkrRIk+9zjB3/3D Qa96b5KO8niSZzlk9xmx46bCcUUMamdj/tYa7a1rCQAuR929SCG92lC6s4pUhsB7RgbTMkfQiUw4A R/ma6qh3WlWcb7GV2eZ9M0ICpTExfS2QpQFni+2bGeYsQDAwxXau45RDDpGhahCehnKArAFi5K/KK cYCHjcxag==; Received: from shell.armlinux.org.uk ([2002:4e20:1eda:1:5054:ff:fe00:4ec]:46312) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jOjHj-00071l-VP; Wed, 15 Apr 2020 15:45:04 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jOjHW-00010F-Ku; Wed, 15 Apr 2020 15:44:50 +0100 Date: Wed, 15 Apr 2020 15:44:50 +0100 From: Russell King - ARM Linux admin To: Arnd Bergmann Cc: Ard Biesheuvel , Kees Cook , Nick Desaulniers , Kristof Beyls , Stephen Hines , Luis Lozano , 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: <20200415144450.GF25745@shell.armlinux.org.uk> References: <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: User-Agent: Mutt/1.10.1 (2018-07-13) 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 02:58:05PM +0200, Arnd Bergmann wrote: > On Wed, Apr 15, 2020 at 12:32 PM Ard Biesheuvel wrote: > > > > On Tue, 14 Apr 2020 at 22:53, Kees Cook wrote: > > > > > > I don't know if this will help, but I feel like folks might be talking > > > past each other a little here. I see two primary issues that are > > > colliding, and I just want to call them out specifically... > > > > 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. > > +1 > > > > What's a good middle ground here? For VLAs, I ended up getting akpm's > > > help by having him add -Wvla to his local builds and send nag emails > > > to people when they added VLAs. That's not really a thing here, but it > > > seems like there should be a way to avoid losing ground (in this case, > > > it's the erosion of attention: repeated known-issue warnings means the > > > CI gets ignored for the warnings on newly added issues). It does seem > > > to me like adding the negative depends is a reasonable first step: it > > > marks what hard things need fixing later without losing coverage for > > > things that can be more easily fixed now with available resources. > > > > > > For the specific iwmmxt.S case, perhaps the solution is the suggested > > > changes? I imagine it should be possible to do a binary diff to see zero > > > changes before/after. > > > > 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. > > > > So what hard-won ground are we losing here? Did IWMMXT recently get > > enabled in a defconfig that you care about? > > I mainly care about the build testing aspect here, it seems we are getting > close to having the clang integrated assembler working with all .S files > in the kernel (it used to work for none), and I'd like to do randconfig and > allmodconfig tests that include these as well. Disabling the option works > for me, but your suggestion with the added macros is clearly better. However, to me it seems the approach has been "clang doesn't like X, the kernel has to change to suit clang" - sometimes at the expense of either functionality or maintainability of the kernel. Some of the changes have been good (provoking modernisation) but that's not true of everything - and I see nothing happening subsequently to rectify the situation. Had we gone down the path of disabling the build of iWMMXT, if anyone builds a kernel with clang for ARMv5 PXA and relies on iWMMXT, their userspace suddenly breaks because they used a different compiler and lost the necessary iWMMXT support in the kernel to allow userspace to operate, which isn't a nice approach. Using macros is the best solution to work around clang, but should not be done at the expense of GNU AS which has proper support. I'd say this: if clang wants to support building ARMv5, then it needs to support iWMMXT and stop forcing the kernel to adapt to Clang's incomplete implementations (which are no direct fault of the clang developers.) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up