Re: [patch v2 08/11] futex: Add robust futex unlock IP range
From: Peter Zijlstra
Date: Fri Mar 20 2026 - 05:08:11 EST
On Fri, Mar 20, 2026 at 12:24:46AM +0100, Thomas Gleixner wrote:
> /**
> + * struct futex_unlock_cs_range - Range for the VDSO unlock critical section
> + * @start_ip: The start IP of the robust futex unlock critical section (inclusive)
> + * @end_ip: The end IP of the robust futex unlock critical section (exclusive)
> + * @pop_size32: Pending OP pointer size indicator. 0 == 64-bit, 1 == 32-bit
> + */
> +struct futex_unlock_cs_range {
> + unsigned long start_ip;
> + unsigned long end_ip;
> + unsigned int pop_size32;
> +};
> +
> +#define FUTEX_ROBUST_MAX_CS_RANGES 2
Would it make sense to write that like:
#define FUTEX_ROBUST_MAX_CS_RANGE (1+IS_ENABLED(CONFIG_COMPAT))
Given you only ever use that second entry when COMPAT?