Commit 053b212
Alexei Starovoitov
Merge branch 'fixes-for-bits-iterator'
Hou Tao says:
====================
The patch set fixes several issues in bits iterator. Patch #1 fixes the
kmemleak problem of bits iterator. Patch #2~#3 fix the overflow problem
of nr_bits. Patch #4 fixes the potential stack corruption when bits
iterator is used on 32-bit host. Patch #5 adds more test cases for bits
iterator.
Please see the individual patches for more details. And comments are
always welcome.
---
v4:
* patch #1: add ack from Yafang
* patch #3: revert code-churn like changes:
(1) compute nr_bytes and nr_bits before the check of nr_words.
(2) use nr_bits == 64 to check for single u64, preventing build
warning on 32-bit hosts.
* patch #4: use "BITS_PER_LONG == 32" instead of "!defined(CONFIG_64BIT)"
v3: https://lore.kernel.org/bpf/[email protected]/T/#t
* split the bits-iterator related patches from "Misc fixes for bpf"
patch set
* patch #1: use "!nr_bits || bits >= nr_bits" to stop the iteration
* patch #2: add a new helper for the overflow problem
* patch #3: decrease the limitation from 512 to 511 and check whether
nr_bytes is too large for bpf memory allocator explicitly
* patch #5: add two more test cases for bit iterator
v2: http://lore.kernel.org/bpf/[email protected]
====================
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>File tree
4 files changed
+118
-14
lines changed- include/linux
- kernel/bpf
- tools/testing/selftests/bpf/progs
4 files changed
+118
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2851 | 2851 | | |
2852 | 2852 | | |
2853 | 2853 | | |
| 2854 | + | |
| 2855 | + | |
2854 | 2856 | | |
2855 | 2857 | | |
2856 | | - | |
2857 | | - | |
| 2858 | + | |
| 2859 | + | |
2858 | 2860 | | |
2859 | | - | |
| 2861 | + | |
2860 | 2862 | | |
2861 | 2863 | | |
2862 | 2864 | | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
2863 | 2888 | | |
2864 | 2889 | | |
2865 | 2890 | | |
2866 | 2891 | | |
2867 | 2892 | | |
2868 | | - | |
| 2893 | + | |
| 2894 | + | |
2869 | 2895 | | |
2870 | 2896 | | |
2871 | 2897 | | |
| |||
2892 | 2918 | | |
2893 | 2919 | | |
2894 | 2920 | | |
| 2921 | + | |
| 2922 | + | |
2895 | 2923 | | |
2896 | 2924 | | |
2897 | 2925 | | |
2898 | 2926 | | |
2899 | 2927 | | |
2900 | 2928 | | |
2901 | 2929 | | |
| 2930 | + | |
| 2931 | + | |
2902 | 2932 | | |
2903 | 2933 | | |
2904 | 2934 | | |
2905 | 2935 | | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
2906 | 2939 | | |
2907 | 2940 | | |
2908 | 2941 | | |
| |||
2914 | 2947 | | |
2915 | 2948 | | |
2916 | 2949 | | |
| 2950 | + | |
| 2951 | + | |
2917 | 2952 | | |
2918 | 2953 | | |
2919 | 2954 | | |
| |||
2930 | 2965 | | |
2931 | 2966 | | |
2932 | 2967 | | |
2933 | | - | |
2934 | | - | |
2935 | | - | |
| 2968 | + | |
| 2969 | + | |
2936 | 2970 | | |
2937 | | - | |
| 2971 | + | |
2938 | 2972 | | |
2939 | 2973 | | |
2940 | 2974 | | |
2941 | | - | |
| 2975 | + | |
2942 | 2976 | | |
2943 | | - | |
| 2977 | + | |
2944 | 2978 | | |
2945 | 2979 | | |
2946 | 2980 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | | - | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
1005 | 1007 | | |
1006 | 1008 | | |
1007 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | | - | |
| 115 | + | |
114 | 116 | | |
115 | | - | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
122 | | - | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
0 commit comments