mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Madhavan Srinivasan <maddy@linux.ibm.com>
To: Naveen N Rao <naveen@kernel.org>,
	Jan Stancek <jstancek@redhat.com>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com,
	christophe.leroy@csgroup.eu, linux-kernel@vger.kernel.org,
	joe.lawrence@redhat.com
Subject: Re: [PATCH RESEND] powerpc/tools: drop `-o pipefail` in gcc check scripts
Date: Tue, 9 Dec 2025 09:31:11 +0530	[thread overview]
Message-ID: <d3e78669-409f-4041-b194-864019bdd7fc@linux.ibm.com> (raw)
In-Reply-To: <caut6db7r6loimb2bk4zoqkqmfd3mhvzmv6ntsltf3tr4k4c2n@fbyhls233oys>


On 12/3/25 9:29 AM, Naveen N Rao wrote:
> On Tue, Sep 23, 2025 at 05:32:16PM +0200, Jan Stancek wrote:
>> We've been observing rare non-deterministic kconfig failures during
>> olddefconfig, where ARCH_USING_PATCHABLE_FUNCTION_ENTRY was getting
>> disabled and with it number of other config options that depend on it.
>>
>> The reason is that gcc-check-fpatchable-function-entry.sh can fail
>> if `grep -q` (or scripts/dummy-tools/gcc) is fast enough to exit while
>> there is still someone writing on other side of pipe. `pipefail`
>> propagates that error up to kconfig.
>>
>> This can be seen for example with:
>>    # (set -e; set -o pipefail; yes | grep -q y); echo $?
>>    141
>>
>> or by running the actual check script in loop extensively:
>>    ----------------------------- 8< -------------------------------
>>    function kconfig()
>>    {
>>      for i in `seq 1 100`; do
>>        arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh \
>>          ./scripts/dummy-tools/gcc -mlittle-endian \
>>          || { echo "Oops"; exit 1; }
>>      done
>>    }
>>
>>    for ((i=0; i<$(nproc); i++)); do kconfig & done
>>    wait; echo "Done"
>>    ----------------------------- >8 -------------------------------
>>
>> Fixes: 0f71dcfb4aef ("powerpc/ftrace: Add support for -fpatchable-function-entry")
>> Fixes: b71c9ffb1405 ("powerpc: Add arch/powerpc/tools directory")
> The latter fixes tag should probably tag one of the below commits which
> actually introduced pipefail, or introduced it in Kconfig:
> Fixes: 8c50b72a3b4f ("powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel")
>    or:
> Fixes: abba759796f9 ("powerpc/kbuild: move -mprofile-kernel check to Kconfig")
>
>> Reported-by: Joe Lawrence <joe.lawrence@redhat.com>
>> Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
>> Signed-off-by: Jan Stancek <jstancek@redhat.com>
>> ---
>>   arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh | 1 -
>>   arch/powerpc/tools/gcc-check-mprofile-kernel.sh           | 1 -
>>   2 files changed, 2 deletions(-)
> Other than that, thanks for fixing this. This LGTM.
> Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org>
>
> Maddy/Michael,
> Can you please pick this up?
Thanks naveen. Will put it in one of the -rc

Maddy
>
>
> Thanks,
> Naveen
>

  reply	other threads:[~2025-12-09  4:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 15:32 Jan Stancek
2025-10-06 20:19 ` Justin Forbes
2025-10-30 18:09   ` Jan Stancek
2025-11-10 11:33     ` Christophe Leroy
2025-11-11  7:13       ` Jan Stancek
2025-10-31 20:28 ` Josh Poimboeuf
2025-11-12 22:56 ` Josh Poimboeuf
2025-11-20 20:15   ` Josh Poimboeuf
2025-12-02 18:25     ` Josh Poimboeuf
2025-12-03  3:59 ` Naveen N Rao
2025-12-09  4:01   ` Madhavan Srinivasan [this message]
2025-12-27  4:23 ` Madhavan Srinivasan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3e78669-409f-4041-b194-864019bdd7fc@linux.ibm.com \
    --to=maddy@linux.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=joe.lawrence@redhat.com \
    --cc=jstancek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®