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 ?