mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 42 participants
  • 18653 discussions
[openeuler:openEuler-1.0-LTS 1581/21579] drivers/pci/probe.c:2223:3: sparse: sparse: symbol 'skip_1620_bus_num' was not declared. Should it be static?
by kernel test robot 29 Jan '24

29 Jan '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: acf72db532a7791fde53af3dc7b4d0a6adcf6eff commit: da5e23f4c7511cbc1a199bb4d5d5477e191dc26c [1581/21579] Hi1620 CS FPGA PCIe Skip Bus :::::: branch date: 2 days ago :::::: commit date: 4 years, 1 month ago config: x86_64-randconfig-121-20240125 (attached as .config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (attached as reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202401290427.eM9fDHDi-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/pci/probe.c:2223:3: sparse: sparse: symbol 'skip_1620_bus_num' was not declared. Should it be static? drivers/pci/probe.c:448:21: sparse: sparse: self-comparison always evaluates to false vim +/skip_1620_bus_num +2223 drivers/pci/probe.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 2214 da5e23f4c7511c Dong Bo 2018-01-30 2215 static int skip_bus_flag = 0; da5e23f4c7511c Dong Bo 2018-01-30 2216 #define HOSTBRIGE_1620_NUM 48 da5e23f4c7511c Dong Bo 2018-01-30 2217 struct skip_bus_num { da5e23f4c7511c Dong Bo 2018-01-30 2218 char module_name[32]; da5e23f4c7511c Dong Bo 2018-01-30 2219 char label[4]; da5e23f4c7511c Dong Bo 2018-01-30 2220 int bus_num; da5e23f4c7511c Dong Bo 2018-01-30 2221 int dev_num; da5e23f4c7511c Dong Bo 2018-01-30 2222 int skip; da5e23f4c7511c Dong Bo 2018-01-30 @2223 } skip_1620_bus_num[HOSTBRIGE_1620_NUM] = { da5e23f4c7511c Dong Bo 2018-01-30 2224 /*chip 0*/ da5e23f4c7511c Dong Bo 2018-01-30 2225 { da5e23f4c7511c Dong Bo 2018-01-30 2226 .module_name = "chip0_pcie", da5e23f4c7511c Dong Bo 2018-01-30 2227 .label = "a0", da5e23f4c7511c Dong Bo 2018-01-30 2228 .bus_num = 0, da5e23f4c7511c Dong Bo 2018-01-30 2229 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2230 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2231 }, da5e23f4c7511c Dong Bo 2018-01-30 2232 { da5e23f4c7511c Dong Bo 2018-01-30 2233 .module_name = "chip0_pcie_dma", da5e23f4c7511c Dong Bo 2018-01-30 2234 .label = "a1", da5e23f4c7511c Dong Bo 2018-01-30 2235 .bus_num = 0x7b, da5e23f4c7511c Dong Bo 2018-01-30 2236 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2237 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2238 }, da5e23f4c7511c Dong Bo 2018-01-30 2239 { da5e23f4c7511c Dong Bo 2018-01-30 2240 .module_name = "chip0_pcie_sdi", da5e23f4c7511c Dong Bo 2018-01-30 2241 .label = "a2", da5e23f4c7511c Dong Bo 2018-01-30 2242 .bus_num = 0x7b, da5e23f4c7511c Dong Bo 2018-01-30 2243 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2244 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2245 }, da5e23f4c7511c Dong Bo 2018-01-30 2246 { da5e23f4c7511c Dong Bo 2018-01-30 2247 .module_name = "chip0_USB", da5e23f4c7511c Dong Bo 2018-01-30 2248 .label = "a3", da5e23f4c7511c Dong Bo 2018-01-30 2249 .bus_num = 0x7a, da5e23f4c7511c Dong Bo 2018-01-30 2250 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2251 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2252 }, da5e23f4c7511c Dong Bo 2018-01-30 2253 { da5e23f4c7511c Dong Bo 2018-01-30 2254 .module_name = "chip0_hpre", da5e23f4c7511c Dong Bo 2018-01-30 2255 .label = "a4", da5e23f4c7511c Dong Bo 2018-01-30 2256 .bus_num = 0x78, da5e23f4c7511c Dong Bo 2018-01-30 2257 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2258 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2259 }, da5e23f4c7511c Dong Bo 2018-01-30 2260 { da5e23f4c7511c Dong Bo 2018-01-30 2261 .module_name = "chip0_rde", da5e23f4c7511c Dong Bo 2018-01-30 2262 .label = "a5", da5e23f4c7511c Dong Bo 2018-01-30 2263 .bus_num = 0x78, da5e23f4c7511c Dong Bo 2018-01-30 2264 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2265 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2266 }, da5e23f4c7511c Dong Bo 2018-01-30 2267 { da5e23f4c7511c Dong Bo 2018-01-30 2268 .module_name = "chip0_nic", da5e23f4c7511c Dong Bo 2018-01-30 2269 .label = "aa", da5e23f4c7511c Dong Bo 2018-01-30 2270 .bus_num = 0x7c, da5e23f4c7511c Dong Bo 2018-01-30 2271 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2272 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2273 }, da5e23f4c7511c Dong Bo 2018-01-30 2274 { da5e23f4c7511c Dong Bo 2018-01-30 2275 .module_name = "chip0_sas", da5e23f4c7511c Dong Bo 2018-01-30 2276 .label = "a6", da5e23f4c7511c Dong Bo 2018-01-30 2277 .bus_num = 0x74, da5e23f4c7511c Dong Bo 2018-01-30 2278 .dev_num = 0x02, da5e23f4c7511c Dong Bo 2018-01-30 2279 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2280 }, da5e23f4c7511c Dong Bo 2018-01-30 2281 { da5e23f4c7511c Dong Bo 2018-01-30 2282 .module_name = "chip0_sas1", da5e23f4c7511c Dong Bo 2018-01-30 2283 .label = "ab", da5e23f4c7511c Dong Bo 2018-01-30 2284 .bus_num = 0x74, da5e23f4c7511c Dong Bo 2018-01-30 2285 .dev_num = 0x04, da5e23f4c7511c Dong Bo 2018-01-30 2286 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2287 }, da5e23f4c7511c Dong Bo 2018-01-30 2288 { da5e23f4c7511c Dong Bo 2018-01-30 2289 .module_name = "chip0_sata", da5e23f4c7511c Dong Bo 2018-01-30 2290 .label = "a7", da5e23f4c7511c Dong Bo 2018-01-30 2291 .bus_num = 0x74, da5e23f4c7511c Dong Bo 2018-01-30 2292 .dev_num = 0x03, da5e23f4c7511c Dong Bo 2018-01-30 2293 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2294 }, da5e23f4c7511c Dong Bo 2018-01-30 2295 { da5e23f4c7511c Dong Bo 2018-01-30 2296 .module_name = "chip0_zip", da5e23f4c7511c Dong Bo 2018-01-30 2297 .label = "a8", da5e23f4c7511c Dong Bo 2018-01-30 2298 .bus_num = 0x74, da5e23f4c7511c Dong Bo 2018-01-30 2299 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2300 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2301 }, da5e23f4c7511c Dong Bo 2018-01-30 2302 { da5e23f4c7511c Dong Bo 2018-01-30 2303 .module_name = "chip0_sec", da5e23f4c7511c Dong Bo 2018-01-30 2304 .label = "a9", da5e23f4c7511c Dong Bo 2018-01-30 2305 .bus_num = 0x74, da5e23f4c7511c Dong Bo 2018-01-30 2306 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2307 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2308 }, da5e23f4c7511c Dong Bo 2018-01-30 2309 /*chip 1*/ da5e23f4c7511c Dong Bo 2018-01-30 2310 { da5e23f4c7511c Dong Bo 2018-01-30 2311 .module_name = "chip1_pcie", da5e23f4c7511c Dong Bo 2018-01-30 2312 .label = "b0", da5e23f4c7511c Dong Bo 2018-01-30 2313 .bus_num = 0x80, da5e23f4c7511c Dong Bo 2018-01-30 2314 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2315 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2316 }, da5e23f4c7511c Dong Bo 2018-01-30 2317 { da5e23f4c7511c Dong Bo 2018-01-30 2318 .module_name = "chip1_pcie_dma", da5e23f4c7511c Dong Bo 2018-01-30 2319 .label = "b1", da5e23f4c7511c Dong Bo 2018-01-30 2320 .bus_num = 0xbb, da5e23f4c7511c Dong Bo 2018-01-30 2321 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2322 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2323 }, da5e23f4c7511c Dong Bo 2018-01-30 2324 { da5e23f4c7511c Dong Bo 2018-01-30 2325 .module_name = "chip1_pcie_sdi", da5e23f4c7511c Dong Bo 2018-01-30 2326 .label = "b2", da5e23f4c7511c Dong Bo 2018-01-30 2327 .bus_num = 0xbb, da5e23f4c7511c Dong Bo 2018-01-30 2328 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2329 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2330 }, da5e23f4c7511c Dong Bo 2018-01-30 2331 { da5e23f4c7511c Dong Bo 2018-01-30 2332 .module_name = "chip1_USB", da5e23f4c7511c Dong Bo 2018-01-30 2333 .label = "b3", da5e23f4c7511c Dong Bo 2018-01-30 2334 .bus_num = 0xba, da5e23f4c7511c Dong Bo 2018-01-30 2335 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2336 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2337 }, da5e23f4c7511c Dong Bo 2018-01-30 2338 { da5e23f4c7511c Dong Bo 2018-01-30 2339 .module_name = "chip1_hpre", da5e23f4c7511c Dong Bo 2018-01-30 2340 .label = "b4", da5e23f4c7511c Dong Bo 2018-01-30 2341 .bus_num = 0xb8, da5e23f4c7511c Dong Bo 2018-01-30 2342 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2343 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2344 }, da5e23f4c7511c Dong Bo 2018-01-30 2345 { da5e23f4c7511c Dong Bo 2018-01-30 2346 .module_name = "chip1_rde", da5e23f4c7511c Dong Bo 2018-01-30 2347 .label = "b5", da5e23f4c7511c Dong Bo 2018-01-30 2348 .bus_num = 0xb8, da5e23f4c7511c Dong Bo 2018-01-30 2349 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2350 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2351 }, da5e23f4c7511c Dong Bo 2018-01-30 2352 { da5e23f4c7511c Dong Bo 2018-01-30 2353 .module_name = "chip1_nic", da5e23f4c7511c Dong Bo 2018-01-30 2354 .label = "ba", da5e23f4c7511c Dong Bo 2018-01-30 2355 .bus_num = 0xbc, da5e23f4c7511c Dong Bo 2018-01-30 2356 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2357 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2358 }, da5e23f4c7511c Dong Bo 2018-01-30 2359 { da5e23f4c7511c Dong Bo 2018-01-30 2360 .module_name = "chip1_sas", da5e23f4c7511c Dong Bo 2018-01-30 2361 .label = "b6", da5e23f4c7511c Dong Bo 2018-01-30 2362 .bus_num = 0xb4, da5e23f4c7511c Dong Bo 2018-01-30 2363 .dev_num = 0x02, da5e23f4c7511c Dong Bo 2018-01-30 2364 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2365 }, da5e23f4c7511c Dong Bo 2018-01-30 2366 { da5e23f4c7511c Dong Bo 2018-01-30 2367 .module_name = "chip1_sas1", da5e23f4c7511c Dong Bo 2018-01-30 2368 .label = "bb", da5e23f4c7511c Dong Bo 2018-01-30 2369 .bus_num = 0xb4, da5e23f4c7511c Dong Bo 2018-01-30 2370 .dev_num = 0x04, da5e23f4c7511c Dong Bo 2018-01-30 2371 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2372 }, da5e23f4c7511c Dong Bo 2018-01-30 2373 { da5e23f4c7511c Dong Bo 2018-01-30 2374 .module_name = "chip1_sata", da5e23f4c7511c Dong Bo 2018-01-30 2375 .label = "b7", da5e23f4c7511c Dong Bo 2018-01-30 2376 .bus_num = 0xb4, da5e23f4c7511c Dong Bo 2018-01-30 2377 .dev_num = 0x03, da5e23f4c7511c Dong Bo 2018-01-30 2378 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2379 }, da5e23f4c7511c Dong Bo 2018-01-30 2380 { da5e23f4c7511c Dong Bo 2018-01-30 2381 .module_name = "chip1_zip", da5e23f4c7511c Dong Bo 2018-01-30 2382 .label = "b8", da5e23f4c7511c Dong Bo 2018-01-30 2383 .bus_num = 0xb4, da5e23f4c7511c Dong Bo 2018-01-30 2384 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2385 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2386 }, da5e23f4c7511c Dong Bo 2018-01-30 2387 { da5e23f4c7511c Dong Bo 2018-01-30 2388 .module_name = "chip0_sec", da5e23f4c7511c Dong Bo 2018-01-30 2389 .label = "b9", da5e23f4c7511c Dong Bo 2018-01-30 2390 .bus_num = 0xb4, da5e23f4c7511c Dong Bo 2018-01-30 2391 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2392 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2393 }, da5e23f4c7511c Dong Bo 2018-01-30 2394 da5e23f4c7511c Dong Bo 2018-01-30 2395 /*chip 2*/ da5e23f4c7511c Dong Bo 2018-01-30 2396 { da5e23f4c7511c Dong Bo 2018-01-30 2397 .module_name = "chip2_pcie", da5e23f4c7511c Dong Bo 2018-01-30 2398 .label = "c0", da5e23f4c7511c Dong Bo 2018-01-30 2399 .bus_num = 0xc0, da5e23f4c7511c Dong Bo 2018-01-30 2400 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2401 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2402 }, da5e23f4c7511c Dong Bo 2018-01-30 2403 { da5e23f4c7511c Dong Bo 2018-01-30 2404 .module_name = "chip2_pcie_dma", da5e23f4c7511c Dong Bo 2018-01-30 2405 .label = "c1", da5e23f4c7511c Dong Bo 2018-01-30 2406 .bus_num = 0xdb, da5e23f4c7511c Dong Bo 2018-01-30 2407 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2408 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2409 }, da5e23f4c7511c Dong Bo 2018-01-30 2410 { da5e23f4c7511c Dong Bo 2018-01-30 2411 .module_name = "chip2_pcie_sdi", da5e23f4c7511c Dong Bo 2018-01-30 2412 .label = "c2", da5e23f4c7511c Dong Bo 2018-01-30 2413 .bus_num = 0xdb, da5e23f4c7511c Dong Bo 2018-01-30 2414 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2415 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2416 }, da5e23f4c7511c Dong Bo 2018-01-30 2417 { da5e23f4c7511c Dong Bo 2018-01-30 2418 .module_name = "chip2_USB", da5e23f4c7511c Dong Bo 2018-01-30 2419 .label = "c3", da5e23f4c7511c Dong Bo 2018-01-30 2420 .bus_num = 0xda, da5e23f4c7511c Dong Bo 2018-01-30 2421 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2422 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2423 }, da5e23f4c7511c Dong Bo 2018-01-30 2424 { da5e23f4c7511c Dong Bo 2018-01-30 2425 .module_name = "chip2_hpre", da5e23f4c7511c Dong Bo 2018-01-30 2426 .label = "c4", da5e23f4c7511c Dong Bo 2018-01-30 2427 .bus_num = 0xd8, da5e23f4c7511c Dong Bo 2018-01-30 2428 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2429 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2430 }, da5e23f4c7511c Dong Bo 2018-01-30 2431 { da5e23f4c7511c Dong Bo 2018-01-30 2432 .module_name = "chip2_rde", da5e23f4c7511c Dong Bo 2018-01-30 2433 .label = "c5", da5e23f4c7511c Dong Bo 2018-01-30 2434 .bus_num = 0xd8, da5e23f4c7511c Dong Bo 2018-01-30 2435 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2436 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2437 }, da5e23f4c7511c Dong Bo 2018-01-30 2438 { da5e23f4c7511c Dong Bo 2018-01-30 2439 .module_name = "chip2_nic", da5e23f4c7511c Dong Bo 2018-01-30 2440 .label = "ca", da5e23f4c7511c Dong Bo 2018-01-30 2441 .bus_num = 0xdc, da5e23f4c7511c Dong Bo 2018-01-30 2442 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2443 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2444 }, da5e23f4c7511c Dong Bo 2018-01-30 2445 { da5e23f4c7511c Dong Bo 2018-01-30 2446 .module_name = "chip2_sas", da5e23f4c7511c Dong Bo 2018-01-30 2447 .label = "c6", da5e23f4c7511c Dong Bo 2018-01-30 2448 .bus_num = 0xd4, da5e23f4c7511c Dong Bo 2018-01-30 2449 .dev_num = 0x02, da5e23f4c7511c Dong Bo 2018-01-30 2450 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2451 }, da5e23f4c7511c Dong Bo 2018-01-30 2452 { da5e23f4c7511c Dong Bo 2018-01-30 2453 .module_name = "chip2_sas1", da5e23f4c7511c Dong Bo 2018-01-30 2454 .label = "cb", da5e23f4c7511c Dong Bo 2018-01-30 2455 .bus_num = 0xd4, da5e23f4c7511c Dong Bo 2018-01-30 2456 .dev_num = 0x04, da5e23f4c7511c Dong Bo 2018-01-30 2457 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2458 }, da5e23f4c7511c Dong Bo 2018-01-30 2459 { da5e23f4c7511c Dong Bo 2018-01-30 2460 .module_name = "chip2_sata", da5e23f4c7511c Dong Bo 2018-01-30 2461 .label = "c7", da5e23f4c7511c Dong Bo 2018-01-30 2462 .bus_num = 0xd4, da5e23f4c7511c Dong Bo 2018-01-30 2463 .dev_num = 0x03, da5e23f4c7511c Dong Bo 2018-01-30 2464 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2465 }, da5e23f4c7511c Dong Bo 2018-01-30 2466 { da5e23f4c7511c Dong Bo 2018-01-30 2467 .module_name = "chip2_zip", da5e23f4c7511c Dong Bo 2018-01-30 2468 .label = "c8", da5e23f4c7511c Dong Bo 2018-01-30 2469 .bus_num = 0xd4, da5e23f4c7511c Dong Bo 2018-01-30 2470 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2471 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2472 }, da5e23f4c7511c Dong Bo 2018-01-30 2473 { da5e23f4c7511c Dong Bo 2018-01-30 2474 .module_name = "chip2_sec", da5e23f4c7511c Dong Bo 2018-01-30 2475 .label = "c9", da5e23f4c7511c Dong Bo 2018-01-30 2476 .bus_num = 0xd4, da5e23f4c7511c Dong Bo 2018-01-30 2477 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2478 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2479 }, da5e23f4c7511c Dong Bo 2018-01-30 2480 da5e23f4c7511c Dong Bo 2018-01-30 2481 /*chip 3*/ da5e23f4c7511c Dong Bo 2018-01-30 2482 { da5e23f4c7511c Dong Bo 2018-01-30 2483 .module_name = "chip3_pcie", da5e23f4c7511c Dong Bo 2018-01-30 2484 .label = "d0", da5e23f4c7511c Dong Bo 2018-01-30 2485 .bus_num = 0xe0, da5e23f4c7511c Dong Bo 2018-01-30 2486 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2487 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2488 }, da5e23f4c7511c Dong Bo 2018-01-30 2489 { da5e23f4c7511c Dong Bo 2018-01-30 2490 .module_name = "chip3_pcie_dma", da5e23f4c7511c Dong Bo 2018-01-30 2491 .label = "d1", da5e23f4c7511c Dong Bo 2018-01-30 2492 .bus_num = 0xfb, da5e23f4c7511c Dong Bo 2018-01-30 2493 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2494 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2495 }, da5e23f4c7511c Dong Bo 2018-01-30 2496 { da5e23f4c7511c Dong Bo 2018-01-30 2497 .module_name = "chip3_pcie_sdi", da5e23f4c7511c Dong Bo 2018-01-30 2498 .label = "d2", da5e23f4c7511c Dong Bo 2018-01-30 2499 .bus_num = 0xfb, da5e23f4c7511c Dong Bo 2018-01-30 2500 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2501 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2502 }, da5e23f4c7511c Dong Bo 2018-01-30 2503 { da5e23f4c7511c Dong Bo 2018-01-30 2504 .module_name = "chip3_USB", da5e23f4c7511c Dong Bo 2018-01-30 2505 .label = "d3", da5e23f4c7511c Dong Bo 2018-01-30 2506 .bus_num = 0xfa, da5e23f4c7511c Dong Bo 2018-01-30 2507 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2508 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2509 }, da5e23f4c7511c Dong Bo 2018-01-30 2510 { da5e23f4c7511c Dong Bo 2018-01-30 2511 .module_name = "chip3_hpre", da5e23f4c7511c Dong Bo 2018-01-30 2512 .label = "d4", da5e23f4c7511c Dong Bo 2018-01-30 2513 .bus_num = 0xf8, da5e23f4c7511c Dong Bo 2018-01-30 2514 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2515 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2516 }, da5e23f4c7511c Dong Bo 2018-01-30 2517 { da5e23f4c7511c Dong Bo 2018-01-30 2518 .module_name = "chip3_rde", da5e23f4c7511c Dong Bo 2018-01-30 2519 .label = "d5", da5e23f4c7511c Dong Bo 2018-01-30 2520 .bus_num = 0xf8, da5e23f4c7511c Dong Bo 2018-01-30 2521 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2522 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2523 }, da5e23f4c7511c Dong Bo 2018-01-30 2524 { da5e23f4c7511c Dong Bo 2018-01-30 2525 .module_name = "chip3_nic", da5e23f4c7511c Dong Bo 2018-01-30 2526 .label = "da", da5e23f4c7511c Dong Bo 2018-01-30 2527 .bus_num = 0xfc, da5e23f4c7511c Dong Bo 2018-01-30 2528 .dev_num = 0xff, da5e23f4c7511c Dong Bo 2018-01-30 2529 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2530 }, da5e23f4c7511c Dong Bo 2018-01-30 2531 { da5e23f4c7511c Dong Bo 2018-01-30 2532 .module_name = "chip3_sas", da5e23f4c7511c Dong Bo 2018-01-30 2533 .label = "d6", da5e23f4c7511c Dong Bo 2018-01-30 2534 .bus_num = 0xf4, da5e23f4c7511c Dong Bo 2018-01-30 2535 .dev_num = 0x02, da5e23f4c7511c Dong Bo 2018-01-30 2536 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2537 }, da5e23f4c7511c Dong Bo 2018-01-30 2538 { da5e23f4c7511c Dong Bo 2018-01-30 2539 .module_name = "chip3_sas1", da5e23f4c7511c Dong Bo 2018-01-30 2540 .label = "db", da5e23f4c7511c Dong Bo 2018-01-30 2541 .bus_num = 0xf4, da5e23f4c7511c Dong Bo 2018-01-30 2542 .dev_num = 0x04, da5e23f4c7511c Dong Bo 2018-01-30 2543 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2544 }, da5e23f4c7511c Dong Bo 2018-01-30 2545 { da5e23f4c7511c Dong Bo 2018-01-30 2546 .module_name = "chip3_sata", da5e23f4c7511c Dong Bo 2018-01-30 2547 .label = "d7", da5e23f4c7511c Dong Bo 2018-01-30 2548 .bus_num = 0xf4, da5e23f4c7511c Dong Bo 2018-01-30 2549 .dev_num = 0x03, da5e23f4c7511c Dong Bo 2018-01-30 2550 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2551 }, da5e23f4c7511c Dong Bo 2018-01-30 2552 { da5e23f4c7511c Dong Bo 2018-01-30 2553 .module_name = "chip3_zip", da5e23f4c7511c Dong Bo 2018-01-30 2554 .label = "d8", da5e23f4c7511c Dong Bo 2018-01-30 2555 .bus_num = 0xf4, da5e23f4c7511c Dong Bo 2018-01-30 2556 .dev_num = 0x0, da5e23f4c7511c Dong Bo 2018-01-30 2557 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2558 }, da5e23f4c7511c Dong Bo 2018-01-30 2559 { da5e23f4c7511c Dong Bo 2018-01-30 2560 .module_name = "chip3_sec", da5e23f4c7511c Dong Bo 2018-01-30 2561 .label = "d9", da5e23f4c7511c Dong Bo 2018-01-30 2562 .bus_num = 0xf4, da5e23f4c7511c Dong Bo 2018-01-30 2563 .dev_num = 0x1, da5e23f4c7511c Dong Bo 2018-01-30 2564 .skip = 0 da5e23f4c7511c Dong Bo 2018-01-30 2565 }, da5e23f4c7511c Dong Bo 2018-01-30 2566 }; da5e23f4c7511c Dong Bo 2018-01-30 2567 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6 v3 0/2] KABI reservation for IMA and crypto
by GUO Zihua 29 Jan '24

