We need the serial/tty fixes in here as well.
Showing the changes to include/linux (54 of 1395 files). Show all
Unified · Split
| @@ -77,6 +77,9 @@ · 76 unmodified lines | ||
| 77 | 77 | |
| 78 | 78 | #endif /* cmpxchg64_relaxed */ |
| 79 | 79 | |
| 80 | +#define arch_atomic_read atomic_read | |
| 81 | +#define arch_atomic_read_acquire atomic_read_acquire | |
| 82 | + | |
| 80 | 83 | #ifndef atomic_read_acquire |
| 81 | 84 | static __always_inline int |
| 82 | 85 | atomic_read_acquire(const atomic_t *v) |
| @@ -86,6 +89,9 @@ atomic_read_acquire(const atomic_t *v) · 3 unmodified lines | ||
| 86 | 89 | #define atomic_read_acquire atomic_read_acquire |
| 87 | 90 | #endif |
| 88 | 91 | |
| 92 | +#define arch_atomic_set atomic_set | |
| 93 | +#define arch_atomic_set_release atomic_set_release | |
| 94 | + | |
| 89 | 95 | #ifndef atomic_set_release |
| 90 | 96 | static __always_inline void |
| 91 | 97 | atomic_set_release(atomic_t *v, int i) |
| @@ -95,6 +101,13 @@ atomic_set_release(atomic_t *v, int i) · 3 unmodified lines | ||
| 95 | 101 | #define atomic_set_release atomic_set_release |
| 96 | 102 | #endif |
| 97 | 103 | |
| 104 | +#define arch_atomic_add atomic_add | |
| 105 | + | |
| 106 | +#define arch_atomic_add_return atomic_add_return | |
| 107 | +#define arch_atomic_add_return_acquire atomic_add_return_acquire | |
| 108 | +#define arch_atomic_add_return_release atomic_add_return_release | |
| 109 | +#define arch_atomic_add_return_relaxed atomic_add_return_relaxed | |
| 110 | + | |
| 98 | 111 | #ifndef atomic_add_return_relaxed |
| 99 | 112 | #define atomic_add_return_acquire atomic_add_return |
| 100 | 113 | #define atomic_add_return_release atomic_add_return |
| @@ -137,6 +150,11 @@ atomic_add_return(int i, atomic_t *v) · 36 unmodified lines | ||
| 137 | 150 | |
| 138 | 151 | #endif /* atomic_add_return_relaxed */ |
| 139 | 152 | |
| 153 | +#define arch_atomic_fetch_add atomic_fetch_add | |
| 154 | +#define arch_atomic_fetch_add_acquire atomic_fetch_add_acquire | |
| 155 | +#define arch_atomic_fetch_add_release atomic_fetch_add_release | |
| 156 | +#define arch_atomic_fetch_add_relaxed atomic_fetch_add_relaxed | |
| 157 | + | |
| 140 | 158 | #ifndef atomic_fetch_add_relaxed |
| 141 | 159 | #define atomic_fetch_add_acquire atomic_fetch_add |
| 142 | 160 | #define atomic_fetch_add_release atomic_fetch_add |
| @@ -179,6 +197,13 @@ atomic_fetch_add(int i, atomic_t *v) · 36 unmodified lines | ||
| 179 | 197 | |
| 180 | 198 | #endif /* atomic_fetch_add_relaxed */ |
| 181 | 199 | |
| 200 | +#define arch_atomic_sub atomic_sub | |
| 201 | + | |
| 202 | +#define arch_atomic_sub_return atomic_sub_return | |
| 203 | +#define arch_atomic_sub_return_acquire atomic_sub_return_acquire | |
| 204 | +#define arch_atomic_sub_return_release atomic_sub_return_release | |
| 205 | +#define arch_atomic_sub_return_relaxed atomic_sub_return_relaxed | |
| 206 | + | |
| 182 | 207 | #ifndef atomic_sub_return_relaxed |
| 183 | 208 | #define atomic_sub_return_acquire atomic_sub_return |
| 184 | 209 | #define atomic_sub_return_release atomic_sub_return |
| @@ -221,6 +246,11 @@ atomic_sub_return(int i, atomic_t *v) · 36 unmodified lines | ||
| 221 | 246 | |
| 222 | 247 | #endif /* atomic_sub_return_relaxed */ |
| 223 | 248 | |
| 249 | +#define arch_atomic_fetch_sub atomic_fetch_sub | |
| 250 | +#define arch_atomic_fetch_sub_acquire atomic_fetch_sub_acquire | |
| 251 | +#define arch_atomic_fetch_sub_release atomic_fetch_sub_release | |
| 252 | +#define arch_atomic_fetch_sub_relaxed atomic_fetch_sub_relaxed | |
| 253 | + | |
| 224 | 254 | #ifndef atomic_fetch_sub_relaxed |
| 225 | 255 | #define atomic_fetch_sub_acquire atomic_fetch_sub |
| 226 | 256 | #define atomic_fetch_sub_release atomic_fetch_sub |
| @@ -263,6 +293,8 @@ atomic_fetch_sub(int i, atomic_t *v) · 36 unmodified lines | ||
| 263 | 293 | |
| 264 | 294 | #endif /* atomic_fetch_sub_relaxed */ |
| 265 | 295 | |
| 296 | +#define arch_atomic_inc atomic_inc | |
| 297 | + | |
| 266 | 298 | #ifndef atomic_inc |
| 267 | 299 | static __always_inline void |
| 268 | 300 | atomic_inc(atomic_t *v) |
| @@ -272,6 +304,11 @@ atomic_inc(atomic_t *v) · 3 unmodified lines | ||
| 272 | 304 | #define atomic_inc atomic_inc |
| 273 | 305 | #endif |
| 274 | 306 | |
| 307 | +#define arch_atomic_inc_return atomic_inc_return | |
| 308 | +#define arch_atomic_inc_return_acquire atomic_inc_return_acquire | |
| 309 | +#define arch_atomic_inc_return_release atomic_inc_return_release | |
| 310 | +#define arch_atomic_inc_return_relaxed atomic_inc_return_relaxed | |
| 311 | + | |
| 275 | 312 | #ifndef atomic_inc_return_relaxed |
| 276 | 313 | #ifdef atomic_inc_return |
| 277 | 314 | #define atomic_inc_return_acquire atomic_inc_return |
| @@ -353,6 +390,11 @@ atomic_inc_return(atomic_t *v) · 75 unmodified lines | ||
| 353 | 390 | |
| 354 | 391 | #endif /* atomic_inc_return_relaxed */ |
| 355 | 392 | |
| 393 | +#define arch_atomic_fetch_inc atomic_fetch_inc | |
| 394 | +#define arch_atomic_fetch_inc_acquire atomic_fetch_inc_acquire | |
| 395 | +#define arch_atomic_fetch_inc_release atomic_fetch_inc_release | |
| 396 | +#define arch_atomic_fetch_inc_relaxed atomic_fetch_inc_relaxed | |
| 397 | + | |
| 356 | 398 | #ifndef atomic_fetch_inc_relaxed |
| 357 | 399 | #ifdef atomic_fetch_inc |
| 358 | 400 | #define atomic_fetch_inc_acquire atomic_fetch_inc |
| @@ -434,6 +476,8 @@ atomic_fetch_inc(atomic_t *v) · 75 unmodified lines | ||
| 434 | 476 | |
| 435 | 477 | #endif /* atomic_fetch_inc_relaxed */ |
| 436 | 478 | |
| 479 | +#define arch_atomic_dec atomic_dec | |
| 480 | + | |
| 437 | 481 | #ifndef atomic_dec |
| 438 | 482 | static __always_inline void |
| 439 | 483 | atomic_dec(atomic_t *v) |
| @@ -443,6 +487,11 @@ atomic_dec(atomic_t *v) · 3 unmodified lines | ||
| 443 | 487 | #define atomic_dec atomic_dec |
| 444 | 488 | #endif |
| 445 | 489 | |
| 490 | +#define arch_atomic_dec_return atomic_dec_return | |
| 491 | +#define arch_atomic_dec_return_acquire atomic_dec_return_acquire | |
| 492 | +#define arch_atomic_dec_return_release atomic_dec_return_release | |
| 493 | +#define arch_atomic_dec_return_relaxed atomic_dec_return_relaxed | |
| 494 | + | |
| 446 | 495 | #ifndef atomic_dec_return_relaxed |
| 447 | 496 | #ifdef atomic_dec_return |
| 448 | 497 | #define atomic_dec_return_acquire atomic_dec_return |
| @@ -524,6 +573,11 @@ atomic_dec_return(atomic_t *v) · 75 unmodified lines | ||
| 524 | 573 | |
| 525 | 574 | #endif /* atomic_dec_return_relaxed */ |
| 526 | 575 | |
| 576 | +#define arch_atomic_fetch_dec atomic_fetch_dec | |
| 577 | +#define arch_atomic_fetch_dec_acquire atomic_fetch_dec_acquire | |
| 578 | +#define arch_atomic_fetch_dec_release atomic_fetch_dec_release | |
| 579 | +#define arch_atomic_fetch_dec_relaxed atomic_fetch_dec_relaxed | |
| 580 | + | |
| 527 | 581 | #ifndef atomic_fetch_dec_relaxed |
| 528 | 582 | #ifdef atomic_fetch_dec |
| 529 | 583 | #define atomic_fetch_dec_acquire atomic_fetch_dec |
| @@ -605,6 +659,13 @@ atomic_fetch_dec(atomic_t *v) · 75 unmodified lines | ||
| 605 | 659 | |
| 606 | 660 | #endif /* atomic_fetch_dec_relaxed */ |
| 607 | 661 | |
| 662 | +#define arch_atomic_and atomic_and | |
| 663 | + | |
| 664 | +#define arch_atomic_fetch_and atomic_fetch_and | |
| 665 | +#define arch_atomic_fetch_and_acquire atomic_fetch_and_acquire | |
| 666 | +#define arch_atomic_fetch_and_release atomic_fetch_and_release | |
| 667 | +#define arch_atomic_fetch_and_relaxed atomic_fetch_and_relaxed | |
| 668 | + | |
| 608 | 669 | #ifndef atomic_fetch_and_relaxed |
| 609 | 670 | #define atomic_fetch_and_acquire atomic_fetch_and |
| 610 | 671 | #define atomic_fetch_and_release atomic_fetch_and |
| @@ -647,6 +708,8 @@ atomic_fetch_and(int i, atomic_t *v) · 36 unmodified lines | ||
| 647 | 708 | |
| 648 | 709 | #endif /* atomic_fetch_and_relaxed */ |
| 649 | 710 | |
| 711 | +#define arch_atomic_andnot atomic_andnot | |
| 712 | + | |
| 650 | 713 | #ifndef atomic_andnot |
| 651 | 714 | static __always_inline void |
| 652 | 715 | atomic_andnot(int i, atomic_t *v) |
| @@ -656,6 +719,11 @@ atomic_andnot(int i, atomic_t *v) · 3 unmodified lines | ||
| 656 | 719 | #define atomic_andnot atomic_andnot |
| 657 | 720 | #endif |
| 658 | 721 | |
| 722 | +#define arch_atomic_fetch_andnot atomic_fetch_andnot | |
| 723 | +#define arch_atomic_fetch_andnot_acquire atomic_fetch_andnot_acquire | |
| 724 | +#define arch_atomic_fetch_andnot_release atomic_fetch_andnot_release | |
| 725 | +#define arch_atomic_fetch_andnot_relaxed atomic_fetch_andnot_relaxed | |
| 726 | + | |
| 659 | 727 | #ifndef atomic_fetch_andnot_relaxed |
| 660 | 728 | #ifdef atomic_fetch_andnot |
| 661 | 729 | #define atomic_fetch_andnot_acquire atomic_fetch_andnot |
| @@ -737,6 +805,13 @@ atomic_fetch_andnot(int i, atomic_t *v) · 75 unmodified lines | ||
| 737 | 805 | |
| 738 | 806 | #endif /* atomic_fetch_andnot_relaxed */ |
| 739 | 807 | |
| 808 | +#define arch_atomic_or atomic_or | |
| 809 | + | |
| 810 | +#define arch_atomic_fetch_or atomic_fetch_or | |
| 811 | +#define arch_atomic_fetch_or_acquire atomic_fetch_or_acquire | |
| 812 | +#define arch_atomic_fetch_or_release atomic_fetch_or_release | |
| 813 | +#define arch_atomic_fetch_or_relaxed atomic_fetch_or_relaxed | |
| 814 | + | |
| 740 | 815 | #ifndef atomic_fetch_or_relaxed |
| 741 | 816 | #define atomic_fetch_or_acquire atomic_fetch_or |
| 742 | 817 | #define atomic_fetch_or_release atomic_fetch_or |
| @@ -779,6 +854,13 @@ atomic_fetch_or(int i, atomic_t *v) · 36 unmodified lines | ||
| 779 | 854 | |
| 780 | 855 | #endif /* atomic_fetch_or_relaxed */ |
| 781 | 856 | |
| 857 | +#define arch_atomic_xor atomic_xor | |
| 858 | + | |
| 859 | +#define arch_atomic_fetch_xor atomic_fetch_xor | |
| 860 | +#define arch_atomic_fetch_xor_acquire atomic_fetch_xor_acquire | |
| 861 | +#define arch_atomic_fetch_xor_release atomic_fetch_xor_release | |
| 862 | +#define arch_atomic_fetch_xor_relaxed atomic_fetch_xor_relaxed | |
| 863 | + | |
| 782 | 864 | #ifndef atomic_fetch_xor_relaxed |
| 783 | 865 | #define atomic_fetch_xor_acquire atomic_fetch_xor |
| 784 | 866 | #define atomic_fetch_xor_release atomic_fetch_xor |
| @@ -821,6 +903,11 @@ atomic_fetch_xor(int i, atomic_t *v) · 36 unmodified lines | ||
| 821 | 903 | |
| 822 | 904 | #endif /* atomic_fetch_xor_relaxed */ |
| 823 | 905 | |
| 906 | +#define arch_atomic_xchg atomic_xchg | |
| 907 | +#define arch_atomic_xchg_acquire atomic_xchg_acquire | |
| 908 | +#define arch_atomic_xchg_release atomic_xchg_release | |
| 909 | +#define arch_atomic_xchg_relaxed atomic_xchg_relaxed | |
| 910 | + | |
| 824 | 911 | #ifndef atomic_xchg_relaxed |
| 825 | 912 | #define atomic_xchg_acquire atomic_xchg |
| 826 | 913 | #define atomic_xchg_release atomic_xchg |
| @@ -863,6 +950,11 @@ atomic_xchg(atomic_t *v, int i) · 36 unmodified lines | ||
| 863 | 950 | |
| 864 | 951 | #endif /* atomic_xchg_relaxed */ |
| 865 | 952 | |
| 953 | +#define arch_atomic_cmpxchg atomic_cmpxchg | |
| 954 | +#define arch_atomic_cmpxchg_acquire atomic_cmpxchg_acquire | |
| 955 | +#define arch_atomic_cmpxchg_release atomic_cmpxchg_release | |
| 956 | +#define arch_atomic_cmpxchg_relaxed atomic_cmpxchg_relaxed | |
| 957 | + | |
| 866 | 958 | #ifndef atomic_cmpxchg_relaxed |
| 867 | 959 | #define atomic_cmpxchg_acquire atomic_cmpxchg |
| 868 | 960 | #define atomic_cmpxchg_release atomic_cmpxchg |
| @@ -905,6 +997,11 @@ atomic_cmpxchg(atomic_t *v, int old, int new) · 36 unmodified lines | ||
| 905 | 997 | |
| 906 | 998 | #endif /* atomic_cmpxchg_relaxed */ |
| 907 | 999 | |
| 1000 | +#define arch_atomic_try_cmpxchg atomic_try_cmpxchg | |
| 1001 | +#define arch_atomic_try_cmpxchg_acquire atomic_try_cmpxchg_acquire | |
| 1002 | +#define arch_atomic_try_cmpxchg_release atomic_try_cmpxchg_release | |
| 1003 | +#define arch_atomic_try_cmpxchg_relaxed atomic_try_cmpxchg_relaxed | |
| 1004 | + | |
| 908 | 1005 | #ifndef atomic_try_cmpxchg_relaxed |
| 909 | 1006 | #ifdef atomic_try_cmpxchg |
| 910 | 1007 | #define atomic_try_cmpxchg_acquire atomic_try_cmpxchg |
| @@ -1002,6 +1099,8 @@ atomic_try_cmpxchg(atomic_t *v, int *old, int new) · 91 unmodified lines | ||
| 1002 | 1099 | |
| 1003 | 1100 | #endif /* atomic_try_cmpxchg_relaxed */ |
| 1004 | 1101 | |
| 1102 | +#define arch_atomic_sub_and_test atomic_sub_and_test | |
| 1103 | + | |
| 1005 | 1104 | #ifndef atomic_sub_and_test |
| 1006 | 1105 | /** |
| 1007 | 1106 | * atomic_sub_and_test - subtract value from variable and test result |
| @@ -1020,6 +1119,8 @@ atomic_sub_and_test(int i, atomic_t *v) · 12 unmodified lines | ||
| 1020 | 1119 | #define atomic_sub_and_test atomic_sub_and_test |
| 1021 | 1120 | #endif |
| 1022 | 1121 | |
| 1122 | +#define arch_atomic_dec_and_test atomic_dec_and_test | |
| 1123 | + | |
| 1023 | 1124 | #ifndef atomic_dec_and_test |
| 1024 | 1125 | /** |
| 1025 | 1126 | * atomic_dec_and_test - decrement and test |
| @@ -1037,6 +1138,8 @@ atomic_dec_and_test(atomic_t *v) · 11 unmodified lines | ||
| 1037 | 1138 | #define atomic_dec_and_test atomic_dec_and_test |
| 1038 | 1139 | #endif |
| 1039 | 1140 | |
| 1141 | +#define arch_atomic_inc_and_test atomic_inc_and_test | |
| 1142 | + | |
| 1040 | 1143 | #ifndef atomic_inc_and_test |
| 1041 | 1144 | /** |
| 1042 | 1145 | * atomic_inc_and_test - increment and test |
| @@ -1054,6 +1157,8 @@ atomic_inc_and_test(atomic_t *v) · 11 unmodified lines | ||
| 1054 | 1157 | #define atomic_inc_and_test atomic_inc_and_test |
| 1055 | 1158 | #endif |
| 1056 | 1159 | |
| 1160 | +#define arch_atomic_add_negative atomic_add_negative | |
| 1161 | + | |
| 1057 | 1162 | #ifndef atomic_add_negative |
| 1058 | 1163 | /** |
| 1059 | 1164 | * atomic_add_negative - add and test if negative |
| @@ -1072,6 +1177,8 @@ atomic_add_negative(int i, atomic_t *v) · 12 unmodified lines | ||
| 1072 | 1177 | #define atomic_add_negative atomic_add_negative |
| 1073 | 1178 | #endif |
| 1074 | 1179 | |
| 1180 | +#define arch_atomic_fetch_add_unless atomic_fetch_add_unless | |
| 1181 | + | |
| 1075 | 1182 | #ifndef atomic_fetch_add_unless |
| 1076 | 1183 | /** |
| 1077 | 1184 | * atomic_fetch_add_unless - add unless the number is already a given value |
| @@ -1097,6 +1204,8 @@ atomic_fetch_add_unless(atomic_t *v, int a, int u) · 19 unmodified lines | ||
| 1097 | 1204 | #define atomic_fetch_add_unless atomic_fetch_add_unless |
| 1098 | 1205 | #endif |
| 1099 | 1206 | |
| 1207 | +#define arch_atomic_add_unless atomic_add_unless | |
| 1208 | + | |
| 1100 | 1209 | #ifndef atomic_add_unless |
| 1101 | 1210 | /** |
| 1102 | 1211 | * atomic_add_unless - add unless the number is already a given value |
| @@ -1115,6 +1224,8 @@ atomic_add_unless(atomic_t *v, int a, int u) · 12 unmodified lines | ||
| 1115 | 1224 | #define atomic_add_unless atomic_add_unless |
| 1116 | 1225 | #endif |
| 1117 | 1226 | |
| 1227 | +#define arch_atomic_inc_not_zero atomic_inc_not_zero | |
| 1228 | + | |
| 1118 | 1229 | #ifndef atomic_inc_not_zero |
| 1119 | 1230 | /** |
| 1120 | 1231 | * atomic_inc_not_zero - increment unless the number is zero |
| @@ -1131,6 +1242,8 @@ atomic_inc_not_zero(atomic_t *v) · 10 unmodified lines | ||
| 1131 | 1242 | #define atomic_inc_not_zero atomic_inc_not_zero |
| 1132 | 1243 | #endif |
| 1133 | 1244 | |
| 1245 | +#define arch_atomic_inc_unless_negative atomic_inc_unless_negative | |
| 1246 | + | |
| 1134 | 1247 | #ifndef atomic_inc_unless_negative |
| 1135 | 1248 | static __always_inline bool |
| 1136 | 1249 | atomic_inc_unless_negative(atomic_t *v) |
| @@ -1147,6 +1260,8 @@ atomic_inc_unless_negative(atomic_t *v) · 10 unmodified lines | ||
| 1147 | 1260 | #define atomic_inc_unless_negative atomic_inc_unless_negative |
| 1148 | 1261 | #endif |
| 1149 | 1262 | |
| 1263 | +#define arch_atomic_dec_unless_positive atomic_dec_unless_positive | |
| 1264 | + | |
| 1150 | 1265 | #ifndef atomic_dec_unless_positive |
| 1151 | 1266 | static __always_inline bool |
| 1152 | 1267 | atomic_dec_unless_positive(atomic_t *v) |
| @@ -1163,6 +1278,8 @@ atomic_dec_unless_positive(atomic_t *v) · 10 unmodified lines | ||
| 1163 | 1278 | #define atomic_dec_unless_positive atomic_dec_unless_positive |
| 1164 | 1279 | #endif |
| 1165 | 1280 | |
| 1281 | +#define arch_atomic_dec_if_positive atomic_dec_if_positive | |
| 1282 | + | |
| 1166 | 1283 | #ifndef atomic_dec_if_positive |
| 1167 | 1284 | static __always_inline int |
| 1168 | 1285 | atomic_dec_if_positive(atomic_t *v) |
| @@ -1184,6 +1301,9 @@ atomic_dec_if_positive(atomic_t *v) · 15 unmodified lines | ||
| 1184 | 1301 | #include <asm-generic/atomic64.h> |
| 1185 | 1302 | #endif |
| 1186 | 1303 | |
| 1304 | +#define arch_atomic64_read atomic64_read | |
| 1305 | +#define arch_atomic64_read_acquire atomic64_read_acquire | |
| 1306 | + | |
| 1187 | 1307 | #ifndef atomic64_read_acquire |
| 1188 | 1308 | static __always_inline s64 |
| 1189 | 1309 | atomic64_read_acquire(const atomic64_t *v) |
| @@ -1193,6 +1313,9 @@ atomic64_read_acquire(const atomic64_t *v) · 3 unmodified lines | ||
| 1193 | 1313 | #define atomic64_read_acquire atomic64_read_acquire |
| 1194 | 1314 | #endif |
| 1195 | 1315 | |
| 1316 | +#define arch_atomic64_set atomic64_set | |
| 1317 | +#define arch_atomic64_set_release atomic64_set_release | |
| 1318 | + | |
| 1196 | 1319 | #ifndef atomic64_set_release |
| 1197 | 1320 | static __always_inline void |
| 1198 | 1321 | atomic64_set_release(atomic64_t *v, s64 i) |
| @@ -1202,6 +1325,13 @@ atomic64_set_release(atomic64_t *v, s64 i) · 3 unmodified lines | ||
| 1202 | 1325 | #define atomic64_set_release atomic64_set_release |
| 1203 | 1326 | #endif |
| 1204 | 1327 | |
| 1328 | +#define arch_atomic64_add atomic64_add | |
| 1329 | + | |
| 1330 | +#define arch_atomic64_add_return atomic64_add_return | |
| 1331 | +#define arch_atomic64_add_return_acquire atomic64_add_return_acquire | |
| 1332 | +#define arch_atomic64_add_return_release atomic64_add_return_release | |
| 1333 | +#define arch_atomic64_add_return_relaxed atomic64_add_return_relaxed | |
| 1334 | + | |
| 1205 | 1335 | #ifndef atomic64_add_return_relaxed |
| 1206 | 1336 | #define atomic64_add_return_acquire atomic64_add_return |
| 1207 | 1337 | #define atomic64_add_return_release atomic64_add_return |
| @@ -1244,6 +1374,11 @@ atomic64_add_return(s64 i, atomic64_t *v) · 36 unmodified lines | ||
| 1244 | 1374 | |
| 1245 | 1375 | #endif /* atomic64_add_return_relaxed */ |
| 1246 | 1376 | |
| 1377 | +#define arch_atomic64_fetch_add atomic64_fetch_add | |
| 1378 | +#define arch_atomic64_fetch_add_acquire atomic64_fetch_add_acquire | |
| 1379 | +#define arch_atomic64_fetch_add_release atomic64_fetch_add_release | |
| 1380 | +#define arch_atomic64_fetch_add_relaxed atomic64_fetch_add_relaxed | |
| 1381 | + | |
| 1247 | 1382 | #ifndef atomic64_fetch_add_relaxed |
| 1248 | 1383 | #define atomic64_fetch_add_acquire atomic64_fetch_add |
| 1249 | 1384 | #define atomic64_fetch_add_release atomic64_fetch_add |
| @@ -1286,6 +1421,13 @@ atomic64_fetch_add(s64 i, atomic64_t *v) · 36 unmodified lines | ||
| 1286 | 1421 | |
| 1287 | 1422 | #endif /* atomic64_fetch_add_relaxed */ |
| 1288 | 1423 | |
| 1424 | +#define arch_atomic64_sub atomic64_sub | |
| 1425 | + | |
| 1426 | +#define arch_atomic64_sub_return atomic64_sub_return | |
| 1427 | +#define arch_atomic64_sub_return_acquire atomic64_sub_return_acquire | |
| 1428 | +#define arch_atomic64_sub_return_release atomic64_sub_return_release | |
| 1429 | +#define arch_atomic64_sub_return_relaxed atomic64_sub_return_relaxed | |
| 1430 | + | |
| 1289 | 1431 | #ifndef atomic64_sub_return_relaxed |
| 1290 | 1432 | #define atomic64_sub_return_acquire atomic64_sub_return |
| 1291 | 1433 | #define atomic64_sub_return_release atomic64_sub_return |
| @@ -1328,6 +1470,11 @@ atomic64_sub_return(s64 i, atomic64_t *v) · 36 unmodified lines | ||
| 1328 | 1470 | |
| 1329 | 1471 | #endif /* atomic64_sub_return_relaxed */ |
| 1330 | 1472 | |
| 1473 | +#define arch_atomic64_fetch_sub atomic64_fetch_sub | |
| 1474 | +#define arch_atomic64_fetch_sub_acquire atomic64_fetch_sub_acquire | |
| 1475 | +#define arch_atomic64_fetch_sub_release atomic64_fetch_sub_release | |
| 1476 | +#define arch_atomic64_fetch_sub_relaxed atomic64_fetch_sub_relaxed | |
| 1477 | + | |
| 1331 | 1478 | #ifndef atomic64_fetch_sub_relaxed |
| 1332 | 1479 | #define atomic64_fetch_sub_acquire atomic64_fetch_sub |
| 1333 | 1480 | #define atomic64_fetch_sub_release atomic64_fetch_sub |
| @@ -1370,6 +1517,8 @@ atomic64_fetch_sub(s64 i, atomic64_t *v) · 36 unmodified lines | ||
| 1370 | 1517 | |
| 1371 | 1518 | #endif /* atomic64_fetch_sub_relaxed */ |
| 1372 | 1519 | |
| 1520 | +#define arch_atomic64_inc atomic64_inc | |
| 1521 | + | |
| 1373 | 1522 | #ifndef atomic64_inc |
| 1374 | 1523 | static __always_inline void |
| 1375 | 1524 | atomic64_inc(atomic64_t *v) |
| @@ -1379,6 +1528,11 @@ atomic64_inc(atomic64_t *v) · 3 unmodified lines | ||
| 1379 | 1528 | #define atomic64_inc atomic64_inc |
| 1380 | 1529 | #endif |
| 1381 | 1530 | |
| 1531 | +#define arch_atomic64_inc_return atomic64_inc_return | |
| 1532 | +#define arch_atomic64_inc_return_acquire atomic64_inc_return_acquire | |
| 1533 | +#define arch_atomic64_inc_return_release atomic64_inc_return_release | |
| 1534 | +#define arch_atomic64_inc_return_relaxed atomic64_inc_return_relaxed | |
| 1535 | + | |
| 1382 | 1536 | #ifndef atomic64_inc_return_relaxed |
| 1383 | 1537 | #ifdef atomic64_inc_return |
| 1384 | 1538 | #define atomic64_inc_return_acquire atomic64_inc_return |
| @@ -1460,6 +1614,11 @@ atomic64_inc_return(atomic64_t *v) · 75 unmodified lines | ||
| 1460 | 1614 | |
| 1461 | 1615 | #endif /* atomic64_inc_return_relaxed */ |
| 1462 | 1616 | |
| 1617 | +#define arch_atomic64_fetch_inc atomic64_fetch_inc | |
| 1618 | +#define arch_atomic64_fetch_inc_acquire atomic64_fetch_inc_acquire | |
| 1619 | +#define arch_atomic64_fetch_inc_release atomic64_fetch_inc_release | |
| 1620 | +#define arch_atomic64_fetch_inc_relaxed atomic64_fetch_inc_relaxed | |
| 1621 | + | |
| 1463 | 1622 | #ifndef atomic64_fetch_inc_relaxed |
| 1464 | 1623 | #ifdef atomic64_fetch_inc |
| 1465 | 1624 | #define atomic64_fetch_inc_acquire atomic64_fetch_inc |
| @@ -1541,6 +1700,8 @@ atomic64_fetch_inc(atomic64_t *v) · 75 unmodified lines | ||
| 1541 | 1700 | |
| 1542 | 1701 | #endif /* atomic64_fetch_inc_relaxed */ |
| 1543 | 1702 | |
| 1703 | +#define arch_atomic64_dec atomic64_dec | |
| 1704 | + | |
| 1544 | 1705 | #ifndef atomic64_dec |
| 1545 | 1706 | static __always_inline void |
| 1546 | 1707 | atomic64_dec(atomic64_t *v) |
| @@ -1550,6 +1711,11 @@ atomic64_dec(atomic64_t *v) · 3 unmodified lines | ||
| 1550 | 1711 | #define atomic64_dec atomic64_dec |
| 1551 | 1712 | #endif |
| 1552 | 1713 | |
| 1714 | +#define arch_atomic64_dec_return atomic64_dec_return | |
| 1715 | +#define arch_atomic64_dec_return_acquire atomic64_dec_return_acquire | |
| 1716 | +#define arch_atomic64_dec_return_release atomic64_dec_return_release | |
| 1717 | +#define arch_atomic64_dec_return_relaxed atomic64_dec_return_relaxed | |
| 1718 | + | |
| 1553 | 1719 | #ifndef atomic64_dec_return_relaxed |
| 1554 | 1720 | #ifdef atomic64_dec_return |
| 1555 | 1721 | #define atomic64_dec_return_acquire atomic64_dec_return |
| @@ -1631,6 +1797,11 @@ atomic64_dec_return(atomic64_t *v) · 75 unmodified lines | ||
| 1631 | 1797 | |
| 1632 | 1798 | #endif /* atomic64_dec_return_relaxed */ |
| 1633 | 1799 | |
| 1800 | +#define arch_atomic64_fetch_dec atomic64_fetch_dec | |
| 1801 | +#define arch_atomic64_fetch_dec_acquire atomic64_fetch_dec_acquire | |
| 1802 | +#define arch_atomic64_fetch_dec_release atomic64_fetch_dec_release | |
| 1803 | +#define arch_atomic64_fetch_dec_relaxed atomic64_fetch_dec_relaxed | |
| 1804 | + | |
| 1634 | 1805 | #ifndef atomic64_fetch_dec_relaxed |
| 1635 | 1806 | #ifdef atomic64_fetch_dec |
| 1636 | 1807 | #define atomic64_fetch_dec_acquire atomic64_fetch_dec |
| @@ -1712,6 +1883,13 @@ atomic64_fetch_dec(atomic64_t *v) · 75 unmodified lines | ||
| 1712 | 1883 | |
| 1713 | 1884 | #endif /* atomic64_fetch_dec_relaxed */ |
| 1714 | 1885 | |
| 1886 | +#define arch_atomic64_and atomic64_and | |
| 1887 | + | |
| 1888 | +#define arch_atomic64_fetch_and atomic64_fetch_and | |
| 1889 | +#define arch_atomic64_fetch_and_acquire atomic64_fetch_and_acquire | |
| 1890 | +#define arch_atomic64_fetch_and_release atomic64_fetch_and_release | |
| 1891 | +#define arch_atomic64_fetch_and_relaxed atomic64_fetch_and_relaxed | |
| 1892 | + | |
| 1715 | 1893 | #ifndef atomic64_fetch_and_relaxed |
| 1716 | 1894 | #define atomic64_fetch_and_acquire atomic64_fetch_and |
| 1717 | 1895 | #define atomic64_fetch_and_release atomic64_fetch_and |
| @@ -1754,6 +1932,8 @@ atomic64_fetch_and(s64 i, atomic64_t *v) · 36 unmodified lines | ||
| 1754 | 1932 | |
| 1755 | 1933 | #endif /* atomic64_fetch_and_relaxed */ |
| 1756 | 1934 | |
| 1935 | +#define arch_atomic64_andnot atomic64_andnot | |
| 1936 | + | |
| 1757 | 1937 | #ifndef atomic64_andnot |
| 1758 | 1938 | static __always_inline void |
| 1759 | 1939 | atomic64_andnot(s64 i, atomic64_t *v) |
| @@ -1763,6 +1943,11 @@ atomic64_andnot(s64 i, atomic64_t *v) · 3 unmodified lines | ||
| 1763 | 1943 | #define atomic64_andnot atomic64_andnot |
| 1764 | 1944 | #endif |
| 1765 | 1945 | |
| 1946 | +#define arch_atomic64_fetch_andnot atomic64_fetch_andnot | |
| 1947 | +#define arch_atomic64_fetch_andnot_acquire atomic64_fetch_andnot_acquire | |
| 1948 | +#define arch_atomic64_fetch_andnot_release atomic64_fetch_andnot_release | |
| 1949 | +#define arch_atomic64_fetch_andnot_relaxed atomic64_fetch_andnot_relaxed | |
| 1950 | + | |
| 1766 | 1951 | #ifndef atomic64_fetch_andnot_relaxed |
| 1767 | 1952 | #ifdef atomic64_fetch_andnot |
| 1768 | 1953 | #define atomic64_fetch_andnot_acquire atomic64_fetch_andnot |
| @@ -1844,6 +2029,13 @@ atomic64_fetch_andnot(s64 i, atomic64_t *v) · 75 unmodified lines | ||
| 1844 | 2029 | |
| 1845 | 2030 | #endif /* atomic64_fetch_andnot_relaxed */ |
| 1846 | 2031 | |
| 2032 | +#define arch_atomic64_or atomic64_or | |
| 2033 | + | |
| 2034 | +#define arch_atomic64_fetch_or atomic64_fetch_or | |
| 2035 | +#define arch_atomic64_fetch_or_acquire atomic64_fetch_or_acquire | |
| 2036 | +#define arch_atomic64_fetch_or_release atomic64_fetch_or_release | |
| 2037 | +#define arch_atomic64_fetch_or_relaxed atomic64_fetch_or_relaxed | |
| 2038 | + | |
| 1847 | 2039 | #ifndef atomic64_fetch_or_relaxed |
| 1848 | 2040 | #define atomic64_fetch_or_acquire atomic64_fetch_or |
| 1849 | 2041 | #define atomic64_fetch_or_release atomic64_fetch_or |
| @@ -1886,6 +2078,13 @@ atomic64_fetch_or(s64 i, atomic64_t *v) · 36 unmodified lines | ||
| 1886 | 2078 | |
| 1887 | 2079 | #endif /* atomic64_fetch_or_relaxed */ |
| 1888 | 2080 | |
| 2081 | +#define arch_atomic64_xor atomic64_xor | |
| 2082 | + | |
| 2083 | +#define arch_atomic64_fetch_xor atomic64_fetch_xor | |
| 2084 | +#define arch_atomic64_fetch_xor_acquire atomic64_fetch_xor_acquire | |
| 2085 | +#define arch_atomic64_fetch_xor_release atomic64_fetch_xor_release | |
| 2086 | +#define arch_atomic64_fetch_xor_relaxed atomic64_fetch_xor_relaxed | |
| 2087 | + | |
| 1889 | 2088 | #ifndef atomic64_fetch_xor_relaxed |
| 1890 | 2089 | #define atomic64_fetch_xor_acquire atomic64_fetch_xor |
| 1891 | 2090 | #define atomic64_fetch_xor_release atomic64_fetch_xor |
| @@ -1928,6 +2127,11 @@ atomic64_fetch_xor(s64 i, atomic64_t *v) · 36 unmodified lines | ||
| 1928 | 2127 | |
| 1929 | 2128 | #endif /* atomic64_fetch_xor_relaxed */ |
| 1930 | 2129 | |
| 2130 | +#define arch_atomic64_xchg atomic64_xchg | |
| 2131 | +#define arch_atomic64_xchg_acquire atomic64_xchg_acquire | |
| 2132 | +#define arch_atomic64_xchg_release atomic64_xchg_release | |
| 2133 | +#define arch_atomic64_xchg_relaxed atomic64_xchg_relaxed | |
| 2134 | + | |
| 1931 | 2135 | #ifndef atomic64_xchg_relaxed |
| 1932 | 2136 | #define atomic64_xchg_acquire atomic64_xchg |
| 1933 | 2137 | #define atomic64_xchg_release atomic64_xchg |
| @@ -1970,6 +2174,11 @@ atomic64_xchg(atomic64_t *v, s64 i) · 36 unmodified lines | ||
| 1970 | 2174 | |
| 1971 | 2175 | #endif /* atomic64_xchg_relaxed */ |
| 1972 | 2176 | |
| 2177 | +#define arch_atomic64_cmpxchg atomic64_cmpxchg | |
| 2178 | +#define arch_atomic64_cmpxchg_acquire atomic64_cmpxchg_acquire | |
| 2179 | +#define arch_atomic64_cmpxchg_release atomic64_cmpxchg_release | |
| 2180 | +#define arch_atomic64_cmpxchg_relaxed atomic64_cmpxchg_relaxed | |
| 2181 | + | |
| 1973 | 2182 | #ifndef atomic64_cmpxchg_relaxed |
| 1974 | 2183 | #define atomic64_cmpxchg_acquire atomic64_cmpxchg |
| 1975 | 2184 | #define atomic64_cmpxchg_release atomic64_cmpxchg |
| @@ -2012,6 +2221,11 @@ atomic64_cmpxchg(atomic64_t *v, s64 old, s64 new) · 36 unmodified lines | ||
| 2012 | 2221 | |
| 2013 | 2222 | #endif /* atomic64_cmpxchg_relaxed */ |
| 2014 | 2223 | |
| 2224 | +#define arch_atomic64_try_cmpxchg atomic64_try_cmpxchg | |
| 2225 | +#define arch_atomic64_try_cmpxchg_acquire atomic64_try_cmpxchg_acquire | |
| 2226 | +#define arch_atomic64_try_cmpxchg_release atomic64_try_cmpxchg_release | |
| 2227 | +#define arch_atomic64_try_cmpxchg_relaxed atomic64_try_cmpxchg_relaxed | |
| 2228 | + | |
| 2015 | 2229 | #ifndef atomic64_try_cmpxchg_relaxed |
| 2016 | 2230 | #ifdef atomic64_try_cmpxchg |
| 2017 | 2231 | #define atomic64_try_cmpxchg_acquire atomic64_try_cmpxchg |
| @@ -2109,6 +2323,8 @@ atomic64_try_cmpxchg(atomic64_t *v, s64 *old, s64 new) · 91 unmodified lines | ||
| 2109 | 2323 | |
| 2110 | 2324 | #endif /* atomic64_try_cmpxchg_relaxed */ |
| 2111 | 2325 | |
| 2326 | +#define arch_atomic64_sub_and_test atomic64_sub_and_test | |
| 2327 | + | |
| 2112 | 2328 | #ifndef atomic64_sub_and_test |
| 2113 | 2329 | /** |
| 2114 | 2330 | * atomic64_sub_and_test - subtract value from variable and test result |
| @@ -2127,6 +2343,8 @@ atomic64_sub_and_test(s64 i, atomic64_t *v) · 12 unmodified lines | ||
| 2127 | 2343 | #define atomic64_sub_and_test atomic64_sub_and_test |
| 2128 | 2344 | #endif |
| 2129 | 2345 | |
| 2346 | +#define arch_atomic64_dec_and_test atomic64_dec_and_test | |
| 2347 | + | |
| 2130 | 2348 | #ifndef atomic64_dec_and_test |
| 2131 | 2349 | /** |
| 2132 | 2350 | * atomic64_dec_and_test - decrement and test |
| @@ -2144,6 +2362,8 @@ atomic64_dec_and_test(atomic64_t *v) · 11 unmodified lines | ||
| 2144 | 2362 | #define atomic64_dec_and_test atomic64_dec_and_test |
| 2145 | 2363 | #endif |
| 2146 | 2364 | |
| 2365 | +#define arch_atomic64_inc_and_test atomic64_inc_and_test | |
| 2366 | + | |
| 2147 | 2367 | #ifndef atomic64_inc_and_test |
| 2148 | 2368 | /** |
| 2149 | 2369 | * atomic64_inc_and_test - increment and test |
| @@ -2161,6 +2381,8 @@ atomic64_inc_and_test(atomic64_t *v) · 11 unmodified lines | ||
| 2161 | 2381 | #define atomic64_inc_and_test atomic64_inc_and_test |
| 2162 | 2382 | #endif |
| 2163 | 2383 | |
| 2384 | +#define arch_atomic64_add_negative atomic64_add_negative | |
| 2385 | + | |
| 2164 | 2386 | #ifndef atomic64_add_negative |
| 2165 | 2387 | /** |
| 2166 | 2388 | * atomic64_add_negative - add and test if negative |
| @@ -2179,6 +2401,8 @@ atomic64_add_negative(s64 i, atomic64_t *v) · 12 unmodified lines | ||
| 2179 | 2401 | #define atomic64_add_negative atomic64_add_negative |
| 2180 | 2402 | #endif |
| 2181 | 2403 | |
| 2404 | +#define arch_atomic64_fetch_add_unless atomic64_fetch_add_unless | |
| 2405 | + | |
| 2182 | 2406 | #ifndef atomic64_fetch_add_unless |
| 2183 | 2407 | /** |
| 2184 | 2408 | * atomic64_fetch_add_unless - add unless the number is already a given value |
| @@ -2204,6 +2428,8 @@ atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u) · 19 unmodified lines | ||
| 2204 | 2428 | #define atomic64_fetch_add_unless atomic64_fetch_add_unless |
| 2205 | 2429 | #endif |
| 2206 | 2430 | |
| 2431 | +#define arch_atomic64_add_unless atomic64_add_unless | |
| 2432 | + | |
| 2207 | 2433 | #ifndef atomic64_add_unless |
| 2208 | 2434 | /** |
| 2209 | 2435 | * atomic64_add_unless - add unless the number is already a given value |
| @@ -2222,6 +2448,8 @@ atomic64_add_unless(atomic64_t *v, s64 a, s64 u) · 12 unmodified lines | ||
| 2222 | 2448 | #define atomic64_add_unless atomic64_add_unless |
| 2223 | 2449 | #endif |
| 2224 | 2450 | |
| 2451 | +#define arch_atomic64_inc_not_zero atomic64_inc_not_zero | |
| 2452 | + | |
| 2225 | 2453 | #ifndef atomic64_inc_not_zero |
| 2226 | 2454 | /** |
| 2227 | 2455 | * atomic64_inc_not_zero - increment unless the number is zero |
| @@ -2238,6 +2466,8 @@ atomic64_inc_not_zero(atomic64_t *v) · 10 unmodified lines | ||
| 2238 | 2466 | #define atomic64_inc_not_zero atomic64_inc_not_zero |
| 2239 | 2467 | #endif |
| 2240 | 2468 | |
| 2469 | +#define arch_atomic64_inc_unless_negative atomic64_inc_unless_negative | |
| 2470 | + | |
| 2241 | 2471 | #ifndef atomic64_inc_unless_negative |
| 2242 | 2472 | static __always_inline bool |
| 2243 | 2473 | atomic64_inc_unless_negative(atomic64_t *v) |
| @@ -2254,6 +2484,8 @@ atomic64_inc_unless_negative(atomic64_t *v) · 10 unmodified lines | ||
| 2254 | 2484 | #define atomic64_inc_unless_negative atomic64_inc_unless_negative |
| 2255 | 2485 | #endif |
| 2256 | 2486 | |
| 2487 | +#define arch_atomic64_dec_unless_positive atomic64_dec_unless_positive | |
| 2488 | + | |
| 2257 | 2489 | #ifndef atomic64_dec_unless_positive |
| 2258 | 2490 | static __always_inline bool |
| 2259 | 2491 | atomic64_dec_unless_positive(atomic64_t *v) |
| @@ -2270,6 +2502,8 @@ atomic64_dec_unless_positive(atomic64_t *v) · 10 unmodified lines | ||
| 2270 | 2502 | #define atomic64_dec_unless_positive atomic64_dec_unless_positive |
| 2271 | 2503 | #endif |
| 2272 | 2504 | |
| 2505 | +#define arch_atomic64_dec_if_positive atomic64_dec_if_positive | |
| 2506 | + | |
| 2273 | 2507 | #ifndef atomic64_dec_if_positive |
| 2274 | 2508 | static __always_inline s64 |
| 2275 | 2509 | atomic64_dec_if_positive(atomic64_t *v) |
| @@ -2288,4 +2522,4 @@ atomic64_dec_if_positive(atomic64_t *v) · 12 unmodified lines | ||
| 2288 | 2522 | #endif |
| 2289 | 2523 | |
| 2290 | 2524 | #endif /* _LINUX_ATOMIC_FALLBACK_H */ |
| 2291 | −// 1fac0941c79bf0ae100723cc2ac9b94061f0b67a | |
| 2525 | +// 9d95b56f98d82a2a26c7b79ccdd0c47572d50a6f | |
| @@ -18,8 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | * position @h. For example |
| 19 | 19 | * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. |
| 20 | 20 | */ |
| 21 | −#if !defined(__ASSEMBLY__) && \ | |
| 22 | − (!defined(CONFIG_CC_IS_GCC) || CONFIG_GCC_VERSION >= 49000) | |
| 21 | +#if !defined(__ASSEMBLY__) | |
| 23 | 22 | #include <linux/build_bug.h> |
| 24 | 23 | #define GENMASK_INPUT_CHECK(h, l) \ |
| 25 | 24 | (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ |
| @@ -590,6 +590,7 @@ struct request_queue { · 589 unmodified lines | ||
| 590 | 590 | u64 write_hints[BLK_MAX_WRITE_HINTS]; |
| 591 | 591 | }; |
| 592 | 592 | |
| 593 | +/* Keep blk_queue_flag_name[] in sync with the definitions below */ | |
| 593 | 594 | #define QUEUE_FLAG_STOPPED 0 /* queue is stopped */ |
| 594 | 595 | #define QUEUE_FLAG_DYING 1 /* queue being torn down */ |
| 595 | 596 | #define QUEUE_FLAG_NOMERGES 3 /* disable merge attempts */ |
| @@ -33,7 +33,7 @@ int netns_bpf_prog_query(const union bpf_attr *attr, · 32 unmodified lines | ||
| 33 | 33 | union bpf_attr __user *uattr); |
| 34 | 34 | int netns_bpf_prog_attach(const union bpf_attr *attr, |
| 35 | 35 | struct bpf_prog *prog); |
| 36 | −int netns_bpf_prog_detach(const union bpf_attr *attr); | |
| 36 | +int netns_bpf_prog_detach(const union bpf_attr *attr, enum bpf_prog_type ptype); | |
| 37 | 37 | int netns_bpf_link_create(const union bpf_attr *attr, |
| 38 | 38 | struct bpf_prog *prog); |
| 39 | 39 | #else |
| @@ -49,7 +49,8 @@ static inline int netns_bpf_prog_attach(const union bpf_attr *attr, · 9 unmodified lines | ||
| 49 | 49 | return -EOPNOTSUPP; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | −static inline int netns_bpf_prog_detach(const union bpf_attr *attr) | |
| 52 | +static inline int netns_bpf_prog_detach(const union bpf_attr *attr, | |
| 53 | + enum bpf_prog_type ptype) | |
| 53 | 54 | { |
| 54 | 55 | return -EOPNOTSUPP; |
| 55 | 56 | } |
| @@ -1543,13 +1543,16 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map) · 1542 unmodified lines | ||
| 1543 | 1543 | #endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */ |
| 1544 | 1544 | |
| 1545 | 1545 | #if defined(CONFIG_BPF_STREAM_PARSER) |
| 1546 | −int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, u32 which); | |
| 1546 | +int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, | |
| 1547 | + struct bpf_prog *old, u32 which); | |
| 1547 | 1548 | int sock_map_get_from_fd(const union bpf_attr *attr, struct bpf_prog *prog); |
| 1549 | +int sock_map_prog_detach(const union bpf_attr *attr, enum bpf_prog_type ptype); | |
| 1548 | 1550 | void sock_map_unhash(struct sock *sk); |
| 1549 | 1551 | void sock_map_close(struct sock *sk, long timeout); |
| 1550 | 1552 | #else |
| 1551 | 1553 | static inline int sock_map_prog_update(struct bpf_map *map, |
| 1552 | − struct bpf_prog *prog, u32 which) | |
| 1554 | + struct bpf_prog *prog, | |
| 1555 | + struct bpf_prog *old, u32 which) | |
| 1553 | 1556 | { |
| 1554 | 1557 | return -EOPNOTSUPP; |
| 1555 | 1558 | } |
| @@ -1559,6 +1562,12 @@ static inline int sock_map_get_from_fd(const union bpf_attr *attr, · 3 unmodified lines | ||
| 1559 | 1562 | { |
| 1560 | 1563 | return -EINVAL; |
| 1561 | 1564 | } |
| 1565 | + | |
| 1566 | +static inline int sock_map_prog_detach(const union bpf_attr *attr, | |
| 1567 | + enum bpf_prog_type ptype) | |
| 1568 | +{ | |
| 1569 | + return -EOPNOTSUPP; | |
| 1570 | +} | |
| 1562 | 1571 | #endif /* CONFIG_BPF_STREAM_PARSER */ |
| 1563 | 1572 | |
| 1564 | 1573 | #if defined(CONFIG_INET) && defined(CONFIG_BPF_SYSCALL) |
| @@ -82,6 +82,11 @@ static inline bool btf_type_is_int(const struct btf_type *t) · 81 unmodified lines | ||
| 82 | 82 | return BTF_INFO_KIND(t->info) == BTF_KIND_INT; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | +static inline bool btf_type_is_small_int(const struct btf_type *t) | |
| 86 | +{ | |
| 87 | + return btf_type_is_int(t) && t->size <= sizeof(u64); | |
| 88 | +} | |
| 89 | + | |
| 85 | 90 | static inline bool btf_type_is_enum(const struct btf_type *t) |
| 86 | 91 | { |
| 87 | 92 | return BTF_INFO_KIND(t->info) == BTF_KIND_ENUM; |
| @@ -790,7 +790,9 @@ struct sock_cgroup_data { · 789 unmodified lines | ||
| 790 | 790 | union { |
| 791 | 791 | #ifdef __LITTLE_ENDIAN |
| 792 | 792 | struct { |
| 793 | − u8 is_data; | |
| 793 | + u8 is_data : 1; | |
| 794 | + u8 no_refcnt : 1; | |
| 795 | + u8 unused : 6; | |
| 794 | 796 | u8 padding; |
| 795 | 797 | u16 prioidx; |
| 796 | 798 | u32 classid; |
| @@ -800,7 +802,9 @@ struct sock_cgroup_data { · 3 unmodified lines | ||
| 800 | 802 | u32 classid; |
| 801 | 803 | u16 prioidx; |
| 802 | 804 | u8 padding; |
| 803 | − u8 is_data; | |
| 805 | + u8 unused : 6; | |
| 806 | + u8 no_refcnt : 1; | |
| 807 | + u8 is_data : 1; | |
| 804 | 808 | } __packed; |
| 805 | 809 | #endif |
| 806 | 810 | u64 val; |
| @@ -822,6 +822,7 @@ extern spinlock_t cgroup_sk_update_lock; · 821 unmodified lines | ||
| 822 | 822 | |
| 823 | 823 | void cgroup_sk_alloc_disable(void); |
| 824 | 824 | void cgroup_sk_alloc(struct sock_cgroup_data *skcd); |
| 825 | +void cgroup_sk_clone(struct sock_cgroup_data *skcd); | |
| 825 | 826 | void cgroup_sk_free(struct sock_cgroup_data *skcd); |
| 826 | 827 | |
| 827 | 828 | static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd) |
| @@ -835,7 +836,7 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd) · 7 unmodified lines | ||
| 835 | 836 | */ |
| 836 | 837 | v = READ_ONCE(skcd->val); |
| 837 | 838 | |
| 838 | − if (v & 1) | |
| 839 | + if (v & 3) | |
| 839 | 840 | return &cgrp_dfl_root.cgrp; |
| 840 | 841 | |
| 841 | 842 | return (struct cgroup *)(unsigned long)v ?: &cgrp_dfl_root.cgrp; |
| @@ -847,6 +848,7 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd) · 5 unmodified lines | ||
| 847 | 848 | #else /* CONFIG_CGROUP_DATA */ |
| 848 | 849 | |
| 849 | 850 | static inline void cgroup_sk_alloc(struct sock_cgroup_data *skcd) {} |
| 851 | +static inline void cgroup_sk_clone(struct sock_cgroup_data *skcd) {} | |
| 850 | 852 | static inline void cgroup_sk_free(struct sock_cgroup_data *skcd) {} |
| 851 | 853 | |
| 852 | 854 | #endif /* CONFIG_CGROUP_DATA */ |
| @@ -33,6 +33,14 @@ · 32 unmodified lines | ||
| 33 | 33 | #define __no_sanitize_thread |
| 34 | 34 | #endif |
| 35 | 35 | |
| 36 | +#if __has_feature(undefined_behavior_sanitizer) | |
| 37 | +/* GCC does not have __SANITIZE_UNDEFINED__ */ | |
| 38 | +#define __no_sanitize_undefined \ | |
| 39 | + __attribute__((no_sanitize("undefined"))) | |
| 40 | +#else | |
| 41 | +#define __no_sanitize_undefined | |
| 42 | +#endif | |
| 43 | + | |
| 36 | 44 | /* |
| 37 | 45 | * Not all versions of clang implement the the type-generic versions |
| 38 | 46 | * of the builtin overflow checkers. Fortunately, clang implements |
| @@ -11,7 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | + __GNUC_PATCHLEVEL__) |
| 12 | 12 | |
| 13 | 13 | /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */ |
| 14 | −#if GCC_VERSION < 40800 | |
| 14 | +#if GCC_VERSION < 40900 | |
| 15 | 15 | # error Sorry, your compiler is too old - please upgrade it. |
| 16 | 16 | #endif |
| 17 | 17 | |
| @@ -150,6 +150,12 @@ · 132 unmodified lines | ||
| 150 | 150 | #define __no_sanitize_thread |
| 151 | 151 | #endif |
| 152 | 152 | |
| 153 | +#if __has_attribute(__no_sanitize_undefined__) | |
| 154 | +#define __no_sanitize_undefined __attribute__((no_sanitize_undefined)) | |
| 155 | +#else | |
| 156 | +#define __no_sanitize_undefined | |
| 157 | +#endif | |
| 158 | + | |
| 153 | 159 | #if GCC_VERSION >= 50100 |
| 154 | 160 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 |
| 155 | 161 | #endif |
| @@ -123,7 +123,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 122 unmodified lines | ||
| 123 | 123 | #ifdef CONFIG_DEBUG_ENTRY |
| 124 | 124 | /* Begin/end of an instrumentation safe region */ |
| 125 | 125 | #define instrumentation_begin() ({ \ |
| 126 | − asm volatile("%c0:\n\t" \ | |
| 126 | + asm volatile("%c0: nop\n\t" \ | |
| 127 | 127 | ".pushsection .discard.instr_begin\n\t" \ |
| 128 | 128 | ".long %c0b - .\n\t" \ |
| 129 | 129 | ".popsection\n\t" : : "i" (__COUNTER__)); \ |
| @@ -40,6 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | # define __GCC4_has_attribute___noclone__ 1 |
| 41 | 41 | # define __GCC4_has_attribute___nonstring__ 0 |
| 42 | 42 | # define __GCC4_has_attribute___no_sanitize_address__ (__GNUC_MINOR__ >= 8) |
| 43 | +# define __GCC4_has_attribute___no_sanitize_undefined__ (__GNUC_MINOR__ >= 9) | |
| 43 | 44 | # define __GCC4_has_attribute___fallthrough__ 0 |
| 44 | 45 | #endif |
| 45 | 46 | |
| @@ -118,10 +118,6 @@ struct ftrace_likely_data { · 117 unmodified lines | ||
| 118 | 118 | #define notrace __attribute__((__no_instrument_function__)) |
| 119 | 119 | #endif |
| 120 | 120 | |
| 121 | −/* Section for code which can't be instrumented at all */ | |
| 122 | −#define noinstr \ | |
| 123 | − noinline notrace __attribute((__section__(".noinstr.text"))) | |
| 124 | − | |
| 125 | 121 | /* |
| 126 | 122 | * it doesn't make sense on ARM (currently the only user of __naked) |
| 127 | 123 | * to trace naked functions because then mcount is called without |
| @@ -193,16 +189,18 @@ struct ftrace_likely_data { · 65 unmodified lines | ||
| 193 | 189 | |
| 194 | 190 | #define __no_kcsan __no_sanitize_thread |
| 195 | 191 | #ifdef __SANITIZE_THREAD__ |
| 196 | −# define __no_kcsan_or_inline __no_kcsan notrace __maybe_unused | |
| 197 | −# define __no_sanitize_or_inline __no_kcsan_or_inline | |
| 198 | −#else | |
| 199 | −# define __no_kcsan_or_inline __always_inline | |
| 192 | +# define __no_sanitize_or_inline __no_kcsan notrace __maybe_unused | |
| 200 | 193 | #endif |
| 201 | 194 | |
| 202 | 195 | #ifndef __no_sanitize_or_inline |
| 203 | 196 | #define __no_sanitize_or_inline __always_inline |
| 204 | 197 | #endif |
| 205 | 198 | |
| 199 | +/* Section for code which can't be instrumented at all */ | |
| 200 | +#define noinstr \ | |
| 201 | + noinline notrace __attribute((__section__(".noinstr.text"))) \ | |
| 202 | + __no_kcsan __no_sanitize_address | |
| 203 | + | |
| 206 | 204 | #endif /* __KERNEL__ */ |
| 207 | 205 | |
| 208 | 206 | #endif /* __ASSEMBLY__ */ |
| @@ -254,32 +252,8 @@ struct ftrace_likely_data { · 45 unmodified lines | ||
| 254 | 252 | * __unqual_scalar_typeof(x) - Declare an unqualified scalar type, leaving |
| 255 | 253 | * non-scalar types unchanged. |
| 256 | 254 | */ |
| 257 | −#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900) || defined(__CHECKER__) | |
| 258 | 255 | /* |
| 259 | − * We build this out of a couple of helper macros in a vain attempt to | |
| 260 | − * help you keep your lunch down while reading it. | |
| 261 | − */ | |
| 262 | −#define __pick_scalar_type(x, type, otherwise) \ | |
| 263 | − __builtin_choose_expr(__same_type(x, type), (type)0, otherwise) | |
| 264 | − | |
| 265 | −/* | |
| 266 | − * 'char' is not type-compatible with either 'signed char' or 'unsigned char', | |
| 267 | − * so we include the naked type here as well as the signed/unsigned variants. | |
| 268 | − */ | |
| 269 | −#define __pick_integer_type(x, type, otherwise) \ | |
| 270 | − __pick_scalar_type(x, type, \ | |
| 271 | − __pick_scalar_type(x, unsigned type, \ | |
| 272 | − __pick_scalar_type(x, signed type, otherwise))) | |
| 273 | − | |
| 274 | −#define __unqual_scalar_typeof(x) typeof( \ | |
| 275 | − __pick_integer_type(x, char, \ | |
| 276 | − __pick_integer_type(x, short, \ | |
| 277 | − __pick_integer_type(x, int, \ | |
| 278 | − __pick_integer_type(x, long, \ | |
| 279 | − __pick_integer_type(x, long long, x)))))) | |
| 280 | −#else | |
| 281 | −/* | |
| 282 | − * If supported, prefer C11 _Generic for better compile-times. As above, 'char' | |
| 256 | + * Prefer C11 _Generic for better compile-times and simpler code. Note: 'char' | |
| 283 | 257 | * is not type-compatible with 'signed char', and we define a separate case. |
| 284 | 258 | */ |
| 285 | 259 | #define __scalar_type_to_expr_cases(type) \ |
| @@ -295,7 +269,6 @@ struct ftrace_likely_data { · 9 unmodified lines | ||
| 295 | 269 | __scalar_type_to_expr_cases(long), \ |
| 296 | 270 | __scalar_type_to_expr_cases(long long), \ |
| 297 | 271 | default: (x))) |
| 298 | −#endif | |
| 299 | 272 | |
| 300 | 273 | /* Is this type a native word size -- useful for atomic operations */ |
| 301 | 274 | #define __native_word(t) \ |
| @@ -433,7 +433,8 @@ enum dl_dev_state { · 432 unmodified lines | ||
| 433 | 433 | * @suppliers: List of links to supplier devices. |
| 434 | 434 | * @consumers: List of links to consumer devices. |
| 435 | 435 | * @needs_suppliers: Hook to global list of devices waiting for suppliers. |
| 436 | − * @defer_sync: Hook to global list of devices that have deferred sync_state. | |
| 436 | + * @defer_hook: Hook to global list of devices that have deferred sync_state or | |
| 437 | + * deferred fw_devlink. | |
| 437 | 438 | * @need_for_probe: If needs_suppliers is on a list, this indicates if the |
| 438 | 439 | * suppliers are needed for probe or not. |
| 439 | 440 | * @status: Driver status information. |
| @@ -442,7 +443,7 @@ struct dev_links_info { · 2 unmodified lines | ||
| 442 | 443 | struct list_head suppliers; |
| 443 | 444 | struct list_head consumers; |
| 444 | 445 | struct list_head needs_suppliers; |
| 445 | − struct list_head defer_sync; | |
| 446 | + struct list_head defer_hook; | |
| 446 | 447 | bool need_for_probe; |
| 447 | 448 | enum dl_dev_state status; |
| 448 | 449 | }; |
| @@ -311,6 +311,7 @@ struct dma_buf { · 310 unmodified lines | ||
| 311 | 311 | void *vmap_ptr; |
| 312 | 312 | const char *exp_name; |
| 313 | 313 | const char *name; |
| 314 | + spinlock_t name_lock; /* spinlock to protect name access */ | |
| 314 | 315 | struct module *owner; |
| 315 | 316 | struct list_head list_node; |
| 316 | 317 | void *priv; |
| @@ -69,6 +69,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size, · 68 unmodified lines | ||
| 69 | 69 | u64 dma_direct_get_required_mask(struct device *dev); |
| 70 | 70 | gfp_t dma_direct_optimal_gfp_mask(struct device *dev, u64 dma_mask, |
| 71 | 71 | u64 *phys_mask); |
| 72 | +bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size); | |
| 72 | 73 | void *dma_direct_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, |
| 73 | 74 | gfp_t gfp, unsigned long attrs); |
| 74 | 75 | void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, |
| @@ -77,8 +78,6 @@ void *dma_direct_alloc_pages(struct device *dev, size_t size, · 2 unmodified lines | ||
| 77 | 78 | dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs); |
| 78 | 79 | void dma_direct_free_pages(struct device *dev, size_t size, void *cpu_addr, |
| 79 | 80 | dma_addr_t dma_addr, unsigned long attrs); |
| 80 | −struct page *__dma_direct_alloc_pages(struct device *dev, size_t size, | |
| 81 | − gfp_t gfp, unsigned long attrs); | |
| 82 | 81 | int dma_direct_get_sgtable(struct device *dev, struct sg_table *sgt, |
| 83 | 82 | void *cpu_addr, dma_addr_t dma_addr, size_t size, |
| 84 | 83 | unsigned long attrs); |
| @@ -87,4 +86,5 @@ int dma_direct_mmap(struct device *dev, struct vm_area_struct *vma, · 2 unmodified lines | ||
| 87 | 86 | void *cpu_addr, dma_addr_t dma_addr, size_t size, |
| 88 | 87 | unsigned long attrs); |
| 89 | 88 | int dma_direct_supported(struct device *dev, u64 mask); |
| 89 | +bool dma_direct_need_sync(struct device *dev, dma_addr_t dma_addr); | |
| 90 | 90 | #endif /* _LINUX_DMA_DIRECT_H */ |
| @@ -461,6 +461,7 @@ int dma_set_mask(struct device *dev, u64 mask); · 460 unmodified lines | ||
| 461 | 461 | int dma_set_coherent_mask(struct device *dev, u64 mask); |
| 462 | 462 | u64 dma_get_required_mask(struct device *dev); |
| 463 | 463 | size_t dma_max_mapping_size(struct device *dev); |
| 464 | +bool dma_need_sync(struct device *dev, dma_addr_t dma_addr); | |
| 464 | 465 | unsigned long dma_get_merge_boundary(struct device *dev); |
| 465 | 466 | #else /* CONFIG_HAS_DMA */ |
| 466 | 467 | static inline dma_addr_t dma_map_page_attrs(struct device *dev, |
| @@ -571,6 +572,10 @@ static inline size_t dma_max_mapping_size(struct device *dev) · 104 unmodified lines | ||
| 571 | 572 | { |
| 572 | 573 | return 0; |
| 573 | 574 | } |
| 575 | +static inline bool dma_need_sync(struct device *dev, dma_addr_t dma_addr) | |
| 576 | +{ | |
| 577 | + return false; | |
| 578 | +} | |
| 574 | 579 | static inline unsigned long dma_get_merge_boundary(struct device *dev) |
| 575 | 580 | { |
| 576 | 581 | return 0; |
| @@ -350,6 +350,7 @@ void efi_native_runtime_setup(void); · 349 unmodified lines | ||
| 350 | 350 | * associated with ConOut |
| 351 | 351 | */ |
| 352 | 352 | #define LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID EFI_GUID(0xe03fc20a, 0x85dc, 0x406e, 0xb9, 0x0e, 0x4a, 0xb5, 0x02, 0x37, 0x1d, 0x95) |
| 353 | +#define LINUX_EFI_ARM_CPU_STATE_TABLE_GUID EFI_GUID(0xef79e4aa, 0x3c3d, 0x4989, 0xb9, 0x02, 0x07, 0xa9, 0x43, 0xe5, 0x50, 0xd2) | |
| 353 | 354 | #define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) |
| 354 | 355 | #define LINUX_EFI_RANDOM_SEED_TABLE_GUID EFI_GUID(0x1ce1e5bc, 0x7ceb, 0x42f2, 0x81, 0xe5, 0x8a, 0xad, 0xf1, 0x80, 0xf5, 0x7b) |
| 355 | 356 | #define LINUX_EFI_TPM_EVENT_LOG_GUID EFI_GUID(0xb7799cb0, 0xeca2, 0x4943, 0x96, 0x67, 0x1f, 0xae, 0x07, 0xb7, 0x47, 0xfa) |
| @@ -1236,14 +1237,11 @@ struct linux_efi_memreserve { · 880 unmodified lines | ||
| 1236 | 1237 | struct { |
| 1237 | 1238 | phys_addr_t base; |
| 1238 | 1239 | phys_addr_t size; |
| 1239 | − } entry[0]; | |
| 1240 | + } entry[]; | |
| 1240 | 1241 | }; |
| 1241 | 1242 | |
| 1242 | −#define EFI_MEMRESERVE_SIZE(count) (sizeof(struct linux_efi_memreserve) + \ | |
| 1243 | − (count) * sizeof(((struct linux_efi_memreserve *)0)->entry[0])) | |
| 1244 | − | |
| 1245 | 1243 | #define EFI_MEMRESERVE_COUNT(size) (((size) - sizeof(struct linux_efi_memreserve)) \ |
| 1246 | − / sizeof(((struct linux_efi_memreserve *)0)->entry[0])) | |
| 1244 | + / sizeof_field(struct linux_efi_memreserve, entry[0])) | |
| 1247 | 1245 | |
| 1248 | 1246 | void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size); |
| 1249 | 1247 | |
| @@ -884,12 +884,12 @@ void bpf_jit_compile(struct bpf_prog *prog); · 883 unmodified lines | ||
| 884 | 884 | bool bpf_jit_needs_zext(void); |
| 885 | 885 | bool bpf_helper_changes_pkt_data(void *func); |
| 886 | 886 | |
| 887 | −static inline bool bpf_dump_raw_ok(void) | |
| 887 | +static inline bool bpf_dump_raw_ok(const struct cred *cred) | |
| 888 | 888 | { |
| 889 | 889 | /* Reconstruction of call-sites is dependent on kallsyms, |
| 890 | 890 | * thus make dump the same restriction. |
| 891 | 891 | */ |
| 892 | − return kallsyms_show_value() == 1; | |
| 892 | + return kallsyms_show_value(cred); | |
| 893 | 893 | } |
| 894 | 894 | |
| 895 | 895 | struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, |
| @@ -315,6 +315,7 @@ enum rw_hint { · 314 unmodified lines | ||
| 315 | 315 | #define IOCB_SYNC (1 << 5) |
| 316 | 316 | #define IOCB_WRITE (1 << 6) |
| 317 | 317 | #define IOCB_NOWAIT (1 << 7) |
| 318 | +#define IOCB_NOIO (1 << 9) | |
| 318 | 319 | |
| 319 | 320 | struct kiocb { |
| 320 | 321 | struct file *ki_filp; |
| @@ -1917,7 +1918,6 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, · 1596 unmodified lines | ||
| 1917 | 1918 | struct iovec *fast_pointer, |
| 1918 | 1919 | struct iovec **ret_pointer); |
| 1919 | 1920 | |
| 1920 | −extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *); | |
| 1921 | 1921 | extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); |
| 1922 | 1922 | extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); |
| 1923 | 1923 | extern ssize_t vfs_readv(struct file *, const struct iovec __user *, |
| @@ -3033,6 +3033,7 @@ extern int kernel_read_file_from_path_initns(const char *, void **, loff_t *, lo · 1109 unmodified lines | ||
| 3033 | 3033 | extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t, |
| 3034 | 3034 | enum kernel_read_file_id); |
| 3035 | 3035 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *); |
| 3036 | +ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos); | |
| 3036 | 3037 | extern ssize_t kernel_write(struct file *, const void *, size_t, loff_t *); |
| 3037 | 3038 | extern ssize_t __kernel_write(struct file *, const void *, size_t, loff_t *); |
| 3038 | 3039 | extern struct file * open_exec(const char *); |
| @@ -109,6 +109,7 @@ struct fs_context { · 108 unmodified lines | ||
| 109 | 109 | enum fs_context_phase phase:8; /* The phase the context is in */ |
| 110 | 110 | bool need_free:1; /* Need to call ops->free() */ |
| 111 | 111 | bool global:1; /* Goes into &init_user_ns */ |
| 112 | + bool oldapi:1; /* Coming from mount(2) */ | |
| 112 | 113 | }; |
| 113 | 114 | |
| 114 | 115 | struct fs_context_operations { |
| @@ -48,6 +48,9 @@ struct host1x_client_ops { · 47 unmodified lines | ||
| 48 | 48 | * @channel: host1x channel associated with this client |
| 49 | 49 | * @syncpts: array of syncpoints requested for this client |
| 50 | 50 | * @num_syncpts: number of syncpoints requested for this client |
| 51 | + * @parent: pointer to parent structure | |
| 52 | + * @usecount: reference count for this structure | |
| 53 | + * @lock: mutex for mutually exclusive concurrency | |
| 51 | 54 | */ |
| 52 | 55 | struct host1x_client { |
| 53 | 56 | struct list_head list; |
| @@ -3333,13 +3333,17 @@ struct ieee80211_multiple_bssid_configuration { · 3332 unmodified lines | ||
| 3333 | 3333 | #define WLAN_AKM_SUITE_TDLS SUITE(0x000FAC, 7) |
| 3334 | 3334 | #define WLAN_AKM_SUITE_SAE SUITE(0x000FAC, 8) |
| 3335 | 3335 | #define WLAN_AKM_SUITE_FT_OVER_SAE SUITE(0x000FAC, 9) |
| 3336 | +#define WLAN_AKM_SUITE_AP_PEER_KEY SUITE(0x000FAC, 10) | |
| 3336 | 3337 | #define WLAN_AKM_SUITE_8021X_SUITE_B SUITE(0x000FAC, 11) |
| 3337 | 3338 | #define WLAN_AKM_SUITE_8021X_SUITE_B_192 SUITE(0x000FAC, 12) |
| 3339 | +#define WLAN_AKM_SUITE_FT_8021X_SHA384 SUITE(0x000FAC, 13) | |
| 3338 | 3340 | #define WLAN_AKM_SUITE_FILS_SHA256 SUITE(0x000FAC, 14) |
| 3339 | 3341 | #define WLAN_AKM_SUITE_FILS_SHA384 SUITE(0x000FAC, 15) |
| 3340 | 3342 | #define WLAN_AKM_SUITE_FT_FILS_SHA256 SUITE(0x000FAC, 16) |
| 3341 | 3343 | #define WLAN_AKM_SUITE_FT_FILS_SHA384 SUITE(0x000FAC, 17) |
| 3342 | 3344 | #define WLAN_AKM_SUITE_OWE SUITE(0x000FAC, 18) |
| 3345 | +#define WLAN_AKM_SUITE_FT_PSK_SHA384 SUITE(0x000FAC, 19) | |
| 3346 | +#define WLAN_AKM_SUITE_PSK_SHA384 SUITE(0x000FAC, 20) | |
| 3343 | 3347 | |
| 3344 | 3348 | #define WLAN_MAX_KEY_LEN 32 |
| 3345 | 3349 | |
| @@ -25,6 +25,8 @@ · 24 unmodified lines | ||
| 25 | 25 | #define VLAN_ETH_DATA_LEN 1500 /* Max. octets in payload */ |
| 26 | 26 | #define VLAN_ETH_FRAME_LEN 1518 /* Max. octets in frame sans FCS */ |
| 27 | 27 | |
| 28 | +#define VLAN_MAX_DEPTH 8 /* Max. number of nested VLAN tags parsed */ | |
| 29 | + | |
| 28 | 30 | /* |
| 29 | 31 | * struct vlan_hdr - vlan header |
| 30 | 32 | * @h_vlan_TCI: priority and VLAN ID |
| @@ -577,10 +579,10 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci) · 546 unmodified lines | ||
| 577 | 579 | * Returns the EtherType of the packet, regardless of whether it is |
| 578 | 580 | * vlan encapsulated (normal or hardware accelerated) or not. |
| 579 | 581 | */ |
| 580 | −static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type, | |
| 582 | +static inline __be16 __vlan_get_protocol(const struct sk_buff *skb, __be16 type, | |
| 581 | 583 | int *depth) |
| 582 | 584 | { |
| 583 | − unsigned int vlan_depth = skb->mac_len; | |
| 585 | + unsigned int vlan_depth = skb->mac_len, parse_depth = VLAN_MAX_DEPTH; | |
| 584 | 586 | |
| 585 | 587 | /* if type is 802.1Q/AD then the header should already be |
| 586 | 588 | * present at mac_len - VLAN_HLEN (if mac_len > 0), or at |
| @@ -595,13 +597,12 @@ static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type, · 8 unmodified lines | ||
| 595 | 597 | vlan_depth = ETH_HLEN; |
| 596 | 598 | } |
| 597 | 599 | do { |
| 598 | − struct vlan_hdr *vh; | |
| 600 | + struct vlan_hdr vhdr, *vh; | |
| 599 | 601 | |
| 600 | − if (unlikely(!pskb_may_pull(skb, | |
| 601 | − vlan_depth + VLAN_HLEN))) | |
| 602 | + vh = skb_header_pointer(skb, vlan_depth, sizeof(vhdr), &vhdr); | |
| 603 | + if (unlikely(!vh || !--parse_depth)) | |
| 602 | 604 | return 0; |
| 603 | 605 | |
| 604 | − vh = (struct vlan_hdr *)(skb->data + vlan_depth); | |
| 605 | 606 | type = vh->h_vlan_encapsulated_proto; |
| 606 | 607 | vlan_depth += VLAN_HLEN; |
| 607 | 608 | } while (eth_type_vlan(type)); |
| @@ -620,11 +621,25 @@ static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type, · 12 unmodified lines | ||
| 620 | 621 | * Returns the EtherType of the packet, regardless of whether it is |
| 621 | 622 | * vlan encapsulated (normal or hardware accelerated) or not. |
| 622 | 623 | */ |
| 623 | −static inline __be16 vlan_get_protocol(struct sk_buff *skb) | |
| 624 | +static inline __be16 vlan_get_protocol(const struct sk_buff *skb) | |
| 624 | 625 | { |
| 625 | 626 | return __vlan_get_protocol(skb, skb->protocol, NULL); |
| 626 | 627 | } |
| 627 | 628 | |
| 629 | +/* A getter for the SKB protocol field which will handle VLAN tags consistently | |
| 630 | + * whether VLAN acceleration is enabled or not. | |
| 631 | + */ | |
| 632 | +static inline __be16 skb_protocol(const struct sk_buff *skb, bool skip_vlan) | |
| 633 | +{ | |
| 634 | + if (!skip_vlan) | |
| 635 | + /* VLAN acceleration strips the VLAN header from the skb and | |
| 636 | + * moves it to skb->vlan_proto | |
| 637 | + */ | |
| 638 | + return skb_vlan_tag_present(skb) ? skb->vlan_proto : skb->protocol; | |
| 639 | + | |
| 640 | + return vlan_get_protocol(skb); | |
| 641 | +} | |
| 642 | + | |
| 628 | 643 | static inline void vlan_set_encap_proto(struct sk_buff *skb, |
| 629 | 644 | struct vlan_hdr *vhdr) |
| 630 | 645 | { |
| @@ -67,8 +67,15 @@ static const struct acpi_device_id elan_acpi_id[] = { · 66 unmodified lines | ||
| 67 | 67 | { "ELAN062B", 0 }, |
| 68 | 68 | { "ELAN062C", 0 }, |
| 69 | 69 | { "ELAN062D", 0 }, |
| 70 | + { "ELAN062E", 0 }, /* Lenovo V340 Whiskey Lake U */ | |
| 71 | + { "ELAN062F", 0 }, /* Lenovo V340 Comet Lake U */ | |
| 70 | 72 | { "ELAN0631", 0 }, |
| 71 | 73 | { "ELAN0632", 0 }, |
| 74 | + { "ELAN0633", 0 }, /* Lenovo S145 */ | |
| 75 | + { "ELAN0634", 0 }, /* Lenovo V340 Ice lake */ | |
| 76 | + { "ELAN0635", 0 }, /* Lenovo V1415-IIL */ | |
| 77 | + { "ELAN0636", 0 }, /* Lenovo V1415-Dali */ | |
| 78 | + { "ELAN0637", 0 }, /* Lenovo V1415-IGLR */ | |
| 72 | 79 | { "ELAN1000", 0 }, |
| 73 | 80 | { } |
| 74 | 81 | }; |
| @@ -41,6 +41,7 @@ · 40 unmodified lines | ||
| 41 | 41 | #define DMA_PTE_SNP BIT_ULL(11) |
| 42 | 42 | |
| 43 | 43 | #define DMA_FL_PTE_PRESENT BIT_ULL(0) |
| 44 | +#define DMA_FL_PTE_US BIT_ULL(2) | |
| 44 | 45 | #define DMA_FL_PTE_XD BIT_ULL(63) |
| 45 | 46 | |
| 46 | 47 | #define ADDR_WIDTH_5LEVEL (57) |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _LINUX_IRQ_WORK_H |
| 3 | 3 | #define _LINUX_IRQ_WORK_H |
| 4 | 4 | |
| 5 | −#include <linux/llist.h> | |
| 5 | +#include <linux/smp_types.h> | |
| 6 | 6 | |
| 7 | 7 | /* |
| 8 | 8 | * An entry can be in one of four states: |
| @@ -13,24 +13,14 @@ · 4 unmodified lines | ||
| 13 | 13 | * busy NULL, 2 -> {free, claimed} : callback in progress, can be claimed |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | −/* flags share CSD_FLAG_ space */ | |
| 17 | − | |
| 18 | −#define IRQ_WORK_PENDING BIT(0) | |
| 19 | −#define IRQ_WORK_BUSY BIT(1) | |
| 20 | − | |
| 21 | −/* Doesn't want IPI, wait for tick: */ | |
| 22 | −#define IRQ_WORK_LAZY BIT(2) | |
| 23 | −/* Run hard IRQ context, even on RT */ | |
| 24 | −#define IRQ_WORK_HARD_IRQ BIT(3) | |
| 25 | − | |
| 26 | −#define IRQ_WORK_CLAIMED (IRQ_WORK_PENDING | IRQ_WORK_BUSY) | |
| 27 | − | |
| 28 | −/* | |
| 29 | − * structure shares layout with single_call_data_t. | |
| 30 | − */ | |
| 31 | 16 | struct irq_work { |
| 32 | − struct llist_node llnode; | |
| 33 | − atomic_t flags; | |
| 17 | + union { | |
| 18 | + struct __call_single_node node; | |
| 19 | + struct { | |
| 20 | + struct llist_node llnode; | |
| 21 | + atomic_t flags; | |
| 22 | + }; | |
| 23 | + }; | |
| 34 | 24 | void (*func)(struct irq_work *); |
| 35 | 25 | }; |
| 36 | 26 | |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ |
| 19 | 19 | 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1) |
| 20 | 20 | |
| 21 | +struct cred; | |
| 21 | 22 | struct module; |
| 22 | 23 | |
| 23 | 24 | static inline int is_kernel_inittext(unsigned long addr) |
| @@ -98,7 +99,7 @@ int lookup_symbol_name(unsigned long addr, char *symname); · 74 unmodified lines | ||
| 98 | 99 | int lookup_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name); |
| 99 | 100 | |
| 100 | 101 | /* How and when do we show kallsyms values? */ |
| 101 | −extern int kallsyms_show_value(void); | |
| 102 | +extern bool kallsyms_show_value(const struct cred *cred); | |
| 102 | 103 | |
| 103 | 104 | #else /* !CONFIG_KALLSYMS */ |
| 104 | 105 | |
| @@ -158,7 +159,7 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u · 53 unmodified lines | ||
| 158 | 159 | return -ERANGE; |
| 159 | 160 | } |
| 160 | 161 | |
| 161 | −static inline int kallsyms_show_value(void) | |
| 162 | +static inline bool kallsyms_show_value(const struct cred *cred) | |
| 162 | 163 | { |
| 163 | 164 | return false; |
| 164 | 165 | } |
| @@ -176,6 +176,17 @@ kgdb_arch_handle_exception(int vector, int signo, int err_code, · 175 unmodified lines | ||
| 176 | 176 | char *remcom_out_buffer, |
| 177 | 177 | struct pt_regs *regs); |
| 178 | 178 | |
| 179 | +/** | |
| 180 | + * kgdb_arch_handle_qxfer_pkt - Handle architecture specific GDB XML | |
| 181 | + * packets. | |
| 182 | + * @remcom_in_buffer: The buffer of the packet we have read. | |
| 183 | + * @remcom_out_buffer: The buffer of %BUFMAX bytes to write a packet into. | |
| 184 | + */ | |
| 185 | + | |
| 186 | +extern void | |
| 187 | +kgdb_arch_handle_qxfer_pkt(char *remcom_in_buffer, | |
| 188 | + char *remcom_out_buffer); | |
| 189 | + | |
| 179 | 190 | /** |
| 180 | 191 | * kgdb_call_nmi_hook - Call kgdb_nmicallback() on the current CPU |
| 181 | 192 | * @ignored: This parameter is only here to match the prototype. |
| @@ -276,8 +287,7 @@ struct kgdb_arch { · 94 unmodified lines | ||
| 276 | 287 | * the I/O driver. |
| 277 | 288 | * @post_exception: Pointer to a function that will do any cleanup work |
| 278 | 289 | * for the I/O driver. |
| 279 | − * @is_console: 1 if the end device is a console 0 if the I/O device is | |
| 280 | − * not a console | |
| 290 | + * @cons: valid if the I/O device is a console; else NULL. | |
| 281 | 291 | */ |
| 282 | 292 | struct kgdb_io { |
| 283 | 293 | const char *name; |
| @@ -288,7 +298,7 @@ struct kgdb_io { · 4 unmodified lines | ||
| 288 | 298 | void (*deinit) (void); |
| 289 | 299 | void (*pre_exception) (void); |
| 290 | 300 | void (*post_exception) (void); |
| 291 | − int is_console; | |
| 301 | + struct console *cons; | |
| 292 | 302 | }; |
| 293 | 303 | |
| 294 | 304 | extern const struct kgdb_arch arch_kgdb_ops; |
| @@ -315,6 +325,7 @@ extern int kgdb_hex2mem(char *buf, char *mem, int count); · 20 unmodified lines | ||
| 315 | 325 | |
| 316 | 326 | extern int kgdb_isremovedbreak(unsigned long addr); |
| 317 | 327 | extern void kgdb_schedule_breakpoint(void); |
| 328 | +extern int kgdb_has_hit_break(unsigned long addr); | |
| 318 | 329 | |
| 319 | 330 | extern int |
| 320 | 331 | kgdb_handle_exception(int ex_vector, int signo, int err_code, |
| @@ -1095,7 +1095,7 @@ extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd, · 1094 unmodified lines | ||
| 1095 | 1095 | #define ATA_SCSI_COMPAT_IOCTL /* empty */ |
| 1096 | 1096 | #endif |
| 1097 | 1097 | extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd); |
| 1098 | −#if IS_ENABLED(CONFIG_ATA) | |
| 1098 | +#if IS_REACHABLE(CONFIG_ATA) | |
| 1099 | 1099 | bool ata_scsi_dma_need_drain(struct request *rq); |
| 1100 | 1100 | #else |
| 1101 | 1101 | #define ata_scsi_dma_need_drain NULL |
| @@ -150,7 +150,7 @@ LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char *buffer, · 149 unmodified lines | ||
| 150 | 150 | size_t buffer_size) |
| 151 | 151 | LSM_HOOK(void, LSM_RET_VOID, inode_getsecid, struct inode *inode, u32 *secid) |
| 152 | 152 | LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new) |
| 153 | −LSM_HOOK(int, 0, inode_copy_up_xattr, const char *name) | |
| 153 | +LSM_HOOK(int, -EOPNOTSUPP, inode_copy_up_xattr, const char *name) | |
| 154 | 154 | LSM_HOOK(int, 0, kernfs_init_security, struct kernfs_node *kn_dir, |
| 155 | 155 | struct kernfs_node *kn) |
| 156 | 156 | LSM_HOOK(int, 0, file_permission, struct file *file, int mask) |
| @@ -360,7 +360,7 @@ LSM_HOOK(int, 0, key_alloc, struct key *key, const struct cred *cred, · 203 unmodified lines | ||
| 360 | 360 | unsigned long flags) |
| 361 | 361 | LSM_HOOK(void, LSM_RET_VOID, key_free, struct key *key) |
| 362 | 362 | LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred, |
| 363 | − unsigned perm) | |
| 363 | + enum key_need_perm need_perm) | |
| 364 | 364 | LSM_HOOK(int, 0, key_getsecurity, struct key *key, char **_buffer) |
| 365 | 365 | #endif /* CONFIG_KEYS */ |
| 366 | 366 | |
| @@ -147,6 +147,7 @@ enum { · 146 unmodified lines | ||
| 147 | 147 | MLX5_REG_MCDA = 0x9063, |
| 148 | 148 | MLX5_REG_MCAM = 0x907f, |
| 149 | 149 | MLX5_REG_MIRC = 0x9162, |
| 150 | + MLX5_REG_SBCAM = 0xB01F, | |
| 150 | 151 | MLX5_REG_RESOURCE_DUMP = 0xC000, |
| 151 | 152 | }; |
| 152 | 153 | |
| @@ -4283,7 +4283,8 @@ struct mlx5_ifc_rst2init_qp_out_bits { · 4282 unmodified lines | ||
| 4283 | 4283 | |
| 4284 | 4284 | u8 syndrome[0x20]; |
| 4285 | 4285 | |
| 4286 | − u8 reserved_at_40[0x40]; | |
| 4286 | + u8 reserved_at_40[0x20]; | |
| 4287 | + u8 ece[0x20]; | |
| 4287 | 4288 | }; |
| 4288 | 4289 | |
| 4289 | 4290 | struct mlx5_ifc_rst2init_qp_in_bits { |
| @@ -4300,7 +4301,7 @@ struct mlx5_ifc_rst2init_qp_in_bits { · 10 unmodified lines | ||
| 4300 | 4301 | |
| 4301 | 4302 | u8 opt_param_mask[0x20]; |
| 4302 | 4303 | |
| 4303 | − u8 reserved_at_a0[0x20]; | |
| 4304 | + u8 ece[0x20]; | |
| 4304 | 4305 | |
| 4305 | 4306 | struct mlx5_ifc_qpc_bits qpc; |
| 4306 | 4307 | |
| @@ -6619,7 +6620,8 @@ struct mlx5_ifc_init2init_qp_out_bits { · 2312 unmodified lines | ||
| 6619 | 6620 | |
| 6620 | 6621 | u8 syndrome[0x20]; |
| 6621 | 6622 | |
| 6622 | − u8 reserved_at_40[0x40]; | |
| 6623 | + u8 reserved_at_40[0x20]; | |
| 6624 | + u8 ece[0x20]; | |
| 6623 | 6625 | }; |
| 6624 | 6626 | |
| 6625 | 6627 | struct mlx5_ifc_init2init_qp_in_bits { |
| @@ -6636,7 +6638,7 @@ struct mlx5_ifc_init2init_qp_in_bits { · 10 unmodified lines | ||
| 6636 | 6638 | |
| 6637 | 6639 | u8 opt_param_mask[0x20]; |
| 6638 | 6640 | |
| 6639 | − u8 reserved_at_a0[0x20]; | |
| 6641 | + u8 ece[0x20]; | |
| 6640 | 6642 | |
| 6641 | 6643 | struct mlx5_ifc_qpc_bits qpc; |
| 6642 | 6644 | |
| @@ -9958,6 +9960,34 @@ struct mlx5_ifc_pptb_reg_bits { · 3315 unmodified lines | ||
| 9958 | 9960 | u8 untagged_buff[0x4]; |
| 9959 | 9961 | }; |
| 9960 | 9962 | |
| 9963 | +struct mlx5_ifc_sbcam_reg_bits { | |
| 9964 | + u8 reserved_at_0[0x8]; | |
| 9965 | + u8 feature_group[0x8]; | |
| 9966 | + u8 reserved_at_10[0x8]; | |
| 9967 | + u8 access_reg_group[0x8]; | |
| 9968 | + | |
| 9969 | + u8 reserved_at_20[0x20]; | |
| 9970 | + | |
| 9971 | + u8 sb_access_reg_cap_mask[4][0x20]; | |
| 9972 | + | |
| 9973 | + u8 reserved_at_c0[0x80]; | |
| 9974 | + | |
| 9975 | + u8 sb_feature_cap_mask[4][0x20]; | |
| 9976 | + | |
| 9977 | + u8 reserved_at_1c0[0x40]; | |
| 9978 | + | |
| 9979 | + u8 cap_total_buffer_size[0x20]; | |
| 9980 | + | |
| 9981 | + u8 cap_cell_size[0x10]; | |
| 9982 | + u8 cap_max_pg_buffers[0x8]; | |
| 9983 | + u8 cap_num_pool_supported[0x8]; | |
| 9984 | + | |
| 9985 | + u8 reserved_at_240[0x8]; | |
| 9986 | + u8 cap_sbsr_stat_size[0x8]; | |
| 9987 | + u8 cap_max_tclass_data[0x8]; | |
| 9988 | + u8 cap_max_cpu_ingress_tclass_sb[0x8]; | |
| 9989 | +}; | |
| 9990 | + | |
| 9961 | 9991 | struct mlx5_ifc_pbmc_reg_bits { |
| 9962 | 9992 | u8 reserved_at_0[0x8]; |
| 9963 | 9993 | u8 local_port[0x8]; |
| @@ -257,8 +257,8 @@ struct lruvec { · 256 unmodified lines | ||
| 257 | 257 | */ |
| 258 | 258 | unsigned long anon_cost; |
| 259 | 259 | unsigned long file_cost; |
| 260 | − /* Evictions & activations on the inactive file list */ | |
| 261 | − atomic_long_t inactive_age; | |
| 260 | + /* Non-resident age, driven by LRU movement */ | |
| 261 | + atomic_long_t nonresident_age; | |
| 262 | 262 | /* Refaults at the time of last reclaim cycle */ |
| 263 | 263 | unsigned long refaults; |
| 264 | 264 | /* Various lruvec state flags (enum lruvec_flags) */ |
| @@ -318,7 +318,7 @@ struct pcmcia_device_id { · 317 unmodified lines | ||
| 318 | 318 | #define INPUT_DEVICE_ID_LED_MAX 0x0f |
| 319 | 319 | #define INPUT_DEVICE_ID_SND_MAX 0x07 |
| 320 | 320 | #define INPUT_DEVICE_ID_FF_MAX 0x7f |
| 321 | −#define INPUT_DEVICE_ID_SW_MAX 0x0f | |
| 321 | +#define INPUT_DEVICE_ID_SW_MAX 0x10 | |
| 322 | 322 | #define INPUT_DEVICE_ID_PROP_MAX 0x1f |
| 323 | 323 | |
| 324 | 324 | #define INPUT_DEVICE_ID_MATCH_BUS 1 |
| @@ -3157,7 +3157,7 @@ static inline int dev_recursion_level(void) · 3156 unmodified lines | ||
| 3157 | 3157 | return this_cpu_read(softnet_data.xmit.recursion); |
| 3158 | 3158 | } |
| 3159 | 3159 | |
| 3160 | −#define XMIT_RECURSION_LIMIT 10 | |
| 3160 | +#define XMIT_RECURSION_LIMIT 8 | |
| 3161 | 3161 | static inline bool dev_xmit_recursion(void) |
| 3162 | 3162 | { |
| 3163 | 3163 | return unlikely(__this_cpu_read(softnet_data.xmit.recursion) > |
| @@ -25,6 +25,12 @@ · 24 unmodified lines | ||
| 25 | 25 | int ipt_register_table(struct net *net, const struct xt_table *table, |
| 26 | 26 | const struct ipt_replace *repl, |
| 27 | 27 | const struct nf_hook_ops *ops, struct xt_table **res); |
| 28 | + | |
| 29 | +void ipt_unregister_table_pre_exit(struct net *net, struct xt_table *table, | |
| 30 | + const struct nf_hook_ops *ops); | |
| 31 | + | |
| 32 | +void ipt_unregister_table_exit(struct net *net, struct xt_table *table); | |
| 33 | + | |
| 28 | 34 | void ipt_unregister_table(struct net *net, struct xt_table *table, |
| 29 | 35 | const struct nf_hook_ops *ops); |
| 30 | 36 | |
| @@ -29,6 +29,9 @@ int ip6t_register_table(struct net *net, const struct xt_table *table, · 28 unmodified lines | ||
| 29 | 29 | const struct nf_hook_ops *ops, struct xt_table **res); |
| 30 | 30 | void ip6t_unregister_table(struct net *net, struct xt_table *table, |
| 31 | 31 | const struct nf_hook_ops *ops); |
| 32 | +void ip6t_unregister_table_pre_exit(struct net *net, struct xt_table *table, | |
| 33 | + const struct nf_hook_ops *ops); | |
| 34 | +void ip6t_unregister_table_exit(struct net *net, struct xt_table *table); | |
| 32 | 35 | extern unsigned int ip6t_do_table(struct sk_buff *skb, |
| 33 | 36 | const struct nf_hook_state *state, |
| 34 | 37 | struct xt_table *table); |
| @@ -2169,12 +2169,11 @@ static inline int pci_pcie_type(const struct pci_dev *dev) · 2168 unmodified lines | ||
| 2169 | 2169 | */ |
| 2170 | 2170 | static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev) |
| 2171 | 2171 | { |
| 2172 | − struct pci_dev *bridge = pci_upstream_bridge(dev); | |
| 2173 | − | |
| 2174 | − while (bridge) { | |
| 2175 | − if (pci_pcie_type(bridge) == PCI_EXP_TYPE_ROOT_PORT) | |
| 2176 | − return bridge; | |
| 2177 | − bridge = pci_upstream_bridge(bridge); | |
| 2172 | + while (dev) { | |
| 2173 | + if (pci_is_pcie(dev) && | |
| 2174 | + pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT) | |
| 2175 | + return dev; | |
| 2176 | + dev = pci_upstream_bridge(dev); | |
| 2178 | 2177 | } |
| 2179 | 2178 | |
| 2180 | 2179 | return NULL; |
| @@ -1416,6 +1416,7 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev, · 1415 unmodified lines | ||
| 1416 | 1416 | int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd); |
| 1417 | 1417 | int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); |
| 1418 | 1418 | int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd); |
| 1419 | +int phy_disable_interrupts(struct phy_device *phydev); | |
| 1419 | 1420 | void phy_request_interrupt(struct phy_device *phydev); |
| 1420 | 1421 | void phy_free_interrupt(struct phy_device *phydev); |
| 1421 | 1422 | void phy_print_status(struct phy_device *phydev); |
| @@ -207,28 +207,34 @@ static inline u32 qed_chain_get_cons_idx_u32(struct qed_chain *p_chain) · 206 unmodified lines | ||
| 207 | 207 | |
| 208 | 208 | static inline u16 qed_chain_get_elem_left(struct qed_chain *p_chain) |
| 209 | 209 | { |
| 210 | + u16 elem_per_page = p_chain->elem_per_page; | |
| 211 | + u32 prod = p_chain->u.chain16.prod_idx; | |
| 212 | + u32 cons = p_chain->u.chain16.cons_idx; | |
| 210 | 213 | u16 used; |
| 211 | 214 | |
| 212 | − used = (u16) (((u32)0x10000 + | |
| 213 | − (u32)p_chain->u.chain16.prod_idx) - | |
| 214 | − (u32)p_chain->u.chain16.cons_idx); | |
| 215 | + if (prod < cons) | |
| 216 | + prod += (u32)U16_MAX + 1; | |
| 217 | + | |
| 218 | + used = (u16)(prod - cons); | |
| 215 | 219 | if (p_chain->mode == QED_CHAIN_MODE_NEXT_PTR) |
| 216 | − used -= p_chain->u.chain16.prod_idx / p_chain->elem_per_page - | |
| 217 | − p_chain->u.chain16.cons_idx / p_chain->elem_per_page; | |
| 220 | + used -= prod / elem_per_page - cons / elem_per_page; | |
| 218 | 221 | |
| 219 | 222 | return (u16)(p_chain->capacity - used); |
| 220 | 223 | } |
| 221 | 224 | |
| 222 | 225 | static inline u32 qed_chain_get_elem_left_u32(struct qed_chain *p_chain) |
| 223 | 226 | { |
| 227 | + u16 elem_per_page = p_chain->elem_per_page; | |
| 228 | + u64 prod = p_chain->u.chain32.prod_idx; | |
| 229 | + u64 cons = p_chain->u.chain32.cons_idx; | |
| 224 | 230 | u32 used; |
| 225 | 231 | |
| 226 | − used = (u32) (((u64)0x100000000ULL + | |
| 227 | − (u64)p_chain->u.chain32.prod_idx) - | |
| 228 | − (u64)p_chain->u.chain32.cons_idx); | |
| 232 | + if (prod < cons) | |
| 233 | + prod += (u64)U32_MAX + 1; | |
| 234 | + | |
| 235 | + used = (u32)(prod - cons); | |
| 229 | 236 | if (p_chain->mode == QED_CHAIN_MODE_NEXT_PTR) |
| 230 | − used -= p_chain->u.chain32.prod_idx / p_chain->elem_per_page - | |
| 231 | − p_chain->u.chain32.cons_idx / p_chain->elem_per_page; | |
| 237 | + used -= (u32)(prod / elem_per_page - cons / elem_per_page); | |
| 232 | 238 | |
| 233 | 239 | return p_chain->capacity - used; |
| 234 | 240 | } |
| @@ -155,7 +155,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, · 154 unmodified lines | ||
| 155 | 155 | * Loop over each sg element in the given sg_table object. |
| 156 | 156 | */ |
| 157 | 157 | #define for_each_sgtable_sg(sgt, sg, i) \ |
| 158 | − for_each_sg(sgt->sgl, sg, sgt->orig_nents, i) | |
| 158 | + for_each_sg((sgt)->sgl, sg, (sgt)->orig_nents, i) | |
| 159 | 159 | |
| 160 | 160 | /* |
| 161 | 161 | * Loop over each sg element in the given *DMA mapped* sg_table object. |
| @@ -163,7 +163,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, · 1 unmodified line | ||
| 163 | 163 | * of the each element. |
| 164 | 164 | */ |
| 165 | 165 | #define for_each_sgtable_dma_sg(sgt, sg, i) \ |
| 166 | − for_each_sg(sgt->sgl, sg, sgt->nents, i) | |
| 166 | + for_each_sg((sgt)->sgl, sg, (sgt)->nents, i) | |
| 167 | 167 | |
| 168 | 168 | /** |
| 169 | 169 | * sg_chain - Chain two sglists together |
| @@ -451,7 +451,7 @@ sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter) · 281 unmodified lines | ||
| 451 | 451 | * See also for_each_sg_page(). In each loop it operates on PAGE_SIZE unit. |
| 452 | 452 | */ |
| 453 | 453 | #define for_each_sgtable_page(sgt, piter, pgoffset) \ |
| 454 | − for_each_sg_page(sgt->sgl, piter, sgt->orig_nents, pgoffset) | |
| 454 | + for_each_sg_page((sgt)->sgl, piter, (sgt)->orig_nents, pgoffset) | |
| 455 | 455 | |
| 456 | 456 | /** |
| 457 | 457 | * for_each_sgtable_dma_page - iterate over the DMA mapped sg_table object |
| @@ -465,7 +465,7 @@ sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter) · 7 unmodified lines | ||
| 465 | 465 | * unit. |
| 466 | 466 | */ |
| 467 | 467 | #define for_each_sgtable_dma_page(sgt, dma_iter, pgoffset) \ |
| 468 | − for_each_sg_dma_page(sgt->sgl, dma_iter, sgt->nents, pgoffset) | |
| 468 | + for_each_sg_dma_page((sgt)->sgl, dma_iter, (sgt)->nents, pgoffset) | |
| 469 | 469 | |
| 470 | 470 | |
| 471 | 471 | /* |
| @@ -114,10 +114,6 @@ struct task_group; · 113 unmodified lines | ||
| 114 | 114 | |
| 115 | 115 | #define task_is_stopped_or_traced(task) ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) |
| 116 | 116 | |
| 117 | −#define task_contributes_to_load(task) ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ | |
| 118 | − (task->flags & PF_FROZEN) == 0 && \ | |
| 119 | − (task->state & TASK_NOLOAD) == 0) | |
| 120 | − | |
| 121 | 117 | #ifdef CONFIG_DEBUG_ATOMIC_SLEEP |
| 122 | 118 | |
| 123 | 119 | /* |
| @@ -654,9 +650,8 @@ struct task_struct { · 530 unmodified lines | ||
| 654 | 650 | unsigned int ptrace; |
| 655 | 651 | |
| 656 | 652 | #ifdef CONFIG_SMP |
| 657 | − struct llist_node wake_entry; | |
| 658 | − unsigned int wake_entry_type; | |
| 659 | 653 | int on_cpu; |
| 654 | + struct __call_single_node wake_entry; | |
| 660 | 655 | #ifdef CONFIG_THREAD_INFO_IN_TASK |
| 661 | 656 | /* Current CPU: */ |
| 662 | 657 | unsigned int cpu; |
| @@ -19,6 +19,7 @@ struct task_struct; · 18 unmodified lines | ||
| 19 | 19 | #define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */ |
| 20 | 20 | #define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */ |
| 21 | 21 | #define JOBCTL_TRAP_FREEZE_BIT 23 /* trap for cgroup freezer */ |
| 22 | +#define JOBCTL_TASK_WORK_BIT 24 /* set by TWA_SIGNAL */ | |
| 22 | 23 | |
| 23 | 24 | #define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT) |
| 24 | 25 | #define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT) |
| @@ -28,9 +29,10 @@ struct task_struct; · 3 unmodified lines | ||
| 28 | 29 | #define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT) |
| 29 | 30 | #define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT) |
| 30 | 31 | #define JOBCTL_TRAP_FREEZE (1UL << JOBCTL_TRAP_FREEZE_BIT) |
| 32 | +#define JOBCTL_TASK_WORK (1UL << JOBCTL_TASK_WORK_BIT) | |
| 31 | 33 | |
| 32 | 34 | #define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY) |
| 33 | −#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK) | |
| 35 | +#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK | JOBCTL_TASK_WORK) | |
| 34 | 36 | |
| 35 | 37 | extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask); |
| 36 | 38 | extern void task_clear_jobctl_trapping(struct task_struct *task); |
| @@ -462,10 +462,104 @@ extern void uart_handle_cts_change(struct uart_port *uport, · 461 unmodified lines | ||
| 462 | 462 | extern void uart_insert_char(struct uart_port *port, unsigned int status, |
| 463 | 463 | unsigned int overrun, unsigned int ch, unsigned int flag); |
| 464 | 464 | |
| 465 | −extern int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch); | |
| 466 | −extern int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch); | |
| 467 | −extern void uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long flags); | |
| 468 | −extern int uart_handle_break(struct uart_port *port); | |
| 465 | +#ifdef CONFIG_MAGIC_SYSRQ_SERIAL | |
| 466 | +#define SYSRQ_TIMEOUT (HZ * 5) | |
| 467 | + | |
| 468 | +bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch); | |
| 469 | + | |
| 470 | +static inline int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) | |
| 471 | +{ | |
| 472 | + if (!port->sysrq) | |
| 473 | + return 0; | |
| 474 | + | |
| 475 | + if (ch && time_before(jiffies, port->sysrq)) { | |
| 476 | + if (sysrq_mask()) { | |
| 477 | + handle_sysrq(ch); | |
| 478 | + port->sysrq = 0; | |
| 479 | + return 1; | |
| 480 | + } | |
| 481 | + if (uart_try_toggle_sysrq(port, ch)) | |
| 482 | + return 1; | |
| 483 | + } | |
| 484 | + port->sysrq = 0; | |
| 485 | + | |
| 486 | + return 0; | |
| 487 | +} | |
| 488 | + | |
| 489 | +static inline int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch) | |
| 490 | +{ | |
| 491 | + if (!port->sysrq) | |
| 492 | + return 0; | |
| 493 | + | |
| 494 | + if (ch && time_before(jiffies, port->sysrq)) { | |
| 495 | + if (sysrq_mask()) { | |
| 496 | + port->sysrq_ch = ch; | |
| 497 | + port->sysrq = 0; | |
| 498 | + return 1; | |
| 499 | + } | |
| 500 | + if (uart_try_toggle_sysrq(port, ch)) | |
| 501 | + return 1; | |
| 502 | + } | |
| 503 | + port->sysrq = 0; | |
| 504 | + | |
| 505 | + return 0; | |
| 506 | +} | |
| 507 | + | |
| 508 | +static inline void uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags) | |
| 509 | +{ | |
| 510 | + int sysrq_ch; | |
| 511 | + | |
| 512 | + if (!port->has_sysrq) { | |
| 513 | + spin_unlock_irqrestore(&port->lock, irqflags); | |
| 514 | + return; | |
| 515 | + } | |
| 516 | + | |
| 517 | + sysrq_ch = port->sysrq_ch; | |
| 518 | + port->sysrq_ch = 0; | |
| 519 | + | |
| 520 | + spin_unlock_irqrestore(&port->lock, irqflags); | |
| 521 | + | |
| 522 | + if (sysrq_ch) | |
| 523 | + handle_sysrq(sysrq_ch); | |
| 524 | +} | |
| 525 | +#else /* CONFIG_MAGIC_SYSRQ_SERIAL */ | |
| 526 | +static inline int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) | |
| 527 | +{ | |
| 528 | + return 0; | |
| 529 | +} | |
| 530 | +static inline int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch) | |
| 531 | +{ | |
| 532 | + return 0; | |
| 533 | +} | |
| 534 | +static inline void uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags) | |
| 535 | +{ | |
| 536 | + spin_unlock_irqrestore(&port->lock, irqflags); | |
| 537 | +} | |
| 538 | +#endif /* CONFIG_MAGIC_SYSRQ_SERIAL */ | |
| 539 | + | |
| 540 | +/* | |
| 541 | + * We do the SysRQ and SAK checking like this... | |
| 542 | + */ | |
| 543 | +static inline int uart_handle_break(struct uart_port *port) | |
| 544 | +{ | |
| 545 | + struct uart_state *state = port->state; | |
| 546 | + | |
| 547 | + if (port->handle_break) | |
| 548 | + port->handle_break(port); | |
| 549 | + | |
| 550 | +#ifdef CONFIG_MAGIC_SYSRQ_SERIAL | |
| 551 | + if (port->has_sysrq && uart_console(port)) { | |
| 552 | + if (!port->sysrq) { | |
| 553 | + port->sysrq = jiffies + SYSRQ_TIMEOUT; | |
| 554 | + return 1; | |
| 555 | + } | |
| 556 | + port->sysrq = 0; | |
| 557 | + } | |
| 558 | +#endif | |
| 559 | + if (port->flags & UPF_SAK) | |
| 560 | + do_SAK(state->port.tty); | |
| 561 | + return 0; | |
| 562 | +} | |
| 469 | 563 | |
| 470 | 564 | /* |
| 471 | 565 | * UART_ENABLE_MS - determine if port should enable modem status irqs |
| @@ -430,6 +430,19 @@ static inline void psock_set_prog(struct bpf_prog **pprog, · 429 unmodified lines | ||
| 430 | 430 | bpf_prog_put(prog); |
| 431 | 431 | } |
| 432 | 432 | |
| 433 | +static inline int psock_replace_prog(struct bpf_prog **pprog, | |
| 434 | + struct bpf_prog *prog, | |
| 435 | + struct bpf_prog *old) | |
| 436 | +{ | |
| 437 | + if (cmpxchg(pprog, old, prog) != old) | |
| 438 | + return -ENOENT; | |
| 439 | + | |
| 440 | + if (old) | |
| 441 | + bpf_prog_put(old); | |
| 442 | + | |
| 443 | + return 0; | |
| 444 | +} | |
| 445 | + | |
| 433 | 446 | static inline void psock_progs_drop(struct sk_psock_progs *progs) |
| 434 | 447 | { |
| 435 | 448 | psock_set_prog(&progs->msg_parser, NULL); |
| @@ -12,29 +12,22 @@ · 11 unmodified lines | ||
| 12 | 12 | #include <linux/list.h> |
| 13 | 13 | #include <linux/cpumask.h> |
| 14 | 14 | #include <linux/init.h> |
| 15 | −#include <linux/llist.h> | |
| 15 | +#include <linux/smp_types.h> | |
| 16 | 16 | |
| 17 | 17 | typedef void (*smp_call_func_t)(void *info); |
| 18 | 18 | typedef bool (*smp_cond_func_t)(int cpu, void *info); |
| 19 | 19 | |
| 20 | −enum { | |
| 21 | − CSD_FLAG_LOCK = 0x01, | |
| 22 | − | |
| 23 | − /* IRQ_WORK_flags */ | |
| 24 | − | |
| 25 | − CSD_TYPE_ASYNC = 0x00, | |
| 26 | − CSD_TYPE_SYNC = 0x10, | |
| 27 | − CSD_TYPE_IRQ_WORK = 0x20, | |
| 28 | − CSD_TYPE_TTWU = 0x30, | |
| 29 | − CSD_FLAG_TYPE_MASK = 0xF0, | |
| 30 | −}; | |
| 31 | − | |
| 32 | 20 | /* |
| 33 | 21 | * structure shares (partial) layout with struct irq_work |
| 34 | 22 | */ |
| 35 | 23 | struct __call_single_data { |
| 36 | − struct llist_node llist; | |
| 37 | − unsigned int flags; | |
| 24 | + union { | |
| 25 | + struct __call_single_node node; | |
| 26 | + struct { | |
| 27 | + struct llist_node llist; | |
| 28 | + unsigned int flags; | |
| 29 | + }; | |
| 30 | + }; | |
| 38 | 31 | smp_call_func_t func; |
| 39 | 32 | void *info; |
| 40 | 33 | }; |
| @@ -0,0 +1,66 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | +#ifndef __LINUX_SMP_TYPES_H | |
| 3 | +#define __LINUX_SMP_TYPES_H | |
| 4 | + | |
| 5 | +#include <linux/llist.h> | |
| 6 | + | |
| 7 | +enum { | |
| 8 | + CSD_FLAG_LOCK = 0x01, | |
| 9 | + | |
| 10 | + IRQ_WORK_PENDING = 0x01, | |
| 11 | + IRQ_WORK_BUSY = 0x02, | |
| 12 | + IRQ_WORK_LAZY = 0x04, /* No IPI, wait for tick */ | |
| 13 | + IRQ_WORK_HARD_IRQ = 0x08, /* IRQ context on PREEMPT_RT */ | |
| 14 | + | |
| 15 | + IRQ_WORK_CLAIMED = (IRQ_WORK_PENDING | IRQ_WORK_BUSY), | |
| 16 | + | |
| 17 | + CSD_TYPE_ASYNC = 0x00, | |
| 18 | + CSD_TYPE_SYNC = 0x10, | |
| 19 | + CSD_TYPE_IRQ_WORK = 0x20, | |
| 20 | + CSD_TYPE_TTWU = 0x30, | |
| 21 | + | |
| 22 | + CSD_FLAG_TYPE_MASK = 0xF0, | |
| 23 | +}; | |
| 24 | + | |
| 25 | +/* | |
| 26 | + * struct __call_single_node is the primary type on | |
| 27 | + * smp.c:call_single_queue. | |
| 28 | + * | |
| 29 | + * flush_smp_call_function_queue() only reads the type from | |
| 30 | + * __call_single_node::u_flags as a regular load, the above | |
| 31 | + * (anonymous) enum defines all the bits of this word. | |
| 32 | + * | |
| 33 | + * Other bits are not modified until the type is known. | |
| 34 | + * | |
| 35 | + * CSD_TYPE_SYNC/ASYNC: | |
| 36 | + * struct { | |
| 37 | + * struct llist_node node; | |
| 38 | + * unsigned int flags; | |
| 39 | + * smp_call_func_t func; | |
| 40 | + * void *info; | |
| 41 | + * }; | |
| 42 | + * | |
| 43 | + * CSD_TYPE_IRQ_WORK: | |
| 44 | + * struct { | |
| 45 | + * struct llist_node node; | |
| 46 | + * atomic_t flags; | |
| 47 | + * void (*func)(struct irq_work *); | |
| 48 | + * }; | |
| 49 | + * | |
| 50 | + * CSD_TYPE_TTWU: | |
| 51 | + * struct { | |
| 52 | + * struct llist_node node; | |
| 53 | + * unsigned int flags; | |
| 54 | + * }; | |
| 55 | + * | |
| 56 | + */ | |
| 57 | + | |
| 58 | +struct __call_single_node { | |
| 59 | + struct llist_node llist; | |
| 60 | + union { | |
| 61 | + unsigned int u_flags; | |
| 62 | + atomic_t a_flags; | |
| 63 | + }; | |
| 64 | +}; | |
| 65 | + | |
| 66 | +#endif /* __LINUX_SMP_TYPES_H */ | |
| @@ -313,6 +313,7 @@ struct vma_swap_readahead { · 312 unmodified lines | ||
| 313 | 313 | }; |
| 314 | 314 | |
| 315 | 315 | /* linux/mm/workingset.c */ |
| 316 | +void workingset_age_nonresident(struct lruvec *lruvec, unsigned long nr_pages); | |
| 316 | 317 | void *workingset_eviction(struct page *page, struct mem_cgroup *target_memcg); |
| 317 | 318 | void workingset_refault(struct page *page, void *shadow); |
| 318 | 319 | void workingset_activation(struct page *page); |
| @@ -1360,7 +1360,7 @@ static inline long ksys_lchown(const char __user *filename, uid_t user, · 1359 unmodified lines | ||
| 1360 | 1360 | |
| 1361 | 1361 | extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small); |
| 1362 | 1362 | |
| 1363 | −static inline long ksys_ftruncate(unsigned int fd, unsigned long length) | |
| 1363 | +static inline long ksys_ftruncate(unsigned int fd, loff_t length) | |
| 1364 | 1364 | { |
| 1365 | 1365 | return do_sys_ftruncate(fd, length, 1); |
| 1366 | 1366 | } |
| @@ -13,7 +13,10 @@ init_task_work(struct callback_head *twork, task_work_func_t func) · 12 unmodified lines | ||
| 13 | 13 | twork->func = func; |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | −int task_work_add(struct task_struct *task, struct callback_head *twork, bool); | |
| 16 | +#define TWA_RESUME 1 | |
| 17 | +#define TWA_SIGNAL 2 | |
| 18 | +int task_work_add(struct task_struct *task, struct callback_head *twork, int); | |
| 19 | + | |
| 17 | 20 | struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t); |
| 18 | 21 | void task_work_run(void); |
| 19 | 22 | |
| @@ -222,9 +222,9 @@ extern bool timekeeping_rtc_skipresume(void); · 221 unmodified lines | ||
| 222 | 222 | |
| 223 | 223 | extern void timekeeping_inject_sleeptime64(const struct timespec64 *delta); |
| 224 | 224 | |
| 225 | −/* | |
| 225 | +/** | |
| 226 | 226 | * struct system_time_snapshot - simultaneous raw/real time capture with |
| 227 | − * counter value | |
| 227 | + * counter value | |
| 228 | 228 | * @cycles: Clocksource counter value to produce the system times |
| 229 | 229 | * @real: Realtime system time |
| 230 | 230 | * @raw: Monotonic raw system time |
| @@ -239,9 +239,9 @@ struct system_time_snapshot { · 8 unmodified lines | ||
| 239 | 239 | u8 cs_was_changed_seq; |
| 240 | 240 | }; |
| 241 | 241 | |
| 242 | −/* | |
| 242 | +/** | |
| 243 | 243 | * struct system_device_crosststamp - system/device cross-timestamp |
| 244 | − * (syncronized capture) | |
| 244 | + * (synchronized capture) | |
| 245 | 245 | * @device: Device time |
| 246 | 246 | * @sys_realtime: Realtime simultaneous with device time |
| 247 | 247 | * @sys_monoraw: Monotonic raw simultaneous with device time |
| @@ -252,12 +252,12 @@ struct system_device_crosststamp { · 4 unmodified lines | ||
| 252 | 252 | ktime_t sys_monoraw; |
| 253 | 253 | }; |
| 254 | 254 | |
| 255 | −/* | |
| 255 | +/** | |
| 256 | 256 | * struct system_counterval_t - system counter value with the pointer to the |
| 257 | − * corresponding clocksource | |
| 257 | + * corresponding clocksource | |
| 258 | 258 | * @cycles: System counter value |
| 259 | 259 | * @cs: Clocksource corresponding to system counter value. Used by |
| 260 | − * timekeeping code to verify comparibility of two cycle values | |
| 260 | + * timekeeping code to verify comparibility of two cycle values | |
| 261 | 261 | */ |
| 262 | 262 | struct system_counterval_t { |
| 263 | 263 | u64 cycles; |
| @@ -81,6 +81,8 @@ struct tcg_efi_specid_event_algs { · 80 unmodified lines | ||
| 81 | 81 | u16 digest_size; |
| 82 | 82 | } __packed; |
| 83 | 83 | |
| 84 | +#define TCG_SPECID_SIG "Spec ID Event03" | |
| 85 | + | |
| 84 | 86 | struct tcg_efi_specid_event_head { |
| 85 | 87 | u8 signature[16]; |
| 86 | 88 | u32 platform_class; |
| @@ -171,6 +173,7 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 84 unmodified lines | ||
| 171 | 173 | int i; |
| 172 | 174 | int j; |
| 173 | 175 | u32 count, event_type; |
| 176 | + const u8 zero_digest[sizeof(event_header->digest)] = {0}; | |
| 174 | 177 | |
| 175 | 178 | marker = event; |
| 176 | 179 | marker_start = marker; |
| @@ -198,10 +201,19 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 21 unmodified lines | ||
| 198 | 201 | count = READ_ONCE(event->count); |
| 199 | 202 | event_type = READ_ONCE(event->event_type); |
| 200 | 203 | |
| 204 | + /* Verify that it's the log header */ | |
| 205 | + if (event_header->pcr_idx != 0 || | |
| 206 | + event_header->event_type != NO_ACTION || | |
| 207 | + memcmp(event_header->digest, zero_digest, sizeof(zero_digest))) { | |
| 208 | + size = 0; | |
| 209 | + goto out; | |
| 210 | + } | |
| 211 | + | |
| 201 | 212 | efispecid = (struct tcg_efi_specid_event_head *)event_header->event; |
| 202 | 213 | |
| 203 | 214 | /* Check if event is malformed. */ |
| 204 | − if (count > efispecid->num_algs) { | |
| 215 | + if (memcmp(efispecid->signature, TCG_SPECID_SIG, | |
| 216 | + sizeof(TCG_SPECID_SIG)) || count > efispecid->num_algs) { | |
| 205 | 217 | size = 0; |
| 206 | 218 | goto out; |
| 207 | 219 | } |
| @@ -106,7 +106,6 @@ extern void *vzalloc(unsigned long size); · 105 unmodified lines | ||
| 106 | 106 | extern void *vmalloc_user(unsigned long size); |
| 107 | 107 | extern void *vmalloc_node(unsigned long size, int node); |
| 108 | 108 | extern void *vzalloc_node(unsigned long size, int node); |
| 109 | −extern void *vmalloc_exec(unsigned long size); | |
| 110 | 109 | extern void *vmalloc_32(unsigned long size); |
| 111 | 110 | extern void *vmalloc_32_user(unsigned long size); |
| 112 | 111 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask); |