On Wed, Nov 29, 2023 at 3:28 AM Shung-Hsi Yu <shung-hsi.yu@xxxxxxxx> wrote: > > On Tue, Nov 28, 2023 at 04:36:10PM -0800, Andrii Nakryiko wrote: > > This patch set fixes BPF verifier logic around validating and enforcing return > > values for BPF programs that have specific range of expected return values. > > Both sync and async callbacks have similar logic and are fixes as well. > > A few tests are added that would fail without the fixes in this patch set. > > > > Also, while at it, we update retval checking logic to use umin/umax range > > Looks like this should be change to smin/smax as well > yep, thanks, I fixed up few more places where I missed umin/umax -> smin/smax updates > > instead of tnum, avoiding future potential issues if expected range cannot be > > represented precisely by tnum (e.g., [0, 2] is not representable by tnum and > > is treated as [0, 3]). > > > > There is a little bit of refactoring to unify async callback and program exit > > logic to avoid duplication of checks as much as possible. > > > > v1->v2: > > - drop tnum from retval checks (Eduard); > > - use smin/smax instead of umin/umax (Alexei). > > ...