Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1980348ybj; Wed, 6 May 2020 08:34:21 -0700 (PDT) X-Google-Smtp-Source: APiQypJ0QZ+qq/RGzhGXc6LcoZO0pEwdNFr7k6Pl7tPqQq3HSBkxuLN9QlpqMynUQQ0MxINnF70I X-Received: by 2002:a05:6402:543:: with SMTP id i3mr7080508edx.255.1588779261821; Wed, 06 May 2020 08:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588779261; cv=none; d=google.com; s=arc-20160816; b=DkaU/KGKodLyGwtNIy8SKfTCarvLSKJlBezseneLvBW9M9gbJXXAJlVLfPJ7Es9P0s 7J/SjoAfhWEc9gmCSi01ZpIz7L5yO1XWT2RQMmoEfF6DCpE3h7uf+EIo54f75w9dnV8c 6tGbxf9yhP8gvx1FTw73rGh36d/BAjFnL1y+wZjK/KnyrHqUKxTGf3d5FzNS9wHCjL1W 1PAbYpSdAoXu0+ygoS81M3dkeQ5Fl9uEtMQvl92D6pwbeQ+cHpWAMTPqg52+55ateF4B wsYQPkVGrTICe6KPywamaT1iyS4mAgaw6r6fjcUgf7EWnlMKc6HrzP6EP1IBHxGrScTR eSsg== 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=HGob2W+jtJ1wxr5TyUwXRK5f3ACyssA5mwEkdojnzSc=; b=jTisOLUz4/N1mxhRzwfVsy+R1Kmc7UYenS/MATd/OOS03kV9LPMPBHDcOMPZl9avzQ 1er13IIiMyucGj0yLJLMJ5v9+ck2KUstbNzTXjR+CwDDirdh+RwuuyjD2Y2CR/jPUnup KgEO7wczjV+MdHUV+i+nmI8ZaLdRbRZX6Ys8Y7fOUHcN+qvvGLkv7JcYp11s/HDRgOl0 jVGipuQZ/FT6sg60Ih5JIXEWwR2tUfaZjcsIrWD7VQIP/lGEV7QfUuD2Cv/WhjAi4C0y /MCYQoyGvkFUgW//3bsDBXZd4MVgoU/Sg2PB+OPuoP5IkAsxXOeeLwn4iztbb/R/wUe6 iVxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ft34+Tuj; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si1377038edc.303.2020.05.06.08.33.45; Wed, 06 May 2020 08:34: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=pass header.i=@gmail.com header.s=20161025 header.b=ft34+Tuj; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729321AbgEFPcA (ORCPT + 99 others); Wed, 6 May 2020 11:32:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729003AbgEFPb7 (ORCPT ); Wed, 6 May 2020 11:31:59 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97471C061A0F for ; Wed, 6 May 2020 08:31:59 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id c3so1682292otp.8 for ; Wed, 06 May 2020 08:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HGob2W+jtJ1wxr5TyUwXRK5f3ACyssA5mwEkdojnzSc=; b=ft34+Tuj1/EXggzTdLuevyBjykqE8Mo6BrUQeaVcw0R26trAW03x2IpOBwVX+aWtN+ zenPFzWx92ITkR0k2zz/kScA82yz+x+GJpQQ9bjvzKrl+llIb59Dw88EiShplEqNKGf5 QV7Zgmr9AiRNNRkhp257Q9EbG7UA/k8IA8smqoPoLeMlZc14E9IEsR446khqN8j0PzOz e3enOxOtzg7qzTWl/NJv4tgCCBvCOMn0EwZl57xNr4a7I9QvqhNlM8UHOyPCxZP/4fu9 32fEWgM1q4dPoIPW9Mp/d3xx/l1PdjgM4oJGfPC+ZWvtFbKFgWr9sHtxu9ffO85zcG4X 50oA== 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=HGob2W+jtJ1wxr5TyUwXRK5f3ACyssA5mwEkdojnzSc=; b=aN8NEYy+Z8YgpFLw98rG4StbgWixw4uNu6YuTv3o49lamtZYNQ5I+tWCyHqZXc9mbP ttElam/zahfpsWLfUZXWn0BaItdIgW4C7FF47j/KNK807jUl3AP+eayXtTt12VM2Ptr7 Owj/W9PUsBvzzom+A5lXyJPn+RQa1GeIBb5mgmN+F2DUw6pkOIKlK3bSOdtIdzEpVXUA qMe9CtiWWHBd80AF+tbddGj9OdjGIsqirC4UFTJDYyW4gcr8/9MsDXIUSuiQiUmKWLI8 x6dLnPFrE0p7+N16mvVsWyLyWKei9W1sYH7GglnbjNz11DJwpGDzcCoC/IILByllw5yq L/VA== X-Gm-Message-State: AGi0PubQeQqGVpiVVRV1ZRgUXN2X5Zkl7KTdotJgKJmrV4zk04C77wIU t5Q0TnfVftE1HpH4bpMDCs0OxGkYJzg= X-Received: by 2002:a05:6830:1d9c:: with SMTP id y28mr7465935oti.280.1588779118864; Wed, 06 May 2020 08:31:58 -0700 (PDT) Received: from ubuntu-s3-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id m189sm600819oig.12.2020.05.06.08.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 08:31:58 -0700 (PDT) Date: Wed, 6 May 2020 08:31:56 -0700 From: Nathan Chancellor To: Arnd Bergmann Cc: Torsten Duwe , Mark Rutland , Catalin Marinas , Will Deacon , Ard Biesheuvel , Amit Daniel Kachhap , Torsten Duwe , Ard Biesheuvel , AKASHI Takahiro , Josh Poimboeuf , Julien Thierry , Andrew Morton , Marc Zyngier , Kees Cook , Alexandre Ghiti , Kristina Martsenko , Ionela Voinescu , Steve Capper , Linux ARM , "linux-kernel@vger.kernel.org" , clang-built-linux , Fangrui Song Subject: Re: [PATCH] arm64: disable patchable function entry on big-endian clang builds Message-ID: <20200506153156.GA1213645@ubuntu-s3-xlarge-x86> References: <20200505141257.707945-1-arnd@arndb.de> <20200505142556.GF82823@C02TD0UTHF1T.local> <20200505194243.5bfc6ec6@blackhole> <20200506034523.GA564255@ubuntu-s3-xlarge-x86> 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, May 06, 2020 at 12:22:58PM +0200, Arnd Bergmann wrote: > On Wed, May 6, 2020 at 5:45 AM Nathan Chancellor > wrote: > > On Tue, May 05, 2020 at 07:42:43PM +0200, Torsten Duwe wrote: > > > On Tue, 5 May 2020 15:25:56 +0100 Mark Rutland wrote: > > > > On Tue, May 05, 2020 at 04:12:36PM +0200, Arnd Bergmann wrote: > > > > This practically rules out a BE distro kernel with things like PAC, > > > > which isn't ideal. > > > > To be fair, are there big endian AArch64 distros? > > > > https://wiki.debian.org/Arm64Port: "There is also a big-endian version > > of the architecture/ABI: aarch64_be-linux-gnu but we're not supporting > > that in Debian (so there is no corresponding Debian architecture name) > > and hopefully will never have to. Nevertheless you might want to check > > for this by way of completeness in upstream code." > > > > OpenSUSE and Fedora don't appear to have support for big endian. > > I don't think any of the binary distros ship big endian ARM64. There are > a couple of users that tend to build everything from source using Yocto > or similar embedded distros, but as far as I can tell this is getting less > common over time as applications get ported to be compatible with > big-endian, or get phased out and replaced by code running on regular > little-endian systems. > > The users we see today are likely in telco, military or aerospace > settings (While earth is mostly little-endian these days, space is > definitely big-endian) that got ported from big-endian hardware, but > often with a high degree of customization and long service life. Ah yes, that makes sense, thanks for the information and background. Helps orient myself for the future. > My policy for Arm specific kernel code submissions is generally that > it should be written so it can work on either big-endian or little-endian > using the available abstractions (just like any architecture independent > code), but I don't normally expect it to be tested on big endian. > > There are some important examples of code that just doesn't work > on big-endian because it's far too hard, e.g. the UEFI runtime services. > That is also ok, if anyone really needs it, they can do the work. > > > > I suggest to get a quote from clang folks first about their schedule and > > > regarded importance of patchable-function-entries on BE, and leave it as > > > is: broken on certain clang configurations. It's not the kernel's fault. > > > > We can file an upstream PR (https://bugs.llvm.org) to talk about this > > (although I've CC'd Fangrui) but you would rather the kernel fail to > > work properly than prevent the user from being able to select that > > option? Why even have the "select" or "depends on" keyword then? > > I definitely want all randconfig kernels to build without warnings, > and I agree with you that making it just fail at build time is not > a good solution. > > > That said, I do think we should hold off on this patch until we hear > > from the LLVM developers. > > +1 > > Arnd Glad we are on the same page. Cheers, Nathan