Re: [PATCH bpf-next 1/2] bpf: verifier: use check_add_overflow() to check for addition overflows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 23, 2024 at 12:03 AM Shung-Hsi Yu <shung-hsi.yu@xxxxxxxx> wrote:
>
> signed_add*_overflows() was added back when there was no overflow-check
> helper. With the introduction of such helpers in commit f0907827a8a91
> ("compiler.h: enable builtin overflow checkers and add fallback code"), we
> can drop signed_add*_overflows() in kernel/bpf/verifier.c and use the
> generic check_add_overflow() instead.
>
> This will make future refactoring easier, and possibly taking advantage of
> compiler-emitted hardware instructions that efficiently implement these
> checks.
>
> Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@xxxxxxxx>
> ---
> shung-hsi.yu: maybe there's a better name instead of {min,max}_cur, but
> I coudln't come up with one.

Just smin/smax without _cur suffix ?

What is the asm before/after ?





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux