netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf, doc: Correct one wrong value in "Register value tracking"
@ 2018-01-24  7:48 Wang YanQing
  2018-01-24 15:09 ` Edward Cree
  2018-01-24 15:44 ` Daniel Borkmann
  0 siblings, 2 replies; 3+ messages in thread
From: Wang YanQing @ 2018-01-24  7:48 UTC (permalink / raw)
  To: davem; +Cc: ast, daniel, netdev, linux-kernel

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 <udknight@gmail.com>
---
 Documentation/networking/filter.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt
index 8781485..a4508ec 100644
--- a/Documentation/networking/filter.txt
+++ b/Documentation/networking/filter.txt
@@ -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
-- 
1.8.5.6.2.g3d8a54e.dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-24 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-24  7:48 [PATCH] bpf, doc: Correct one wrong value in "Register value tracking" Wang YanQing
2018-01-24 15:09 ` Edward Cree
2018-01-24 15:44 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).