[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230310160952.161d6833@gandalf.local.home>
Date: Fri, 10 Mar 2023 16:09:52 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Mark Rutland <mark.rutland@....com>,
Jason Baron <jbaron@...mai.com>,
Ard Biesheuvel <ardb@...nel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>
Subject: Re: [RFC][PATCH 0/5] Improve static call NULL handling
On Fri, 10 Mar 2023 12:31:12 -0800
Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> static_call_update(foo, STATIC_CALL_NOP); // do nothing and return 0
> static_call_update(foo, STATIC_CALL_BUG); // panic
> static_call_update(foo, NULL); // ???
>
> The default behavior for NULL could be a key-specific policy, stored as
> a flag in the static_call_key struct.
Could we just get rid of the ambiguity and make
static_call_update(foo, NULL);
trigger a WARN_ON() instead, and always do nop?
The issue I have with allowing NULL, is that it's not easy to know from the
call site what it does.
-- Steve
Powered by blists - more mailing lists