Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1705617ybh; Tue, 14 Jul 2020 05:19:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOk5DPbZ91OMPscDF8FjLc1rdWjoF0zUTFl0IIuZ52qY5+UYIBObuNuGN6KugrK0E6KpeK X-Received: by 2002:a17:906:c002:: with SMTP id e2mr4401001ejz.244.1594729170154; Tue, 14 Jul 2020 05:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594729170; cv=none; d=google.com; s=arc-20160816; b=XENyt6cE3sCmLxb7wKA+3xjQj/TsvIOB7pxZjJrKY3P5mo6mGpgPD1gMOSl6Ee9G1x s4eFB23Wj0nHIdHs3WdBPt+SAve7gL3sZZ4dXw/KK5dTWwsMgS+Wf/YFfV0gsT8GioSB Sl2iwl0YCiWRKcqPY7b3wi7J5aEjmog8HEAyLESYx8Zk6ePwuzEsYvsuCKKjfso6z976 uBpZ+wqMRPouUtOOSDPtAF9505JAtBIT/oVo65bL2v+lIAumgWDYrtwZkhn9lEPwjJ5M tkGkvT0qEMs0q7q2Hmu3IoUpeoJZSGge73AO+sIyk5hy+ChiRQ1aCsoh5Yad824I8Hn+ Xr1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=wfK3xdqxWPIrcBiLcQXc1UCurpc9F1sERgRxI1Y1qrc=; b=olP1ycKzkP1pQwxr6FRQ5IMjdtc/V25g10LonZSzskinYu2w8YgPWCdBpCqVxPXryf aE86Nf5QnLRaXvgo1PGxvuSLFfowEYlUHAx+5tacLh50fHt0q9/13bJfOx2Tk50K31gS Yc1CncIujhkIugquo0XZKMHwMwl6UzbJptJdoa5naXpsbMUefnH1fZ/4PY8xju1E4GV/ OpKOfRxDJwBNxN73ocoLOqztpjihQEbDWBtjgWmPgQ4fGh0yIjBdUXIKEkd4PVSoqXkZ 1MFmvxEyFJFUq8rEhoUV6h9DLgC5yeXg4k7ny/CK1Ph6f250iB7X/2WFmue/WF+RKk0Q SPcA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si11143311ejb.286.2020.07.14.05.19.05; Tue, 14 Jul 2020 05:19:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728249AbgGNMQu (ORCPT + 99 others); Tue, 14 Jul 2020 08:16:50 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:40297 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728471AbgGNMQs (ORCPT ); Tue, 14 Jul 2020 08:16:48 -0400 Received: from [192.168.0.4] (ip5f5af29b.dynamic.kabel-deutschland.de [95.90.242.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id B7E0220643C4C; Tue, 14 Jul 2020 14:16:44 +0200 (CEST) Subject: Re: [PATCH 00/22] add support for Clang LTO To: Sami Tolvanen Cc: Masahiro Yamada , Will Deacon , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, Kernel Hardening , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild , LKML , linux-pci@vger.kernel.org, x86@kernel.org References: <20200624203200.78870-1-samitolvanen@google.com> <671d8923-ed43-4600-2628-33ae7cb82ccb@molgen.mpg.de> From: Paul Menzel Message-ID: <2ac9e722-949b-aa92-3553-df1bf69bf9e5@molgen.mpg.de> Date: Tue, 14 Jul 2020 14:16:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Sami, Am 13.07.20 um 01:34 schrieb Sami Tolvanen: > On Sat, Jul 11, 2020 at 9:32 AM Paul Menzel wrote: >> Thank you very much for sending these changes. >> >> Do you have a branch, where your current work can be pulled from? Your >> branch on GitHub [1] seems 15 months old. > > The clang-lto branch is rebased regularly on top of Linus' tree. > GitHub just looks at the commit date of the last commit in the tree, > which isn't all that informative. Thank you for clearing this up, and sorry for not checking myself. >> Out of curiosity, I applied the changes, allowed the selection for i386 >> (x86), and with Clang 1:11~++20200701093119+ffee8040534-1~exp1 from >> Debian experimental, it failed with `Invalid absolute R_386_32 >> relocation: KERNEL_PAGES`: > > I haven't looked at getting this to work on i386, which is why we only > select ARCH_SUPPORTS_LTO for x86_64. I would expect there to be a few > issues to address. > >>> arch/x86/tools/relocs vmlinux > arch/x86/boot/compressed/vmlinux.relocs;arch/x86/tools/relocs --abs-relocs vmlinux >>> Invalid absolute R_386_32 relocation: KERNEL_PAGES > > KERNEL_PAGES looks like a constant, so it's probably safe to ignore > the absolute relocation in tools/relocs.c. Thank you for pointing me to the right direction. I am happy to report, that with the diff below (no idea to what list to add the string), Linux 5.8-rc5 with the LLVM/Clang/LTO patches on top, builds and boots on the ASRock E350M1. ``` diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index 8f3bf34840cef..e91af127ed3c0 100644 --- a/arch/x86/tools/relocs.c +++ b/arch/x86/tools/relocs.c @@ -79,6 +79,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = { "__end_rodata_hpage_align|" #endif "__vvar_page|" + "KERNEL_PAGES|" "_end)$" }; ``` Kind regards, Paul