ubuntu_bpf XDP failures on v4.15

Bug #1960640 reported by Krzysztof Kozlowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

2022.01.31/bionic/linux-azure-4.15/4.15.0-1131.144
test: ubuntu_bpf

Several XDP failures:
------------
14563 02:11:05 DEBUG| [stdout] #470/p XDP pkt read, pkt_end > pkt_data', good access OK
14564 02:11:05 DEBUG| [stdout] #471/p XDP pkt read, pkt_end > pkt_data', bad access 1 FAIL
14565 02:11:05 DEBUG| [stdout] Unexpected success to load!
14566 02:11:05 DEBUG| [stdout] 0: (61) r2 = *(u32 *)(r1 +0)
14567 02:11:05 DEBUG| [stdout] 1: (61) r3 = *(u32 *)(r1 +4)
14568 02:11:05 DEBUG| [stdout] 2: (bf) r1 = r2
14569 02:11:05 DEBUG| [stdout] 3: (07) r1 += 8
14570 02:11:05 DEBUG| [stdout] 4: (2d) if r3 > r1 goto pc+1
14571 02:11:05 DEBUG| [stdout] R1=pkt(id=0,off=8,r=0,imm=0) R2=pkt(id=0,off=0,r=0,imm=0) R3=pkt_end(id=0,off=0,imm=0) R10=fp0
14572 02:11:05 DEBUG| [stdout] 5: (05) goto pc+1
14573 02:11:05 DEBUG| [stdout] 7: (b7) r0 = 0
14574 02:11:05 DEBUG| [stdout] 8: (95) exit
14575 02:11:05 DEBUG| [stdout]
14576 02:11:05 DEBUG| [stdout] from 4 to 6: R1=pkt(id=0,off=8,r=9,imm=0) R2=pkt(id=0,off=0,r=9,imm=0) R3=pkt_end(id=0,off=0,imm=0) R10=fp0
14577 02:11:05 DEBUG| [stdout] 6: (79) r0 = *(u64 *)(r1 -8)
14578 02:11:05 DEBUG| [stdout] 7: (b7) r0 = 0
14579 02:11:05 DEBUG| [stdout] 8: (95) exit
14580 02:11:05 DEBUG| [stdout] processed 11 insns, stack depth 0
14581 02:11:05 DEBUG| [stdout] #472/p XDP pkt read, pkt_end > pkt_data', bad access 2 OK
14582 02:11:05 DEBUG| [stdout] #473/p XDP pkt read, pkt_data' < pkt_end, good access OK
14583 02:11:05 DEBUG| [stdout] #474/p XDP pkt read, pkt_data' < pkt_end, bad access 1 FAIL
14584 02:11:05 DEBUG| [stdout] Unexpected success to load!
14585 02:11:05 DEBUG| [stdout] 0: (61) r2 = *(u32 *)(r1 +0)
14586 02:11:05 DEBUG| [stdout] 1: (61) r3 = *(u32 *)(r1 +4)
14587 02:11:05 DEBUG| [stdout] 2: (bf) r1 = r2
14588 02:11:05 DEBUG| [stdout] 3: (07) r1 += 8
14589 02:11:05 DEBUG| [stdout] 4: (ad) if r1 < r3 goto pc+1
14590 02:11:05 DEBUG| [stdout] R1=pkt(id=0,off=8,r=0,imm=0) R2=pkt(id=0,off=0,r=0,imm=0) R3=pkt_end(id=0,off=0,imm=0) R10=fp0
14591 02:11:05 DEBUG| [stdout] 5: (05) goto pc+1
14592 02:11:05 DEBUG| [stdout] 7: (b7) r0 = 0
14593 02:11:05 DEBUG| [stdout] 8: (95) exit
14594 02:11:05 DEBUG| [stdout]
14595 02:11:05 DEBUG| [stdout] from 4 to 6: R1=pkt(id=0,off=8,r=9,imm=0) R2=pkt(id=0,off=0,r=9,imm=0) R3=pkt_end(id=0,off=0,imm=0) R10=fp0
14596 02:11:05 DEBUG| [stdout] 6: (79) r0 = *(u64 *)(r1 -8)
14597 02:11:05 DEBUG| [stdout] 7: (b7) r0 = 0
14598 02:11:05 DEBUG| [stdout] 8: (95) exit
14599 02:11:05 DEBUG| [stdout] processed 11 insns, stack depth 0
14600 02:11:05 DEBUG| [stdout] #475/p XDP pkt read, pkt_data' < pkt_end, bad access 2 OK
14601 02:11:05 DEBUG| [stdout] #476/p XDP pkt read, pkt_end < pkt_data', good access OK
14602 02:11:05 DEBUG| [stdout] #477/p XDP pkt read, pkt_end < pkt_data', bad access 1 OK
14603 02:11:05 DEBUG| [stdout] #478/p XDP pkt read, pkt_end < pkt_data', bad access 2 OK
14604 02:11:05 DEBUG| [stdout] #479/p XDP pkt read, pkt_data' >= pkt_end, good access OK
14605 02:11:05 DEBUG| [stdout] #480/p XDP pkt read, pkt_data' >= pkt_end, bad access 1 FAIL
14606 02:11:05 DEBUG| [stdout] Unexpected success to load!
14607 02:11:05 DEBUG| [stdout] 0: (61) r2 = *(u32 *)(r1 +0)
14608 02:11:05 DEBUG| [stdout] 1: (61) r3 = *(u32 *)(r1 +4)
14609 02:11:05 DEBUG| [stdout] 2: (bf) r1 = r2
14610 02:11:05 DEBUG| [stdout] 3: (07) r1 += 8
14611 02:11:05 DEBUG| [stdout] 4: (3d) if r1 >= r3 goto pc+1
14612 02:11:05 DEBUG| [stdout] R1=pkt(id=0,off=8,r=9,imm=0) R2=pkt(id=0,off=0,r=9,imm=0) R3=pkt_end(id=0,off=0,imm=0) R10=fp0
14613 02:11:05 DEBUG| [stdout] 5: (79) r0 = *(u64 *)(r1 -8)
14614 02:11:05 DEBUG| [stdout] 6: (b7) r0 = 0
14615 02:11:05 DEBUG| [stdout] 7: (95) exit
14616 02:11:05 DEBUG| [stdout]
14617 02:11:05 DEBUG| [stdout] from 4 to 6: safe
14618 02:11:05 DEBUG| [stdout] processed 9 insns, stack depth 0
------------

