Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp626745ybz; Fri, 17 Apr 2020 07:17:56 -0700 (PDT) X-Google-Smtp-Source: APiQypJ3KJRBS8hBO2aocigwqrsxEGjS76elH7IphFwPjkR7dV6sLbJq+mT6AetnHZoFAqF4xUxN X-Received: by 2002:aa7:ce0f:: with SMTP id d15mr1640293edv.290.1587133076052; Fri, 17 Apr 2020 07:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587133076; cv=none; d=google.com; s=arc-20160816; b=LJbFP3ZdYpLmp90dGVUSYfFf7Sl77zzDvekZpLLCN26cW9GPNLTZHJjRWmwXPHkICT eqQLdremjqyo4hCTFqrCsFMrpXfpAekG61vJ1IB5PIzLXmDICW01UcGSTgYt1EsHIodZ rSE8ReqCwrnEocfhzL8OmuIA6jaXXOw1YIpW9Z29qBTjo4JXluPPBct4q5EIzVe0kA+E 5QAME/ss3uayYWxSEI/C7OprNGK1qSZ33PNTh+ANLvJ84JVX4WDv2uq1BLpGoEJKSY3o i3MOnVmVV5/D1rZlnTT2THpipbx1uyUCMMnD8228X2v6A7YdNUVT05ssZDq48jyQn0Ln dPiA== 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:dkim-filter; bh=soczHQygZ5e4Z4/uBgr0PVGiMli0DNK+wn9N64tR5qU=; b=t4OQH7tPqAieVcuYmpvkcUdcCVyK72u6/J9LIjufx89FuH6UO6MjegSUTJq7xd9XwR RfXLfJ3HWrCJpqZwUk88IKlRwgYq37CnHuET5EEFOBoBm0TkdCJyqkbINQI4Vzcqk0SD IV4UDmFghyxDCy4Xoaka5+OnL86Bx/zTJ0TRXEl54o4MkG83T3+lRy2KxYUw3AhQRtVq YIgi5k8YaRXkWAqaBujfqezn0RwpEtDD5HAHEzpuCQ9bmhW5HOHCTg5Mp8O03Oj45Y5d O96OPlENdxJWsarmpaoWnhzl6C6XIoSL0ZYdl8XeV9rz4jc8EdsScbK/cm9Kgdma6+oy 6oaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=vXuRLTov; 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 f17si13608231ejx.11.2020.04.17.07.17.31; Fri, 17 Apr 2020 07:17:56 -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=@nifty.com header.s=dec2015msa header.b=vXuRLTov; 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 S1730912AbgDQONm (ORCPT + 99 others); Fri, 17 Apr 2020 10:13:42 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:19476 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730662AbgDQONl (ORCPT ); Fri, 17 Apr 2020 10:13:41 -0400 Received: from mail-ua1-f49.google.com (mail-ua1-f49.google.com [209.85.222.49]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 03HEDDdj011312 for ; Fri, 17 Apr 2020 23:13:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 03HEDDdj011312 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1587132794; bh=soczHQygZ5e4Z4/uBgr0PVGiMli0DNK+wn9N64tR5qU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vXuRLTovDrQmMb0Jz37P9s2LBa6Jb1e/OUiRedx63I0IFnBEDdaseDJmrt8I6+yNf YwxQQopMU2clgNfcN5XYa5Pdao15glEfClHbc9nH43HSs1Julc8SjX09ZfxxNGgNZ1 L2y3yIwwSDwMFX+ug9VhWRfr7yo4w7BJoeadMqw4WrhuM6BzVqXadkqpeahMtW4mME iRKHSf/7aXQtWqNWcjEqbNd1y2k7an7fr66xZ6JGbirh4am9JHd6+siWU3PaImO0sO Eg2kf5oJczJgxOoSYG0X5oXG3RdLGssN/7QKmvFhvYf2WvL7C7tM5MDUBnGKcAH8mv pI488dLZ0hQJw== X-Nifty-SrcIP: [209.85.222.49] Received: by mail-ua1-f49.google.com with SMTP id d23so697685uak.1 for ; Fri, 17 Apr 2020 07:13:13 -0700 (PDT) X-Gm-Message-State: AGi0PuYWEon7qV7RHgPQep7lJf1IHCZMi5+pQjDaUpvRU5kOgimatoYR ljljC9d1saITiqRRqwIi2N7cy8KtMlRGY3vmq+E= X-Received: by 2002:ab0:20d6:: with SMTP id z22mr2640996ual.121.1587132792213; Fri, 17 Apr 2020 07:13:12 -0700 (PDT) MIME-Version: 1.0 References: <20200409232728.231527-1-caij2003@gmail.com> <20200410123301.GX25745@shell.armlinux.org.uk> <202004141258.6D9CB92507@keescook> <202004150833.E2E9A89E0@keescook> In-Reply-To: <202004150833.E2E9A89E0@keescook> From: Masahiro Yamada Date: Fri, 17 Apr 2020 23:12:35 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: do not assemble iwmmxt.S with LLVM toolchain To: Kees Cook Cc: Ard Biesheuvel , 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 , 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 Hi On Thu, Apr 16, 2020 at 12:44 AM Kees Cook wrote: > > 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 When I started to read this thread, I just slightly preferred depends on $(as-instr, ) over depends on AS_IS_CLANG because it is what we recently did for x86. commit 5e8ebd841a44b895e2bab5e874ff7d333ca31135 But, Ard's macro approach seems even better. I do not know how difficult to replace the arch/x86/Kconfig.assembler with .macro Anyway, arch/x86/Kconfig.assembler will be gone when we raise the binutils version next time. -- Best Regards Masahiro Yamada