Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5489957rwb; Mon, 14 Nov 2022 05:33:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf6075qaQNV3k2HS3JivTJsnolwV87iAqvJi86ll/pytMsuDogBQK4GUjCbPs5Irz/CNoOsP X-Received: by 2002:a62:1494:0:b0:56d:4670:6e2a with SMTP id 142-20020a621494000000b0056d46706e2amr13924804pfu.77.1668432782720; Mon, 14 Nov 2022 05:33:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668432782; cv=none; d=google.com; s=arc-20160816; b=wCirjj5Yp092toJC/Z2+ySFhiSa2fpbLwF+JZ5QW72prMkIueisyP86LRs+nbdOfw+ cCKL7yKtr6J0WdtM9ICLixHg9xXA43QJ/hu4igp0J6oWRLisGSic9PAXPoW+GgUQcBYt SfznsqDGYBmFyLDtkWUX8dvMLrRo3sO2TfLx1wd4Yg/Sgb3HoXQvKakDtVgjLsljYpGy DZ2YinXPB/2w4vj14RTQ6wLRPuWSGCG05Q3oq5CWwaX7QX3YFw2oCQEvl7WirRo9SzQr ISgaSixYc2xFntWnp42I3VmscUt7Xwp2Qjnh2SpZtcQv2Yul4B87dJ7m9sH8kAg0LPjA H5QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=URNeRLCaPIzG0hVTY7Yzc9GuRCdrvd8goEPcD9+3mQw=; b=HIfS8QSbwU8d/BGFq/q4pN44o02c5+qoRPGn1hP2y++dtIMKaGY0EmlTieOQJy1jqs Twqd6KHBneXPOLbf/zogMS0luyEd+cA4LjKctnojsyEOBcqPZX1eOIUnJyfEaqiQX4am X77U9NGkOgiU/2K8ftBmgsuZ2FSuw7Bt1S+syzi3Gmuv+O9erWuwKd/x5Mcj0/QxtSIZ WlGqQwnMUDLVOosDRvC+s6jT4YiXYdtRehOD1U9k6pX4FwBYbgYSG1hRH3mpHpAYcFzm 53eFE+Y4R3TQP7hIotP5LPXt+OlMhBf+9SG5qkUTcy0Ht6EEa8/1a39igKuzFTxvfBO5 xs+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l3-20020a6542c3000000b0044fb0824e52si9599860pgp.171.2022.11.14.05.32.50; Mon, 14 Nov 2022 05:33:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236454AbiKNMFf (ORCPT + 88 others); Mon, 14 Nov 2022 07:05:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235655AbiKNMFG (ORCPT ); Mon, 14 Nov 2022 07:05:06 -0500 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 811A71D9 for ; Mon, 14 Nov 2022 04:04:55 -0800 (PST) Received: by mail-wr1-f53.google.com with SMTP id g12so17695490wrs.10 for ; Mon, 14 Nov 2022 04:04:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=URNeRLCaPIzG0hVTY7Yzc9GuRCdrvd8goEPcD9+3mQw=; b=hK77CAa425+gD3eEqd/ra9CgeyGHt4SqiUWZq+02Xe3A177TCM6cuLLlNOqABYXkGZ knZPm5jGxDhqL1xp6q4fj0AXXUCjTbPwHX93/wtMOBAp9nzrLfyc4Jsc++r1As70H+B0 WywVGhVYsgxxqOyzeXhNFSaBAbhnS5Wb8h2eeU/EJ8m8SSDhDU65melV2EIzds6cHi39 kxMQPxodqJYiSLtFbbHAjvhxzdE4BrxYREj3ui8WMXIdkpLJLMqZq+RNVdeabbAKnMXk 4CB+sizjw4tQDQ8Sb0KwlwY4JqVFPbiPRJq4gnijRoqc36G09Tst42DlRNM6dy05L8A8 8q9A== X-Gm-Message-State: ANoB5pmve/y7ixraSIF6VEvmgKNhmYfIOilvUZi9P6qqBxilONFhV5Xd LFiTxqog3DiqjGhLE54GE0w= X-Received: by 2002:adf:fe0c:0:b0:236:d479:b0b7 with SMTP id n12-20020adffe0c000000b00236d479b0b7mr7019474wrr.559.1668427493962; Mon, 14 Nov 2022 04:04:53 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:49? ([2a0b:e7c0:0:107::aaaa:49]) by smtp.gmail.com with ESMTPSA id r7-20020adfce87000000b00236488f62d6sm9535329wrn.79.2022.11.14.04.04.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 04:04:53 -0800 (PST) Message-ID: Date: Mon, 14 Nov 2022 13:04:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Content-Language: en-US To: Ard Biesheuvel , Borislav Petkov Cc: linux-kernel@vger.kernel.org, Alexander Potapenko , Alexander Shishkin , Alexei Starovoitov , Alexey Makhalov , Andrew Morton , Andrey Konovalov , Andrey Ryabinin , Andrii Nakryiko , Andy Lutomirski , Arnaldo Carvalho de Melo , Ben Segall , Daniel Borkmann , Daniel Bristot de Oliveira , Dave Hansen , Dietmar Eggemann , Dmitry Vyukov , Don Zickus , Hao Luo , "H . J . Lu" , "H. Peter Anvin" , Huang Rui , Ingo Molnar , Jan Hubicka , Jason Baron , Jiri Kosina , Jiri Olsa , Joe Lawrence , John Fastabend , Josh Poimboeuf , Juergen Gross , Juri Lelli , KP Singh , Mark Rutland , Martin KaFai Lau , Martin Liska , Masahiro Yamada , Mel Gorman , Miguel Ojeda , Michal Marek , Miroslav Benes , Namhyung Kim , Nick Desaulniers , Oleksandr Tyshchenko , Peter Zijlstra , Petr Mladek , "Rafael J. Wysocki" , Richard Biener , Sedat Dilek , Song Liu , Stanislav Fomichev , Stefano Stabellini , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Vincenzo Frascino , Viresh Kumar , VMware PV-Drivers Reviewers , Yonghong Song References: <20221114114344.18650-1-jirislaby@kernel.org> From: Jiri Slaby Subject: Re: [PATCH 00/46] gcc-LTO support for the kernel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14. 11. 22, 12:56, Ard Biesheuvel wrote: > On Mon, 14 Nov 2022 at 12:44, Jiri Slaby (SUSE) wrote: >> >> Hi, >> >> this is the first call for comments (and kbuild complaints) for this >> support of gcc (full) LTO in the kernel. Most of the patches come from >> Andi. Me and Martin rebased them to new kernels and fixed the to-use >> known issues. Also I updated most of the commit logs and reordered the >> patches to groups of patches with similar intent. >> >> The very first patch comes from Alexander and is pending on some x86 >> queue already (I believe). I am attaching it only for completeness. >> Without that, the kernel does not boot (LTO reorders a lot). >> > > You didn't cc me on that patch so I will reply here: I don't think > this is the right solution. > On x86, there is a lot of stuff injected into .head.text that simply > does not belong there, and getting rid of the __head annotation and > dropping __HEAD from the Xen pvh head.S file would be a much better > solution. I think Alexander was working on that too. I'm not sure -- anyway, we still have the other fix. That is putting startup_64() to a special section and put that to the beginning of vmlinux using lds. (Until .head.text is completely gone for good -- same as on arm, you wrote somewhere.) In any case, that patch was added only for reference, if anyone wants to give the series a try. Next time, I can attach the other workaround ;). I don't expect anyone will take the series as is. There will be a lot of comments, I suppose. Hence many re-spins... thanks, -- js suse labs