Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5784988rwr; Mon, 1 May 2023 10:40:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56JcooUpUdQkDNuD/O7VxGVmhyDhpedL5JrNHOFaZ9kyYaKWccIGcNQ48gUyDquFkr5JmI X-Received: by 2002:a05:6a20:a3a2:b0:f5:cf7d:fcac with SMTP id w34-20020a056a20a3a200b000f5cf7dfcacmr14404392pzk.37.1682962858741; Mon, 01 May 2023 10:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682962858; cv=none; d=google.com; s=arc-20160816; b=IXBpmJ0hAQ1uQbeclrG0rX5/C3DKQfdr7rC3P4p2HIwf+wpNWkAnabVoHIMX8GJwFg 1U+69ZH1kpyIYEtk/K8VRFgFeo+rmxY/wQia5wk2UKzHidsUt/pOizj3E6zzPIzskeJq Hy1VRO5nokz1RyMBd88LjiDiSgpUu40tsswzvjBPR+CxYgOXUw5y8fGTqB+8NZuwNyJs yNoAV85FJYQruj5OWvO8RqQy6Y1+H8WpgppRa3z4p2nfB5hz1TXTSM7p6/IyI0SsVVp3 7nqRvKJ2mOTHEwGLIeW+LWMe+AhTLBzw/fWVC6HJ/4G1/p5o2E3gxHk3LXKQcU4IfGSC NL9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=m+RNUTojqcUPndVpyqWpOuSnVDmC59OYTbJVhd//Jx0=; b=AMvmgy4yyCvEM8cIdPiZo4610es7aa8Mk+3XXfwRup8vf0Zsr+aClUZBfVSuMJS+o2 Mu1xHvEfhL2Ij13211R3Q2v8uvJ2HqLjjqB9g1DojWSC4lxh9UowIWQo/soyZU1+fJ9V D/M3OXjtRU+1oWX99EUqHKDNSHoZSeCLH+OcyUoedzXI8QPZ/WlJy1n93V8ytMHDGAFV +CRtrYOYO83unA2TlF4aAtio+2jUIL2e527r359Bidu6gjRzbPdfWn9OIbcY/ASQD085 a8A1qCYA3D/NGWMPU3RSFR8w6tW/Y1DvHccQw62Em9m7FafzeaHxJdv//VnQaVCudDs1 U8DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GYL5XLwk; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020a634603000000b005130f15c5b1si27598077pga.363.2023.05.01.10.40.43; Mon, 01 May 2023 10:40:58 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=GYL5XLwk; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232349AbjEARhF (ORCPT + 99 others); Mon, 1 May 2023 13:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbjEARhD (ORCPT ); Mon, 1 May 2023 13:37:03 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB8DE125 for ; Mon, 1 May 2023 10:37:02 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-38e3228d120so1709920b6e.3 for ; Mon, 01 May 2023 10:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682962622; x=1685554622; 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=m+RNUTojqcUPndVpyqWpOuSnVDmC59OYTbJVhd//Jx0=; b=GYL5XLwkDZzXY+VQg5bm6uM19iSjeNRk2Da2qvHDtAme4uHcxzCq6z+H2D3uLIhsxM wE1DPbM1ZHuyYTSHFkc/4zCo97595k7l/RO4BllrJ6QH7XWpc+h9JLdrivS1Z6niwRP2 yy5T0F5vmetnzIT7n5v69qeYMgSeczZl84Rhc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682962622; x=1685554622; 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=m+RNUTojqcUPndVpyqWpOuSnVDmC59OYTbJVhd//Jx0=; b=jXNe+mbglN2i2tc/ZxMU3zwGli4zjOxIQ1XXeYPKJVPvI3GLE8yskFSBO+dGDxvAVG ZN1L97cK+vAs0bamnpI96yWSM4DhRmybpDkGrHRCefpQHyW39vMTAXQcFSTJ3l2KtbAv Jn0VDBKnsc9GAen0GaKJ6KxcmxhkzB8IR2SjaMPMf9dcX/t5Mqgo3WgKMKAKD44aDdph MO9eD7HqowI8V7DsAdO2L6xjQvaJCZjYc3BGWYZWwhAh5dLjnBURwzMTHgSEp+EqJF6c jFj/e6YS4xThfBF7bYJcyMugjQIC2tQJh66WaAuHEpT0QPZi/J4PLZDNtUcRDh4sBvC9 yiAA== X-Gm-Message-State: AC+VfDwYS3txUDEevvs7rYhRtwR+TmrxBh+o4kxKCdm9BV8/wrHgzlKz ppb1RM5yyqV5HWFGSLWrPJQXOybGBkYCVFxjEk389A== X-Received: by 2002:a05:6808:1487:b0:392:18e2:55fb with SMTP id e7-20020a056808148700b0039218e255fbmr3829178oiw.23.1682962621999; Mon, 01 May 2023 10:37:01 -0700 (PDT) Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com. [209.85.160.42]) by smtp.gmail.com with ESMTPSA id a1-20020a544e01000000b003896f132821sm6344154oiy.41.2023.05.01.10.37.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 May 2023 10:37:01 -0700 (PDT) Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-187af4a5437so2388028fac.0 for ; Mon, 01 May 2023 10:37:01 -0700 (PDT) X-Received: by 2002:a17:90a:1543:b0:24b:2f97:9208 with SMTP id y3-20020a17090a154300b0024b2f979208mr14865070pja.0.1682962600487; Mon, 01 May 2023 10:36:40 -0700 (PDT) MIME-Version: 1.0 References: <20230321-kexec_clang16-v6-0-a2255e81ab45@chromium.org> <20230321-kexec_clang16-v6-4-a2255e81ab45@chromium.org> <20230501-griminess-defiling-73b367bb2e47@spud> In-Reply-To: <20230501-griminess-defiling-73b367bb2e47@spud> From: Ricardo Ribalda Date: Mon, 1 May 2023 19:36:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 4/4] risc/purgatory: Add linker script To: Conor Dooley Cc: Nick Desaulniers , Eric Biederman , Philipp Rudo , Dave Young , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Nathan Chancellor , Tom Rix , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Baoquan He , Philipp Rudo , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Ross Zwisler , Steven Rostedt , Simon Horman , llvm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Conor Fixed on my branch https://git.kernel.org/pub/scm/linux/kernel/git/ribalda/linux.git/commit/?h= =3Db4/kexec_clang16&id=3D1e9cda9fa638cc72581986f60b490cc069a38f75 Will submit a new version after a while :) Thanks! On Mon, 1 May 2023 at 19:28, Conor Dooley wrote: > > On Mon, May 01, 2023 at 07:18:12PM +0200, Ricardo Ribalda wrote: > > On Mon, 1 May 2023 at 18:19, Nick Desaulniers = wrote: > > > > > > On Mon, May 1, 2023 at 5:39=E2=80=AFAM Ricardo Ribalda wrote: > > > > > > > > If PGO is enabled, the purgatory ends up with multiple .text sectio= ns. > > > > This is not supported by kexec and crashes the system. > > > > > > > > Cc: stable@vger.kernel.org > > > > Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_pu= ragory") > > > > Signed-off-by: Ricardo Ribalda > > > > > > Hi Ricardo, > > > Thanks for the series. Does this patch 4/4 need a new online commit > > > description? It's not adding a linker script (maybe an earlier versio= n > > > was). > > > Thanks for catching this. It should have said > > > > risc/purgatory: Remove profile optimization flags > ^^ > Perhaps with the omitted v added too? > > Also while playing the $subject nitpicking game, is it not called > "profile**-guided** optimisation" (and ditto in the comments)? > > Cheers, > Conor. > > > Will fix it on my local branch in case there is a next version of the > > series. Otherwise, please the maintainer fix the subject. > > > > > --- > > > > arch/riscv/purgatory/Makefile | 5 +++++ > > > > 1 file changed, 5 insertions(+) > > > > > > > > diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/M= akefile > > > > index 5730797a6b40..cf3a44121a90 100644 > > > > --- a/arch/riscv/purgatory/Makefile > > > > +++ b/arch/riscv/purgatory/Makefile > > > > @@ -35,6 +35,11 @@ CFLAGS_sha256.o :=3D -D__DISABLE_EXPORTS > > > > CFLAGS_string.o :=3D -D__DISABLE_EXPORTS > > > > CFLAGS_ctype.o :=3D -D__DISABLE_EXPORTS > > > > > > > > +# When profile optimization is enabled, llvm emits two different o= verlapping > > > > +# text sections, which is not supported by kexec. Remove profile o= ptimization > > > > +# flags. > > > > +KBUILD_CFLAGS :=3D $(filter-out -fprofile-sample-use=3D% -fprofile= -use=3D%,$(KBUILD_CFLAGS)) > > > > + > > > > # When linking purgatory.ro with -r unresolved symbols are not che= cked, > > > > # also link a purgatory.chk binary without -r to check for unresol= ved symbols. > > > > PURGATORY_LDFLAGS :=3D -e purgatory_start -z nodefaultlib > > > > > > > > -- > > > > 2.40.1.495.gc816e09b53d-goog > > > > > > > > > > > > > -- > > > Thanks, > > > ~Nick Desaulniers > > > > > > > > -- > > Ricardo Ribalda > > > > _______________________________________________ > > linux-riscv mailing list > > linux-riscv@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-riscv --=20 Ricardo Ribalda