Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix check for static initialization of hash-of-maps key length. #3260

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

shankarseal
Copy link
Collaborator

Description

This fixes #3259. Moved the check for key length restriction only if there are more than one values statically initialized.

Testing

Added non-initializing map in test program.

Documentation

No.

Installation

No.

Alan-Jowett
Alan-Jowett previously approved these changes Feb 14, 2024
@shankarseal shankarseal added this pull request to the merge queue Feb 14, 2024
Merged via the queue into microsoft:main with commit b2ee88b Feb 14, 2024
76 checks passed
@shankarseal shankarseal deleted the fix_bpf2c_codegen branch February 14, 2024 04:37
shpalani pushed a commit to shpalani/ebpf-for-windows that referenced this pull request Feb 14, 2024
…osoft#3260)

* fix check for static initialization of hash-of-maps key length.

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_dll.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_raw.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_sys.c

* fix build failure

---------

Co-authored-by: Anurag Saxena <anusa@microsoft.com>
shpalani pushed a commit to shpalani/ebpf-for-windows that referenced this pull request Feb 15, 2024
…osoft#3260)

* fix check for static initialization of hash-of-maps key length.

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_dll.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_raw.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_sys.c

* fix build failure

---------

Co-authored-by: Anurag Saxena <anusa@microsoft.com>
shpalani pushed a commit to shpalani/ebpf-for-windows that referenced this pull request Feb 15, 2024
…osoft#3260)

* fix check for static initialization of hash-of-maps key length.

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_dll.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_raw.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_sys.c

* fix build failure

---------

Co-authored-by: Anurag Saxena <anusa@microsoft.com>
shpalani added a commit that referenced this pull request Feb 16, 2024
* fix check for static initialization of hash-of-maps key length. (#3260)

* fix check for static initialization of hash-of-maps key length.

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_dll.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_raw.c

* Delete tests/bpf2c_tests/expected/xdp_adjust_head_unsafe_sys.c

* fix build failure

---------

Co-authored-by: Anurag Saxena <anusa@microsoft.com>

* Revert "Helper reallocate packet (#3110)" (#3263)

This reverts commit 13eed74.

* bump version to 0.14.1

* fix test

---------

Co-authored-by: Shankar Seal <74580197+shankarseal@users.noreply.github.com>
Co-authored-by: Anurag Saxena <anusa@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HASH_OF_MAPS: Incorrect check for key length while parsing BTF maps
5 participants