On Sun, 2026-01-18 at 16:16 +0800, Zesen Liu wrote:
> Add check to ensure that ARG_PTR_TO_MEM is used with either MEM_WRITE or
> MEM_RDONLY.
> 
> Using ARG_PTR_TO_MEM alone without tags does not make sense because:
> 
> - If the helper does not change the argument, missing MEM_RDONLY causes the
> verifier to incorrectly reject a read-only buffer.
> - If the helper does change the argument, missing MEM_WRITE causes the
> verifier to incorrectly assume the memory is unchanged, leading to errors
> in code optimization.
> 
> Co-developed-by: Shuran Liu <[email protected]>
> Signed-off-by: Shuran Liu <[email protected]>
> Co-developed-by: Peili Gao <[email protected]>
> Signed-off-by: Peili Gao <[email protected]>
> Co-developed-by: Haoran Ni <[email protected]>
> Signed-off-by: Haoran Ni <[email protected]>
> Signed-off-by: Zesen Liu <[email protected]>
> ---

Note: this patch no longer applies properly because of the change in
      the check_func_proto() signature.

[...]

Reply via email to