Re: [RFC PATCH v3 06/15] jump_label: Add forceful jump label type

From: Peter Zijlstra
Date: Wed Nov 20 2024 - 05:24:07 EST


On Tue, Nov 19, 2024 at 04:05:32PM -0800, Josh Poimboeuf wrote:
> On Tue, Nov 19, 2024 at 04:34:53PM +0100, Valentin Schneider wrote:
> > +++ b/include/linux/jump_label.h
> > @@ -200,7 +200,8 @@ struct module;
> > #define JUMP_TYPE_FALSE 0UL
> > #define JUMP_TYPE_TRUE 1UL
> > #define JUMP_TYPE_LINKED 2UL
> > -#define JUMP_TYPE_MASK 3UL
> > +#define JUMP_TYPE_FORCEFUL 4UL
> > +#define JUMP_TYPE_MASK 7UL
>
> Hm, I don't think we can (ab)use this pointer bit on 32-bit arches, as
> the address could be 4 byte aligned?

Right, you can force the alignment of the thing, workqueues do similar
hacks to get more bits.