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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D009FC77B6C for ; Fri, 7 Apr 2023 23:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229457AbjDGXWw (ORCPT ); Fri, 7 Apr 2023 19:22:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjDGXWv (ORCPT ); Fri, 7 Apr 2023 19:22:51 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B02FC178 for ; Fri, 7 Apr 2023 16:22:48 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-63260c5bb69so17170b3a.3 for ; Fri, 07 Apr 2023 16:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680909767; x=1683501767; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=njPybTaOp1vfFxl9sNrZg/wsVvOfoZpdPujnFpOpMQA=; b=Vt5cGuMIp/txoyJYLtEZ9dC+RpJrsinP5mQDIKekwD6nvyST7tXyhGxLGL3Z/M4BHL YFf8GiX9Fh4tjiQtNiW6yw9042t0+qbszTDR7yNaw1In2q93zzBUeag2fN++T7f+2SSO mYiSVqW3ikHB9B21Lqi8J8xL7fext5RlMpNhrFwdmnzrn/Bg3Vk8cSLVkFC/HZw24r+S +Kujk+EHG8CGkKC5eNtr/tRJybBPG+Q4wOvR2BLQmEOYTaTos8m/pQs78tPFU4aKWSaB e9oGkOODEFlAIv7rPaMXnrblaHO5Qm6fS70uBtRfFtfbmnE5Wyk0GaGO95IRt8LeppyG mLWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680909767; x=1683501767; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=njPybTaOp1vfFxl9sNrZg/wsVvOfoZpdPujnFpOpMQA=; b=Gz0KNcqppvv4xkvmG2OxNoyrEvoNhnGewHc/3dicRZcSmMV0PXJSqKR4ggG3HcAkjx 8RHkEJMN7OHiFCaARh7iuIUfTQTa6y9TcYUUljmVNjFMLyBZh2FWOo5qOmSlqzY3Uezo M7wygJTrDHHESAe30dFLJ5cqVdSBpOFhZ8VWn3awS8OB1PJGTYr3+ki9J+5xu0gKU848 RThkahiDhrjlmLCrEkEknIt8JNjW1nvyUYacDRKU8eJsCyoH6m366RN3/9hqdzW6r8pz VyCO8BI1rNBaQL/PrVR7R/3UD1mFLlQYP4Sg6txkt8/mIN6ft9v4Q745gxVOuTzNwHcG ahuA== X-Gm-Message-State: AAQBX9cK+QmENIiRJ1mz8+RI+7tIyFr6EnIfYat7PaYblyE9vHGwH9w6 BWxSf7fx0Oh3TzXLK1/BWvW8CHCrap1Z1X6uXrvctg== X-Google-Smtp-Source: AKy350bTVYi1UIgGoXP+cqF81jwaO+c2w357t2GB7id9Pg6AAkRKqAVvHygDDMoVBsekCEUGRFhlgAYliVFtq4CaHB0= X-Received: by 2002:a05:6a00:2e28:b0:625:c55f:bc66 with SMTP id fc40-20020a056a002e2800b00625c55fbc66mr1911037pfb.4.1680909767332; Fri, 07 Apr 2023 16:22:47 -0700 (PDT) MIME-Version: 1.0 References: <20230321-kexec_clang16-v5-0-5563bf7c4173@chromium.org> <20230321-kexec_clang16-v5-2-5563bf7c4173@chromium.org> <20230330111523.4b98c8ce@gandalf.local.home> <20230330151826.GDZCWoQkQBj4BYbwWw@fat_crate.local> <20230330113127.3011e021@gandalf.local.home> <20230330160017.GEZCWyEXQVQZRBbYif@fat_crate.local> In-Reply-To: <20230330160017.GEZCWyEXQVQZRBbYif@fat_crate.local> From: Nick Desaulniers Date: Fri, 7 Apr 2023 16:22:36 -0700 Message-ID: Subject: Re: [PATCH v5 2/2] x86/purgatory: Add linker script To: Ricardo Ribalda Cc: Steven Rostedt , Eric Biederman , Baoquan He , Philipp Rudo , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Ross Zwisler , Simon Horman , "x86@kernel.org" , linux-toolchains@vger.kernel.org, clang-built-linux , Borislav Petkov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org Hi Ricardo, Thanks for the patch! Please make sure to cc our mailing list for llvm specific issues. scripts/get_maintainer.pl should recommend it, or you can find it from clangbuiltlinux.github.io. You can also ping me internally for toolchain related issues. Start of thread. https://lore.kernel.org/lkml/20230321-kexec_clang16-v5-0-5563bf7c4173@chrom= ium.org/ On Thu, Mar 30, 2023 at 9:00=E2=80=AFAM Borislav Petkov wrot= e: > > On Thu, Mar 30, 2023 at 11:31:27AM -0400, Steven Rostedt wrote: > > On Thu, 30 Mar 2023 17:18:26 +0200 > > Borislav Petkov wrote: > > > > > On Thu, Mar 30, 2023 at 11:15:23AM -0400, Steven Rostedt wrote: > > > > > Make sure that the .text section is not divided in multiple overl= apping > > > > > sections. This is not supported by kexec_file. Perhaps this is related to CrOS' use of AutoFDO creating .text.hot? If so, it's probably more straightforward to straight up disable PGO for kexec. See also: commit bde971a83bbf ("KVM: arm64: nvhe: Fix build with profile optimization= ") > > > > > > And? > > > > > > What is the failure scenario? Why are you fixing it? Why do we care? > > > > > > This is way too laconic. > > > > > > > Yeah, I think the change log in patch 1 needs to be in this patch too, > > which gives better context. > > Just read it. > > Why did it work with clang version < 16? I'll bet if we bisect llvm, we can spot what might have changed, which may give us a clue on how to get the old behavior back; maybe without the need for a linker script. Ricardo, how did you verify that your fix was correct? Surely we can check using command line utilities without needing a full blown kexec setup? If you can share more info, I can bisect llvm quickly. If it requires profile data, you'll need to share it, since CrOS engineers still have not posted public documentation on AutoFDO as I have repeatedly asked for. > > + toolchains ML. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette --=20 Thanks, ~Nick Desaulniers