29 Jan '24
KABI reservation for IMA and crypto module. v3: Reserve one more u64 for crypto related structs. v2: Changed reservation ordering, and more reservation. GUO Zihua (2): crypto: kabi: KABI reservation for crypto ima: kabi: KABI reservation for IMA include/crypto/aead.h | 7 +++++++ include/crypto/akcipher.h | 7 +++++++ include/crypto/algapi.h | 7 +++++++ include/crypto/cryptd.h | 3 +++ include/crypto/hash.h | 9 +++++++++ include/crypto/if_alg.h | 9 +++++++++ include/crypto/public_key.h | 5 +++++ include/crypto/rng.h | 5 +++++ include/crypto/skcipher.h | 7 +++++++ include/linux/crypto.h | 5 +++++ include/linux/fs.h | 5 +++++ include/linux/kernel_read_file.h | 3 +++ include/linux/kexec.h | 5 +++++ include/linux/user_namespace.h | 3 +++ 14 files changed, 80 insertions(+) -- 2.34.1
1 2
0 0
[PATCH OLK-6.6] iommu/iova: avoid softlockup in fq_flush_timeout
by Zhang Zekun 29 Jan '24

29 Jan '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZE0I CVE: NA --------------------------------- There is softlockup under fio pressure test with smmu enabled: watchdog: BUG: soft lockup - CPU#81 stuck for 22s! [swapper/81:0] ... Call trace: fq_flush_timeout+0xc0/0x110 call_timer_fn+0x34/0x178 expire_timers+0xec/0x158 run_timer_softirq+0xc0/0x1f8 __do_softirq+0x120/0x324 irq_exit+0x11c/0x140 __handle_domain_irq+0x6c/0xc0 gic_handle_irq+0x6c/0x170 el1_irq+0xb8/0x140 arch_cpu_idle+0x38/0x1c0 default_idle_call+0x24/0x44 do_idle+0x1f4/0x2d8 cpu_startup_entry+0x2c/0x30 secondary_start_kernel+0x17c/0x1c8 This is because the timer callback fq_flush_timeout may run more than 10ms, and timer may be processed continuously in the softirq so trigger softlockup. We can use work to deal with fq_ring_free for each cpu which may take long time, that to avoid triggering softlockup. Signed-off-by: Li Bin <huawei.libin(a)huawei.com> Signed-off-by: Peng Wu <wupeng58(a)huawei.com> Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- drivers/iommu/dma-iommu.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 4b1a88f514c9..b144ce2b2915 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -68,6 +68,8 @@ struct iommu_dma_cookie { /* Domain for flush queue callback; NULL if flush queue not in use */ struct iommu_domain *fq_domain; struct mutex mutex; + + struct work_struct free_iova_work; }; static DEFINE_STATIC_KEY_FALSE(iommu_deferred_attach_enabled); @@ -155,20 +157,11 @@ static void fq_flush_iotlb(struct iommu_dma_cookie *cookie) static void fq_flush_timeout(struct timer_list *t) { struct iommu_dma_cookie *cookie = from_timer(cookie, t, fq_timer); - int cpu; atomic_set(&cookie->fq_timer_on, 0); fq_flush_iotlb(cookie); - for_each_possible_cpu(cpu) { - unsigned long flags; - struct iova_fq *fq; - - fq = per_cpu_ptr(cookie->fq, cpu); - spin_lock_irqsave(&fq->lock, flags); - fq_ring_free(cookie, fq); - spin_unlock_irqrestore(&fq->lock, flags); - } + schedule_work(&cookie->free_iova_work); } static void queue_iova(struct iommu_dma_cookie *cookie, @@ -235,9 +228,28 @@ static void iommu_dma_free_fq(struct iommu_dma_cookie *cookie) put_pages_list(&fq->entries[idx].freelist); } + flush_work(&cookie->free_iova_work); free_percpu(cookie->fq); } +static void free_iova_work_func(struct work_struct *work) +{ + struct iommu_dma_cookie *cookie; + int cpu; + + cookie = container_of(work, struct iommu_dma_cookie, free_iova_work); + for_each_possible_cpu(cpu) { + unsigned long flags; + struct iova_fq *fq; + + fq = per_cpu_ptr(cookie->fq, cpu); + spin_lock_irqsave(&fq->lock, flags); + fq_ring_free(cookie, fq); + spin_unlock_irqrestore(&fq->lock, flags); + } +} + + /* sysfs updates are serialised by the mutex of the group owning @domain */ int iommu_dma_init_fq(struct iommu_domain *domain) { @@ -271,6 +283,7 @@ int iommu_dma_init_fq(struct iommu_domain *domain) cookie->fq = queue; + INIT_WORK(&cookie->free_iova_work, free_iova_work_func); timer_setup(&cookie->fq_timer, fq_flush_timeout, 0); atomic_set(&cookie->fq_timer_on, 0); /* -- 2.17.1
2 1
0 0
[PATCH OLK-5.10] iommu/iova: avoid softlockup in fq_flush_timeout
by Zhang Zekun 29 Jan '24

