Skip to content

Commit

Permalink
bpf, doc: Correct one wrong value in "Register value tracking"
Browse files Browse the repository at this point in the history
If we then OR this with 0x40, then the value of 6th bit (0th is first bit)
become known, so the right mask is 0xbf instead of 0xcf.

Signed-off-by: Wang YanQing <[email protected]>
Acked-by: Edward Cree <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
  • Loading branch information
wyqkp authored and borkmann committed Jan 24, 2018
1 parent 1fc0bf4 commit e9dcd80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/networking/filter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ The verifier's knowledge about the variable offset consists of:
mask and value; no bit should ever be 1 in both. For example, if a byte is read
into a register from memory, the register's top 56 bits are known zero, while
the low 8 are unknown - which is represented as the tnum (0x0; 0xff). If we
then OR this with 0x40, we get (0x40; 0xcf), then if we add 1 we get (0x0;
then OR this with 0x40, we get (0x40; 0xbf), then if we add 1 we get (0x0;
0x1ff), because of potential carries.
Besides arithmetic, the register state can also be updated by conditional
branches. For instance, if a SCALAR_VALUE is compared > 8, in the 'true' branch
Expand Down

0 comments on commit e9dcd80

Please sign in to comment.