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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 7D8A1C433DF for ; Thu, 15 Oct 2020 01:29:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37C3722254 for ; Thu, 15 Oct 2020 01:29:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PgKjpNgr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732280AbgJOB34 (ORCPT ); Wed, 14 Oct 2020 21:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387861AbgJOB3k (ORCPT ); Wed, 14 Oct 2020 21:29:40 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D127C00216A for ; Wed, 14 Oct 2020 17:13:16 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id v6so1411179lfa.13 for ; Wed, 14 Oct 2020 17:13:16 -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=LURiEnBAw2K4z9zIAiaFYTyrr5u9bQTopZRlsHwZQ30=; b=PgKjpNgrHeicAl8QzyJWoTs5A6rmp6R8Pmum8VjneOxNanE02C3iR0xMHPEKXRSwiA hgbPuEmU4Y/KvHEeIBgVzlegtYfQL/e1IYCy/LveXiVHXjGwp6JSkRsgM1KwAIfKJcKw xjiOyeSTmvlceona3bncz+d4u8W6hA+58+IV74pozmLNmVEOzj6zHtFH6BbvMPGb1Q1N SCAyW7rDspMISGiSvIfRrqTnMCItj6RGBKiMdjZQs84SXB/tH/0v/+6ZNBKtXVi4giBx 5O+k8MWQSqRdXTBoaXJdV4Sbx9ykfhv8CIwDyMJZ5tK/7VE1ZpxXSBqDafewuTLQ+EfB Zbrw== 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=LURiEnBAw2K4z9zIAiaFYTyrr5u9bQTopZRlsHwZQ30=; b=qjXmvKyRi2jy5FCg4AvCwtWZ0Ha6lO//gRy4vlYoeMHfCoOnFDFPRK9aWUV9WCqtOS kdLNvfaqcCVAKRRXrL4Q7xrwXm70QzZ+iiqAe12hXhxy8KP4w0Dco6uIqulyi4MRpaB5 nb0/SNqbRVX9H64XB03/sJyfzYrhJOeN4k42ysDG99olgbdc7f13Ed4HYCTo1fM+RMlv 6XbTAnDhGyJ96ZY8nnGCQaqbh5X4KjGEWrQra/fVE3PVl1HbTjxDRhrKHKXaf4M6mvL6 MebWFBl7cJ1FpD2lYlipzNrycnddj+IPJni18ce5XP/73DXLWfy+oLbaXRhjaYJXFdmY 9Trg== X-Gm-Message-State: AOAM530pDusxhwg+L1/KrpQZMABF5hjRMBwO9CNntai1TRc3DSfRFh+o AMgo42JhvpzJA+j9WgXTU9ann5I6Gb6I6RdsS35Kvg== X-Google-Smtp-Source: ABdhPJzXFIHFpKtLKeaohPSTTFSTn1moPmFA2URXdVrEpwDK24AygeIW08WWsjsl1A8u32KKXSdaLbgxjj+v3FNFXjU= X-Received: by 2002:a05:6512:52f:: with SMTP id o15mr141586lfc.381.1602720794371; Wed, 14 Oct 2020 17:13:14 -0700 (PDT) MIME-Version: 1.0 References: <20201013003203.4168817-1-samitolvanen@google.com> <20201013003203.4168817-17-samitolvanen@google.com> In-Reply-To: <20201013003203.4168817-17-samitolvanen@google.com> From: Jann Horn Date: Thu, 15 Oct 2020 02:12:47 +0200 Message-ID: Subject: Re: [PATCH v6 16/25] init: lto: fix PREL32 relocations To: Sami Tolvanen Cc: Masahiro Yamada , Steven Rostedt , Will Deacon , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , linux-kbuild@vger.kernel.org, kernel list , linux-pci@vger.kernel.org, "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 13, 2020 at 2:34 AM Sami Tolvanen wrote: > With LTO, the compiler can rename static functions to avoid global > naming collisions. As initcall functions are typically static, > renaming can break references to them in inline assembly. This > change adds a global stub with a stable name for each initcall to > fix the issue when PREL32 relocations are used. While I understand that this may be necessary for now, are there any plans to fix this in the compiler in the future? There was a thread about this issue at , and possible solutions were discussed there, but it looks like that fizzled out...