29 Jan '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZE0I CVE: NA --------------------------------- There is softlockup under fio pressure test with smmu enabled: watchdog: BUG: soft lockup - CPU#81 stuck for 22s! [swapper/81:0] ... Call trace: fq_flush_timeout+0xc0/0x110 call_timer_fn+0x34/0x178 expire_timers+0xec/0x158 run_timer_softirq+0xc0/0x1f8 __do_softirq+0x120/0x324 irq_exit+0x11c/0x140 __handle_domain_irq+0x6c/0xc0 gic_handle_irq+0x6c/0x170 el1_irq+0xb8/0x140 arch_cpu_idle+0x38/0x1c0 default_idle_call+0x24/0x44 do_idle+0x1f4/0x2d8 cpu_startup_entry+0x2c/0x30 secondary_start_kernel+0x17c/0x1c8 This is because the timer callback fq_flush_timeout may run more than 10ms, and timer may be processed continuously in the softirq so trigger softlockup. We can use work to deal with fq_ring_free for each cpu which may take long time, that to avoid triggering softlockup. Signed-off-by: Li Bin <huawei.libin(a)huawei.com> Signed-off-by: Peng Wu <wupeng58(a)huawei.com> Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- drivers/iommu/dma-iommu.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 4b1a88f514c9..b144ce2b2915 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -68,6 +68,8 @@ struct iommu_dma_cookie { /* Domain for flush queue callback; NULL if flush queue not in use */ struct iommu_domain *fq_domain; struct mutex mutex; + + struct work_struct free_iova_work; }; static DEFINE_STATIC_KEY_FALSE(iommu_deferred_attach_enabled); @@ -155,20 +157,11 @@ static void fq_flush_iotlb(struct iommu_dma_cookie *cookie) static void fq_flush_timeout(struct timer_list *t) { struct iommu_dma_cookie *cookie = from_timer(cookie, t, fq_timer); - int cpu; atomic_set(&cookie->fq_timer_on, 0); fq_flush_iotlb(cookie); - for_each_possible_cpu(cpu) { - unsigned long flags; - struct iova_fq *fq; - - fq = per_cpu_ptr(cookie->fq, cpu); - spin_lock_irqsave(&fq->lock, flags); - fq_ring_free(cookie, fq); - spin_unlock_irqrestore(&fq->lock, flags); - } + schedule_work(&cookie->free_iova_work); } static void queue_iova(struct iommu_dma_cookie *cookie, @@ -235,9 +228,28 @@ static void iommu_dma_free_fq(struct iommu_dma_cookie *cookie) put_pages_list(&fq->entries[idx].freelist); } + flush_work(&cookie->free_iova_work); free_percpu(cookie->fq); } +static void free_iova_work_func(struct work_struct *work) +{ + struct iommu_dma_cookie *cookie; + int cpu; + + cookie = container_of(work, struct iommu_dma_cookie, free_iova_work); + for_each_possible_cpu(cpu) { + unsigned long flags; + struct iova_fq *fq; + + fq = per_cpu_ptr(cookie->fq, cpu); + spin_lock_irqsave(&fq->lock, flags); + fq_ring_free(cookie, fq); + spin_unlock_irqrestore(&fq->lock, flags); + } +} + + /* sysfs updates are serialised by the mutex of the group owning @domain */ int iommu_dma_init_fq(struct iommu_domain *domain) { @@ -271,6 +283,7 @@ int iommu_dma_init_fq(struct iommu_domain *domain) cookie->fq = queue; + INIT_WORK(&cookie->free_iova_work, free_iova_work_func); timer_setup(&cookie->fq_timer, fq_flush_timeout, 0); atomic_set(&cookie->fq_timer_on, 0); /* -- 2.17.1
1 0
0 0
[PATCH OLK-5.10 0/2] fix spinlock already unlocked in inet_csk_reqsk_queue_add' bug
by Zhengchao Shao 29 Jan '24

