From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45D5CC388F9 for ; Tue, 27 Oct 2020 20:00:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F15122076B for ; Tue, 27 Oct 2020 20:00:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mP0vr1qR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1830625AbgJ0UAk (ORCPT ); Tue, 27 Oct 2020 16:00:40 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:34922 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1830614AbgJ0UAi (ORCPT ); Tue, 27 Oct 2020 16:00:38 -0400 Received: by mail-qt1-f193.google.com with SMTP id s39so1506350qtb.2; Tue, 27 Oct 2020 13:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TVuLHKcXENXuQnK7BbqbATj1Ow+/O3OET0tWd5g550g=; b=mP0vr1qRuUQR81DKmnV8194x/AjZPMsguc2eq/A5LnYQc8WN31EdpclRq5QVEiguNC viciyDYZqo+cja357tj67V9Ldk0LSraSsvStPxeETJwDvUyDE0QqkcWdodVZFQKVwWxL epou4TbwiMHu7YGhXYGrCAeTC0M9FwqgpQSze1vdX6jE1Hycg9mcVCPQLugXG7BO4n3f ZKNCIrqLrRLE/IRXNhwwU6cP1LaeM2czwNcLqri8C9uV5dM+QmnFUKEZdmkSyS5SkMpZ 6NJMI/dGiMEUrcA1CaTUHfY+8FHHy99q4+iH591UceHfx51c0qvDioxTaXMjQDk4tcQp Mr+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=TVuLHKcXENXuQnK7BbqbATj1Ow+/O3OET0tWd5g550g=; b=UT8nenYGTXpAFwAqfi16KZOTbzF2qOQzfAs1xYZ42aVp6W3CtETbQ1HsUXKqbIN6IU 6xyJokFFCtO+ilO4/HdgCEg50DTGMFZ6reLSMYYpnVwvetVSs4wXBj6Euz6jKKqmNN1X T2KAfjqOi6CYepRhCpcIU+Rgpa6zu1GFOd4eNGu3IfzA9IWZnK9XW8xeCATsCwh3e6ms 24bBjgMwqEhnV1NULAtCHIwHUTcqo/ECW5En55FTZwt0DYbAXgGiY9gS1l7dNDq+Coqf 8Hj15X5jNNJes47s1WrG8wEgIqJbqeWu4BmDgeklpXqclUsNWsMCJecsbQYdzJ6obx0Q eZNA== X-Gm-Message-State: AOAM530WWDKXlfwtZzK8lmJ1hZK9NZipKjx15KZs1PDo6I3n9bgZ7Soz 107H4gz7QQlgU75Z7Ye+xZc= X-Google-Smtp-Source: ABdhPJxU2pZfgj9I3plzFh3cez4o/WkT19yFU0erA2KwXzjCWYK8HyryZLdTY2tsgV+PFXrSig2WwQ== X-Received: by 2002:ac8:4295:: with SMTP id o21mr3704200qtl.313.1603828836358; Tue, 27 Oct 2020 13:00:36 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id z6sm1479349qtw.36.2020.10.27.13.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 13:00:35 -0700 (PDT) Sender: Arvind Sankar From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 27 Oct 2020 16:00:33 -0400 To: Ard Biesheuvel Cc: Geert Uytterhoeven , Nick Desaulniers , 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 Subject: Re: [PATCH v6 13/29] arm64/build: Assert for unwanted sections Message-ID: <20201027200033.GA1826217@rani.riverdale.lan> References: <20200821194310.3089815-1-keescook@chromium.org> <20200821194310.3089815-14-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 08:33:00PM +0100, Ard Biesheuvel wrote: > On Tue, 27 Oct 2020 at 20:25, Geert Uytterhoeven wrote: > > > > > > 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. > > > > > Given that it was added for issues related to retpolines, ORC and > objtool, it should be safe to make that annotation x86-only. The optimize attribute is not meant for production use. I had mentioned this at the time but it got lost: the optimize attribute apparently does not add options, it replaces them completely. So I'm guessing this one is dropping the -fno-asynchronous-unwind-tables and causing the eh_frame sections, though I don't know why that doesn't cause eh_frame on x86? https://lore.kernel.org/lkml/alpine.LSU.2.21.2004151445520.11688@wotan.suse.de/