public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead•org>
To: Naveen N Rao <naveen@kernel•org>
Cc: linux-kernel@vger•kernel.org, Nicholas Piggin <npiggin@gmail•com>,
	Sathvika Vasireddy <sv@linux•ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux•ibm.com>,
	linuxppc-dev@lists•ozlabs.org,
	Josh Poimboeuf <jpoimboe@kernel•org>
Subject: Re: [RFC PATCH v1 1/3] Revert "powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto"
Date: Tue, 20 Jun 2023 09:10:05 +0200	[thread overview]
Message-ID: <20230620071005.GR4253@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1687237941.1wok7iiqm0.naveen@kernel.org>

On Tue, Jun 20, 2023 at 10:51:25AM +0530, Naveen N Rao wrote:
> Christophe Leroy wrote:
> > This reverts commit 1e688dd2a3d6759d416616ff07afc4bb836c4213.
> > 
> > That commit aimed at optimising the code around generation of
> > WARN_ON/BUG_ON but this leads to a lot of dead code erroneously
> > generated by GCC.
> > 
> >      text	   data	    bss	    dec	    hex	filename
> >   9551585	3627834	 224376	13403795	 cc8693	vmlinux.before
> >   9535281	3628358	 224376	13388015	 cc48ef	vmlinux.after
> > 
> > Once this change is reverted, in a standard configuration (pmac32 +
> > function tracer) the text is reduced by 16k which is around 1.7%
> 
> Aneesh recently reported a build failure due to the use of 'asm goto' in
> WARN_ON(). We were able to root-cause it to the use of 'asm goto' with two
> config options: CONFIG_CC_OPTIMIZE_FOR_SIZE and
> CONFIG_DEBUG_SECTION_MISMATCH.

FWIW;

I recently had clang-powerpc report a very dodgy build error that was
due to a combination of these asm-goto and the usage of __cleanup__.
For some reason the label of the asm-goto crossed over the __cleanup__
variable declaration -- which is not valid, but also was completely
insane for that's not what the code called for.

  https://lkml.kernel.org/r/20230610082005.GB1370249@hirez.programming.kicks-ass.net

But in my book that's a compiler issue, not a kernel issue and I'd be
hesitant to pull the asm-goto use just for that.



  reply	other threads:[~2023-06-20  7:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 13:47 [RFC PATCH v1 0/3] powerpc/objtool: First step towards uaccess validation (v1) Christophe Leroy
2023-06-16 13:47 ` [RFC PATCH v1 1/3] Revert "powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto" Christophe Leroy
2023-06-20  5:21   ` Naveen N Rao
2023-06-20  7:10     ` Peter Zijlstra [this message]
2023-06-16 13:47 ` [RFC PATCH v1 2/3] powerpc: Mark all .S files invalid for objtool Christophe Leroy
2023-06-20  6:04   ` Naveen N Rao
2023-06-20  6:15     ` Christophe Leroy
2023-06-20  6:40       ` Naveen N Rao
2023-06-16 13:47 ` [RFC PATCH v1 3/3] powerpc: WIP draft support to objtool check Christophe Leroy
2023-06-16 14:43   ` Peter Zijlstra

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=20230620071005.GR4253@hirez.programming.kicks-ass.net \
    --to=peterz@infradead$(echo .)org \
    --cc=aneesh.kumar@linux$(echo .)ibm.com \
    --cc=jpoimboe@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=naveen@kernel$(echo .)org \
    --cc=npiggin@gmail$(echo .)com \
    --cc=sv@linux$(echo .)ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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