Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp650293ybz; Wed, 15 Apr 2020 15:58:17 -0700 (PDT) X-Google-Smtp-Source: APiQypK6P7yyj+MM1MxfQB34vF2xl6H+SGsJWp579zUygCn3oCvAIA5+vBYEaMw6to8+x7i/q8EQ X-Received: by 2002:a17:906:2458:: with SMTP id a24mr7041974ejb.239.1586991497001; Wed, 15 Apr 2020 15:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586991496; cv=none; d=google.com; s=arc-20160816; b=HEbrTK/LoxGD2sFe4NfMYLQ7tuH5a8C5ZgTCg7XtDYlewUocYbLTeG1+eYlbm1jcVa r3wrPMY7xWDMEPRAvsRJJQaBlgNrl6NkTX2pMGRbd4W8wHRVs6CPZzENs2lSOZalXOzR bMChDayVc08cum/ra6feEx4tyT8wNqhqbGgtl1IZCkP71wMZ20+KN4xPAENvG4LxaM4C j2FntR4q/+EMaJw3UAnS+aC1449lAq9o0npgd7GC7XO/aWxcMI7oFmBkL2zUVINYPbQD TGkf9HL4SZvSI6d0/doFScEDPbnOY2s3LuiZspBGtYOXYkR2aktpkIQ4IEOjrJzhuOiE 3I5Q== 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=1QEnH+xp2l8BKjhMd6pNhXxzfc2f51HEgatkC1XSQGg=; b=DFbwqvN8YVm83FAmLHbJICcKHVCuIIZt4yUH0ps2c6S8IKrMCPgmg6WBU64CIg8Wqj turWvz/D0ZMma/xdNwusyWHMYiBqZR3FXDLqvFOZ1OxtZXl0E1X6RFxWgKbrO/zz3NBW GEl4Um0QWf9wLnDxV+WvMZZtH/2YhszUgtavcT2ZTJTgfKD8Y6xa5X7f9qEC2cnbRaxN R3wIjvBs14Y1MMvJuuG24wPPa4PHied8IPV8KDLBBePjXJo5vMszSY4OgqgyP8ZjNbwC lLr/LZGWJpZEaeU28dfEIQMsji+zgN0TiQ/zcM07ft+ouLnUYPhbfjl4JuzLRJX4P95s yz1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IDz65g7U; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gh8si5768607ejb.301.2020.04.15.15.57.53; Wed, 15 Apr 2020 15:58:16 -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=@kernel.org header.s=default header.b=IDz65g7U; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408730AbgDOKfG (ORCPT + 99 others); Wed, 15 Apr 2020 06:35:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:34842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408675AbgDOKca (ORCPT ); Wed, 15 Apr 2020 06:32:30 -0400 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 392C621734 for ; Wed, 15 Apr 2020 10:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586946749; bh=77bP08nDJwkuMBIczKe44qfyWWYykJVxclcbNqH4VLE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IDz65g7Uaxp34zLubiGGNINQl8Jm03rAZA2ZyB+IlE2uEO2sehJaeH63vh5UpIkZG pHhO9kpbU0QWTmsz5X//QAbGduHTHEYv0YJJYZfCe1mvdIA6oy3VlSG+1FZETwno0H m+UhGCFNWmVD8PjIlaOywMttsl5+nUkwievYMBR4= Received: by mail-io1-f53.google.com with SMTP id u11so1000634iow.4 for ; Wed, 15 Apr 2020 03:32:29 -0700 (PDT) X-Gm-Message-State: AGi0PuayFkYGD/eZPrMjK6LGZEg59R/tDU+JQHm6UbYsvekM1pf1oWxL WUGTpK54W7+x3cuJ5Ig4GUrvXb1CmrZxEwZByGU= X-Received: by 2002:a05:6602:1550:: with SMTP id h16mr25731080iow.171.1586946748454; Wed, 15 Apr 2020 03:32:28 -0700 (PDT) MIME-Version: 1.0 References: <20200409232728.231527-1-caij2003@gmail.com> <20200410123301.GX25745@shell.armlinux.org.uk> <202004141258.6D9CB92507@keescook> In-Reply-To: <202004141258.6D9CB92507@keescook> From: Ard Biesheuvel Date: Wed, 15 Apr 2020 12:32:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: do not assemble iwmmxt.S with LLVM toolchain To: Kees Cook 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... > Thanks Kees. I don't think there is a huge difference of opinion here, and I hope I managed to strike the right tone, which was not meant to be a grumpy one. 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. > On Tue, Apr 14, 2020 at 1:59 AM Ard Biesheuvel wrote: > > On Mon, 13 Apr 2020 at 22:45, Nick Desaulniers wrote: > > > 1. continuous integration and randconfigs. We need CI to help us spot > > > where things are still broken, and help us from regressing the ground > > > we've fought for. We can't expect kernel developers to test with > > > LLVM. Currently, we have LLVM builds in numerous kernel continuous > > First, is this one. To paraphrase, "we don't want to lose hard-won > ground." > > > To be honest with you, I don't actually think iwmmxt is that > > important. But I have already demonstrated how we can use a couple of > > macros to emit the same instructions without resorting to bare > > opcodes, so there is really no need to disable pieces left and right > > because the Clang assembler does not support them outright - it just > > needs someone to care enough about this, rather than rush through the > > list with a tick the box attitude, and rip out the pieces that look a > > bit too complicated. > > The second is this one. To paraphrase, "we can just fix things instead > of disabling them." > > This feels a lot to me like the pain I (and plenty of others) have felt > when doing treewide changes (adding full compiler support is kind of a > treewide change). The above two points were really strongly felt when we > were trying to remove VLAs. In our case, we didn't even have the option > to disable stuff, so the pain was even worse: VLAs were being added to > the kernel faster than we could remove them. > > 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? > For others, is a negative depends acceptable? Given how responsive > Nick, Nathan, and others are, I don't think there is any real risk of a > "slippery slope" of things just getting swept under the rug forever. > Everyone here wants to see the kernel be awesome. :) > 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.