[PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears

Segher Boessenkool segher at kernel.crashing.org
Tue Jun 14 21:43:47 AEST 2022


On Tue, Jun 14, 2022 at 02:31:01PM +1000, Michael Ellerman wrote:
> Segher Boessenkool <segher at kernel.crashing.org> writes:
> > On Sat, Jun 11, 2022 at 08:42:27AM +0000, Christophe Leroy wrote:
> >> I'd have a preference for using a verb, for instance ZEROISE_REGS or 
> >> CLEAR_REGS
> >
> > "Zero" is a verb as well (as well as a noun and an adjective) :-)
> 
> And "clear" is also a verb and an adjective, though helpfully the noun
> is "clearing" :D

Yeah.  I don't like "clear" here because it isn't as clear what it
actually will do.  The purpose here is to actually makes those registers
hold the number zero, it isn't just to make it harmless some way.  Which
btw is the context in which "zeroisation" is normally used: in crypto
and other security stuff.

But "zero_regs" can be confusing in other ways, like, if it isn't clear
to the reader it is a verb here.

> We could use "nullify", that has some existing usage in the kernel,
> although I don't really mind, "zeroise" sounds kind of cool :)

That is a benefit yes :-)  And it won't be confusing what it does.


Segher


More information about the Linuxppc-dev mailing list