Commit eb6bbdf
binary changes to enable userns in shiv
Summary:
For enabling userns for shiv in twshared we need a few changes.
- In the spec we add the required flag and enable userns + use bpf token capability gated by feature rollout (D82478708)
- In the binary we need to retrieve the bpf token and use it for all map operations, if not passed operations fail (P1948903648).
- For bpf program names have a limit of 15 chars + null termination (https://www.kernel.org/doc/html/v5.14/bpf/libbpf/libbpf_naming_convention.html?utm_source=chatgpt.com) due to how it's accessed now, the name is truncated when we retrieve it and try to validate it so it fails with: P1948906354. For this now we check if the full name is correct for backwards compatibility, if not we truncate to 15 chars and check again.
Reviewed By: avasylev
Differential Revision: D77978567
fbshipit-source-id: 1d4f8fb4e5410b3df67fb1ad57c46c89f930a4e61 parent 753eb70 commit eb6bbdf
3 files changed
Lines changed: 48 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
| |||
597 | 602 | | |
598 | 603 | | |
599 | 604 | | |
600 | | - | |
| 605 | + | |
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
| |||
921 | 926 | | |
922 | 927 | | |
923 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
924 | 951 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
672 | 674 | | |
673 | 675 | | |
674 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
675 | 691 | | |
676 | 692 | | |
677 | 693 | | |
| |||
729 | 745 | | |
730 | 746 | | |
731 | 747 | | |
| 748 | + | |
| 749 | + | |
732 | 750 | | |
733 | 751 | | |
734 | 752 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
| 490 | + | |
| 491 | + | |
494 | 492 | | |
495 | 493 | | |
496 | 494 | | |
| |||
0 commit comments