Re: [PATCH] riscv: cfi: reject unknown flags in PR_SET_CFI

From: Paul Walmsley

Date: Thu Jun 04 2026 - 18:40:39 EST


Hi,

On Mon, 18 May 2026, Richard Patel wrote:

> prctl(PR_SET_CFI,PR_CFI_BRANCH_LANDING_PADS) silently ignored
> unknown control values. Only PR_CFI_{ENABLE,DISABLE,LOCK} should
> be permitted.
<
> This is a uABI breaking change (fails previously accepted bits
> with EINVAL).

Thanks for the patch. However, I'm not convinced that this actually
breaks anything. The behavior of the interface changes when unknown flags
are specified, but I'm not aware of anything that relies on this specific
behavior.

Does that match your understanding?


- Paul