Possible cause:
Insufficient/incorrect backport of commit 2fa7d94afc1a ("bpf: Fix the off-by-two error in range markings") to v4.15.

Our v4.15 skips entirely test udpate because path does not match (because oif later commit 48729226238d ("selftests: bpf: break up the rest of test_verifier")).

tags: added: 4.15 azure bionic sru-20220131 ubuntu-bpf
Revision history for this message
Krzysztof Kozlowski (krzk) wrote :

Reverting our backport of commit 2fa7d94afc1a ("bpf: Fix the off-by-two error in range markings") fixes the test failure, so indeed these are missing parts of 2fa7d94afc1a test-case update.

Revision history for this message
Krzysztof Kozlowski (krzk) wrote :

Also: 2022.02.21/bionic/linux-azure-4.15/4.15.0-1132.145

tags: added: sru-20220221
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This can be found on B-oracle-4.15 as well.
* 4.15.0-1086.94 cycle 20220103 - GOOD
* 4.15.0-1087.95 cycle 20220131 - BAD (start failing since this version)

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This issue can be found on B-gcp-4.15 / B-gcp-fips / B-aws as well.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This issue has been fixed in sru-20221114
  * bionic/linux-aws/4.15.0-1147.159
  * bionic/linux-aws-fips/4.15.0-2083.89
  * bionic/linux-azure-4.15/4.15.0-1158.173
  * bionic/linux-azure-fips/4.15.0-2067.73
  * bionic/linux-gcp-4.15/4.15.0-1142.158
  * bionic/linux-gcp-fips/4.15.0-2051.56
  * bionic/linux-oracle/4.15.0-1109.120

And the test_verifier is now failing with bug 2015833.
Closing this bug and remove hints.

Changed in ubuntu-kernel-tests:
status: New → Fix Released
affects: linux → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.