Thread (24 messages) 24 messages, 5 authors, 2022-01-14

Re: [PATCH 1/3] powerpc: Properly return error code from do_patch_instruction()

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2020-04-24 13:18:26

On Thu, 23 Apr 2020 18:21:14 +0200
Christophe Leroy [off-list ref] wrote:
Le 23/04/2020 à 17:09, Naveen N. Rao a écrit :
quoted
With STRICT_KERNEL_RWX, we are currently ignoring return value from
__patch_instruction() in do_patch_instruction(), resulting in the error
not being propagated back. Fix the same.  
Good patch.

Be aware that there is ongoing work which tend to wanting to replace 
error reporting by BUG_ON() . See 
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=166003
Thanks for the reference. I still believe that WARN_ON() should be used in
99% of the cases, including here. And only do a BUG_ON() when you know
there's no recovering from it.

In fact, there's still BUG_ON()s in my code that I need to convert to
WARN_ON() (it was written when BUG_ON() was still acceptable ;-)

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help