29 Jan '24
Fix spinlock already unlocked in inet_csk_reqsk_queue_add' bug. Zhengchao Shao (2): tcp: make sure init the accept_queue's spinlocks once ipv6: init the accept_queue's spinlocks in inet6_create include/net/inet_connection_sock.h | 8 ++++++++ net/core/request_sock.c | 3 --- net/ipv4/af_inet.c | 3 +++ net/ipv4/inet_connection_sock.c | 4 ++++ net/ipv6/af_inet6.c | 3 +++ 5 files changed, 18 insertions(+), 3 deletions(-) -- 2.34.1
1 2
0 0
[PATCH OLK-6.6 v2] tcp: fix compilation issue when CONFIG_SYSCTL is disabled
by Zhengchao Shao 29 Jan '24

29 Jan '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8Y7PX CVE: NA -------------------------------- The following error is reported when the kernel is compiled with CONFIG_SYSCTL disabled: aarch64-linux-ld: net/ipv4/inet_hashtables.o: in function `__inet_hash_connect': inet_hashtables.c:(.text+0x3564): undefined reference to `sysctl_local_port_allocation' aarch64-linux-ld: net/ipv4/inet_hashtables.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `sysctl_local_port_allocation' which may bind externally can not be used when making a shared object; recompile with -fPIC >> inet_hashtables.c:(.text+0x3564): dangerous relocation: unsupported relocation aarch64-linux-ld: inet_hashtables.c:(.text+0x3568): undefined reference to `sysctl_local_port_allocation' aarch64-linux-ld: inet_hashtables.c:(.text+0x3580): undefined reference to `sysctl_local_port_allocation' When CONFIG_SYSCTL is disabled, sysctl_local_port_allocation is undefined. Fixes: 208a72041292 ("tcp/dccp: Add another way to allocate local ports in connect()") Reported-by: kernel test robot <lkp(a)intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202401180939.2N529UUe-lkp@intel.com/ Signed-off-by: Zhengchao Shao <shaozhengchao(a)huawei.com> --- net/ipv4/inet_hashtables.c | 2 ++ net/ipv4/sysctl_net_ipv4.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index a24dcf39e9ae..57a207101545 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -28,6 +28,8 @@ #include <net/tcp.h> #include <net/sock_reuseport.h> +int sysctl_local_port_allocation; + u32 inet_ehashfn(const struct net *net, const __be32 laddr, const __u16 lport, const __be32 faddr, const __be16 fport) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index f212133b05e9..64b3bfcbfa25 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -39,7 +39,6 @@ static unsigned long ip_ping_group_range_min[] = { 0, 0 }; static unsigned long ip_ping_group_range_max[] = { GID_T_MAX, GID_T_MAX }; static u32 u32_max_div_HZ = UINT_MAX / HZ; static int one_day_secs = 24 * 3600; -int sysctl_local_port_allocation; static u32 fib_multipath_hash_fields_all_mask __maybe_unused = FIB_MULTIPATH_HASH_FIELD_ALL_MASK; static unsigned int tcp_child_ehash_entries_max = 16 * 1024 * 1024; -- 2.34.1
2 1
0 0
[PATCH OLK-5.10 0/3] linux Mainline ubifs Fix Patch bacnport to 5.10
by ZhaoLong Wang 29 Jan '24

29 Jan '24
revert the commit f13656bbd4c9423857d7115ab93263b76d860c96 for apply d07cec9c238ae8fc6c1a9f3f5d30a2f8ec6cdc71 Backport d81efd66106c03771ffc8637855a6ec24caa6350 Konstantin Meskhidze (1): ubifs: fix possible dereference after free ZhaoLong Wang (2): Revert "mtd/ubi/block: Fix uaf problem in ubiblock_cleanup" ubi: block: Fix use-after-free in ubiblock_cleanup drivers/mtd/ubi/block.c | 4 +++- fs/ubifs/tnc.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.34.3
1 3
0 0
[PATCH OLK-6.6] ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
by ZhaoLong Wang 29 Jan '24

29 Jan '24
From: Namjae Jeon <linkinjeon(a)kernel.org> mainline inclusion from mainline-v6.7-rc8 commit d10c77873ba1e9e6b91905018e29e196fd5f863d category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8YD63 CVE: CVE-2024-22705 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- If ->NameOffset/Length is bigger than ->CreateContextsOffset/Length, ksmbd_check_message doesn't validate request buffer it correctly. So slab-out-of-bounds warning from calling smb_strndup_from_utf16() in smb2_open() could happen. If ->NameLength is non-zero, Set the larger of the two sums (Name and CreateContext size) as the offset and length of the data area. Reported-by: Yang Chaoming <lometsj(a)live.com> Cc: stable(a)vger.kernel.org Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Signed-off-by: ZhaoLong Wang <wangzhaolong1(a)huawei.com> --- fs/smb/server/smb2misc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/smb/server/smb2misc.c b/fs/smb/server/smb2misc.c index 23bd3d1209df..03dded29a980 100644 --- a/fs/smb/server/smb2misc.c +++ b/fs/smb/server/smb2misc.c @@ -106,16 +106,25 @@ static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, break; case SMB2_CREATE: { + unsigned short int name_off = + le16_to_cpu(((struct smb2_create_req *)hdr)->NameOffset); + unsigned short int name_len = + le16_to_cpu(((struct smb2_create_req *)hdr)->NameLength); + if (((struct smb2_create_req *)hdr)->CreateContextsLength) { *off = le32_to_cpu(((struct smb2_create_req *) hdr)->CreateContextsOffset); *len = le32_to_cpu(((struct smb2_create_req *) hdr)->CreateContextsLength); - break; + if (!name_len) + break; + + if (name_off + name_len < (u64)*off + *len) + break; } - *off = le16_to_cpu(((struct smb2_create_req *)hdr)->NameOffset); - *len = le16_to_cpu(((struct smb2_create_req *)hdr)->NameLength); + *off = name_off; + *len = name_len; break; } case SMB2_QUERY_INFO: -- 2.34.3
2 1
0 0
[PATCH OLK-5.10] ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
by ZhaoLong Wang 29 Jan '24

29 Jan '24
From: Namjae Jeon <linkinjeon(a)kernel.org> mainline inclusion from mainline-v6.7-rc8 commit d10c77873ba1e9e6b91905018e29e196fd5f863d category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8YD63 CVE: CVE-2024-22705 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- If ->NameOffset/Length is bigger than ->CreateContextsOffset/Length, ksmbd_check_message doesn't validate request buffer it correctly. So slab-out-of-bounds warning from calling smb_strndup_from_utf16() in smb2_open() could happen. If ->NameLength is non-zero, Set the larger of the two sums (Name and CreateContext size) as the offset and length of the data area. Reported-by: Yang Chaoming <lometsj(a)live.com> Cc: stable(a)vger.kernel.org Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Signed-off-by: ZhaoLong Wang <wangzhaolong1(a)huawei.com> --- fs/ksmbd/smb2misc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/ksmbd/smb2misc.c b/fs/ksmbd/smb2misc.c index 41170a593acf..caf6739530e1 100644 --- a/fs/ksmbd/smb2misc.c +++ b/fs/ksmbd/smb2misc.c @@ -107,16 +107,25 @@ static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, break; case SMB2_CREATE: { + unsigned short int name_off = + le16_to_cpu(((struct smb2_create_req *)hdr)->NameOffset); + unsigned short int name_len = + le16_to_cpu(((struct smb2_create_req *)hdr)->NameLength); + if (((struct smb2_create_req *)hdr)->CreateContextsLength) { *off = le32_to_cpu(((struct smb2_create_req *) hdr)->CreateContextsOffset); *len = le32_to_cpu(((struct smb2_create_req *) hdr)->CreateContextsLength); - break; + if (!name_len) + break; + + if (name_off + name_len < (u64)*off + *len) + break; } - *off = le16_to_cpu(((struct smb2_create_req *)hdr)->NameOffset); - *len = le16_to_cpu(((struct smb2_create_req *)hdr)->NameLength); + *off = name_off; + *len = name_len; break; } case SMB2_QUERY_INFO: -- 2.34.3
2 1
0 0
[openeuler:OLK-6.6] BUILD REGRESSION 6e92c8c8b1bba4cc649d5fb8f7e784aa47ec19c6
by kernel test robot 29 Jan '24

29 Jan '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6 branch HEAD: 6e92c8c8b1bba4cc649d5fb8f7e784aa47ec19c6 !3774 [OLK-6.6] sched/fair: Scan cluster before scanning LLC in wake-up path Error/Warning ids grouped by kconfigs: clang_recent_errors |-- arm64-randconfig-001-20240128 | |-- kernel-sched-core.c:error:call-to-undeclared-function-init_auto_affinity-ISO-C99-and-later-do-not-support-implicit-function-declarations | |-- kernel-sched-core.c:error:call-to-undeclared-function-tg_update_affinity_domains-ISO-C99-and-later-do-not-support-implicit-function-declarations | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- arm64-randconfig-002-20240128 | |-- kernel-sched-core.c:error:call-to-undeclared-function-init_auto_affinity-ISO-C99-and-later-do-not-support-implicit-function-declarations | |-- kernel-sched-core.c:error:call-to-undeclared-function-tg_update_affinity_domains-ISO-C99-and-later-do-not-support-implicit-function-declarations | |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial |-- arm64-randconfig-003-20240128 | |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead | |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags | |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task | |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead | `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial `-- arm64-randconfig-004-20240128 |-- kernel-sched-core.c:error:call-to-undeclared-function-init_auto_affinity-ISO-C99-and-later-do-not-support-implicit-function-declarations |-- kernel-sched-core.c:error:call-to-undeclared-function-tg_update_affinity_domains-ISO-C99-and-later-do-not-support-implicit-function-declarations |-- mm-madvise.c:warning:no-previous-prototype-for-function-force_swapin_vma |-- mm-memblock.c:warning:expecting-prototype-for-memblock_alloc_internal().-Prototype-was-for-__memblock_alloc_internal()-instead |-- mm-memblock.c:warning:no-previous-prototype-for-function-memblock_alloc_range_nid_flags |-- mm-oom_kill.c:warning:Function-parameter-or-member-oc-not-described-in-oom_next_task |-- mm-oom_kill.c:warning:Function-parameter-or-member-points-not-described-in-oom_next_task |-- mm-oom_kill.c:warning:Function-parameter-or-member-task-not-described-in-oom_next_task |-- mm-oom_kill.c:warning:expecting-prototype-for-We-choose-the-task-in-low().-Prototype-was-for-oom_next_task()-instead `-- mm-vmalloc.c:warning:Function-parameter-or-member-pgoff-not-described-in-remap_vmalloc_hugepage_range_partial elapsed time: 2188m configs tested: 4 configs skipped: 65 tested configs: arm64 randconfig-001-20240128 clang arm64 randconfig-002-20240128 clang arm64 randconfig-003-20240128 clang arm64 randconfig-004-20240128 clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1320
  • 1321
  • 1322
  • 1323
  • 1324
  • 1325
  • 1326
  • ...
  • 1866
  • Older →

HyperKitty Powered by HyperKitty