Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp685670pxx; Wed, 28 Oct 2020 14:27:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw018WeGXQwXp4tiTlaQrRa15OJ9ha39JwVjTXSdmIJzL4LHvagCKA9QDOSkVx3mB41Vgt2 X-Received: by 2002:a17:906:1c50:: with SMTP id l16mr1059636ejg.144.1603920474058; Wed, 28 Oct 2020 14:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603920474; cv=none; d=google.com; s=arc-20160816; b=IZxtZ2VyyAtBB4DIBaVoj7XLNEEpiJr4hTt1aAVEvbQFMG5AD56XqkYyPDwel+xxWu 9Yx2TxxAjLplOCFZVLYmVxC73zVmZpZ34jw+F+Atg/tSSVP5DAvrmB/WPNImAGzy+CYr Dc4/vnDcFayiBOfaeD1CweK5i1mhg4ja4NBAAkbYDt2OI9H0m0s7OcAz89zhRsVIiJaL haGPT/yesPgXasikqeKHf2Bj3gQLun3sugNXl9eW7Cyi1ssyLH25Wdi6vw/ApMmEIabz 0PCFZrsoItKi4mXele7Skma6zTpbrDr0hzpyX9JmYFwrCzGisAC5xm7wltUEJGYdrpK1 hE0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WQGaMfOKa51GcrilLPDkwx8CUgU5xVnHdlwKgF5WGgo=; b=bjGWfGHyHw/4hua17DvCml4VuNqDuaGqQH/bx0Y655DvWuSB4NTfN9zuLFi6BUEvR1 Npwer0Yp7Dtdh2UxhhQD5tLAZKJo9+Bn+TjlIBzMFok3B5Ml7uoYr5ahHXYa5vTJGPgo wopYFtmge74jnwtDhQ+LNkE/E0h1f7aOm+g8mLQmqn7IDTBbeWi9KkyLmSp8E0iSI9R+ QD2zpkou8341On2F0hKZrJQfDT6B2v6GPkmy8nzcJL+q5wPvE3AHOPvf9wRdJmPIplja QmAy2JtZ4dtY9EmpBWCrujwkTmcutt/SxlmR/0T+MvEtN87Adqzzwyu6mFCOiIIn88PL bBEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ttcVPykR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si2268edr.541.2020.10.28.14.27.30; Wed, 28 Oct 2020 14:27:54 -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=@google.com header.s=20161025 header.b=ttcVPykR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1799356AbgJ0UM1 (ORCPT + 99 others); Tue, 27 Oct 2020 16:12:27 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35991 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1830960AbgJ0UM0 (ORCPT ); Tue, 27 Oct 2020 16:12:26 -0400 Received: by mail-pf1-f193.google.com with SMTP id w65so1573253pfd.3 for ; Tue, 27 Oct 2020 13:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WQGaMfOKa51GcrilLPDkwx8CUgU5xVnHdlwKgF5WGgo=; b=ttcVPykR26yUFCeKEMcnbNX0SQhp+mh0vtMiVYoCCEhJ3xkz+PgXQkuniqTrATFYBv 7vxxxnL11JMRDc1Be7Plm0e6nfv4s5ApOQqrcCMGpgcrvDJ14BOOnZlmTAHSIr9gtKjs zg2+pIqI4/cEYEgHgvH24QvPhKHHNRc6pSyEZ5ip0+8MOKm/MT5+/NYzUcufOaBoS/V4 N3VyuXleV/2lr+4MwakYmOZ3IjYIGG0AKgNsKXXBEq9JgAr+O78PgxcRa2XikSCZ/IxQ XtFXco33DH+wnXtpfgyFMb7w9PmGgPWL49+AiVm32PiggIMzOG6BQTcsP88jPiiMPLlb zpPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WQGaMfOKa51GcrilLPDkwx8CUgU5xVnHdlwKgF5WGgo=; b=nNLbCFrXignnwmoQ4udGhzqVQmPHfJNjb9Qq/FoHBlLGJxDDkRMpjYaYiy6JCAIAYu C7iytOEPxxdfE4/34p/OSvwO6qlKuCHNrGf7PDQ0hDdmKbi4osR6hrg+6LQLsxave58z r3RsyiqJhedY17mqJOmkP152v/i13E1n32Y78sbaHUbF6r6MjUPH2RIjwLd30T1Gj67E KoZoKcWql1G7zOU11Pf636sJz8OtIvr2fySBo1Ac5mgJbbUb8aV7PADVRXp7V+/lgTlx ZjcoImDcpKuIJ5xI4vQGG+LozhUf2pJMne0/HLNwH1QCeQix4kWrcrepHUHa1c71s1yG b1gQ== X-Gm-Message-State: AOAM531Vu/iouTa14IHV8NCGi5rEQHpaWQGs69kdP5oXIQlm8DNMLLr4 4FQKO07VDp3EQwMdousSjFBlI6XTopqWR3jDofn/tA== X-Received: by 2002:a63:5152:: with SMTP id r18mr3175051pgl.381.1603829546039; Tue, 27 Oct 2020 13:12:26 -0700 (PDT) MIME-Version: 1.0 References: <20200821194310.3089815-1-keescook@chromium.org> <20200821194310.3089815-14-keescook@chromium.org> In-Reply-To: From: Nick Desaulniers Date: Tue, 27 Oct 2020 13:12:14 -0700 Message-ID: Subject: Re: [PATCH v6 13/29] arm64/build: Assert for unwanted sections To: Geert Uytterhoeven Cc: Ard Biesheuvel , Kees Cook , Ingo Molnar , Catalin Marinas , Mark Rutland , Peter Collingbourne , James Morse , Borislav Petkov , Ingo Molnar , Russell King , Masahiro Yamada , Arvind Sankar , Nathan Chancellor , Arnd Bergmann , "the arch/x86 maintainers" , clang-built-linux , Linux-Arch , linux-efi , Linux ARM , Linux Kernel Mailing List , Linux-Renesas , Josh Poimboeuf , kernel-toolchains@vger.kernel.org, Miguel Ojeda Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 12:25 PM Geert Uytterhoeven wrote: > > Hi Nick, > > CC Josh > > On Mon, Oct 26, 2020 at 6:49 PM Nick Desaulniers > wrote: > > On Mon, Oct 26, 2020 at 10:44 AM Geert Uytterhoeven > > wrote: > > > On Mon, Oct 26, 2020 at 6:39 PM Ard Biesheuvel wrote: > > > > On Mon, 26 Oct 2020 at 17:01, Geert Uytterhoeven wrote: > > > > > On Mon, Oct 26, 2020 at 2:29 PM Geert Uytterhoeven wrote: > > > > > > On Mon, Oct 26, 2020 at 1:29 PM Geert Uytterhoeven wrote: > > > > > > > I.e. including the ".eh_frame" warning. I have tried bisecting that > > > > > > > warning (i.e. with be2881824ae9eb92 reverted), but that leads me to > > > > > > > commit b3e5d80d0c48c0cc ("arm64/build: Warn on orphan section > > > > > > > placement"), which is another red herring. > > > > > > > > > > > > kernel/bpf/core.o is the only file containing an eh_frame section, > > > > > > causing the warning. > > > > When I see .eh_frame, I think -fno-asynchronous-unwind-tables is > > missing from someone's KBUILD_CFLAGS. > > But I don't see anything curious in kernel/bpf/Makefile, unless > > cc-disable-warning is somehow broken. > > I tracked it down to kernel/bpf/core.c:___bpf_prog_run() being tagged > with __no_fgcse aka __attribute__((optimize("-fno-gcse"))). > > Even if the function is trivially empty ("return 0;"), a ".eh_frame" section > is generated. Removing the __no_fgcse tag fixes that. That's weird. I feel pretty strongly that unless we're working around a well understood compiler bug with a comment that links to a submitted bug report, turning off rando compiler optimizations is a terrible hack for which one must proceed straight to jail; do not pass go; do not collect $200. But maybe I'd feel differently for this case given the context of the change that added it. (Ard mentions retpolines+orc+objtool; can someone share the relevant SHA if you have it handy so I don't have to go digging?) (I feel the same about there being an empty asm(); statement in the definition of asm_volatile_goto for compiler-gcc.h). Might be time to "fix the compiler." (It sounds like Arvind is both in agreement with my sentiment, and has the root cause). -- Thanks, ~Nick Desaulniers