tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: e74aedc9df70f84e50a280478b93d98b3a622bc3 commit: dae7bed961c55d9837eada7f98f34f1adb0e9d21 [2430/2430] tcp_comp: add sysctl for enable/disable compression config: x86_64-randconfig-121-20241114 (https://download.01.org/0day-ci/archive/20241119/202411191914.zP0QrT48-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241119/202411191914.zP0QrT48-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202411191914.zP0QrT48-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
net/ipv4/sysctl_net_ipv4.c:477:50: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
net/ipv4/sysctl_net_ipv4.c:477:50: sparse: expected void * net/ipv4/sysctl_net_ipv4.c:477:50: sparse: got void [noderef] __user *buffer
net/ipv4/sysctl_net_ipv4.c:621:35: sparse: sparse: incorrect type in initializer (incompatible argument 3 (different address spaces)) @@ expected int ( [usertype] *proc_handler )( ... ) @@ got int ( * )( ... ) @@
net/ipv4/sysctl_net_ipv4.c:621:35: sparse: expected int ( [usertype] *proc_handler )( ... ) net/ipv4/sysctl_net_ipv4.c:621:35: sparse: got int ( * )( ... )
vim +477 net/ipv4/sysctl_net_ipv4.c
467 468 #if IS_ENABLED(CONFIG_TCP_COMP) 469 static int proc_tcp_compression_ports(struct ctl_table *table, int write, 470 void __user *buffer, size_t *lenp, 471 loff_t *ppos) 472 { 473 unsigned long *bitmap = *(unsigned long **)table->data; 474 unsigned long bitmap_len = table->maxlen; 475 int ret; 476
477 ret = proc_do_large_bitmap(table, write, buffer, lenp, ppos);
478 if (write && ret == 0) { 479 if (bitmap_empty(bitmap, bitmap_len)) { 480 if (static_key_enabled(&tcp_have_comp)) 481 static_branch_disable(&tcp_have_comp); 482 } else { 483 if (!static_key_enabled(&tcp_have_comp)) 484 static_branch_enable(&tcp_have_comp); 485 } 486 } 487 488 return ret; 489 } 490 #endif 491 492 static struct ctl_table ipv4_table[] = { 493 { 494 .procname = "tcp_max_orphans", 495 .data = &sysctl_tcp_max_orphans, 496 .maxlen = sizeof(int), 497 .mode = 0644, 498 .proc_handler = proc_dointvec 499 }, 500 { 501 .procname = "inet_peer_threshold", 502 .data = &inet_peer_threshold, 503 .maxlen = sizeof(int), 504 .mode = 0644, 505 .proc_handler = proc_dointvec 506 }, 507 { 508 .procname = "inet_peer_minttl", 509 .data = &inet_peer_minttl, 510 .maxlen = sizeof(int), 511 .mode = 0644, 512 .proc_handler = proc_dointvec_jiffies, 513 }, 514 { 515 .procname = "inet_peer_maxttl", 516 .data = &inet_peer_maxttl, 517 .maxlen = sizeof(int), 518 .mode = 0644, 519 .proc_handler = proc_dointvec_jiffies, 520 }, 521 { 522 .procname = "tcp_mem", 523 .maxlen = sizeof(sysctl_tcp_mem), 524 .data = &sysctl_tcp_mem, 525 .mode = 0644, 526 .proc_handler = proc_doulongvec_minmax, 527 }, 528 { 529 .procname = "tcp_low_latency", 530 .data = &sysctl_tcp_low_latency, 531 .maxlen = sizeof(int), 532 .mode = 0644, 533 .proc_handler = proc_dointvec 534 }, 535 #ifdef CONFIG_NETLABEL 536 { 537 .procname = "cipso_cache_enable", 538 .data = &cipso_v4_cache_enabled, 539 .maxlen = sizeof(int), 540 .mode = 0644, 541 .proc_handler = proc_dointvec, 542 }, 543 { 544 .procname = "cipso_cache_bucket_size", 545 .data = &cipso_v4_cache_bucketsize, 546 .maxlen = sizeof(int), 547 .mode = 0644, 548 .proc_handler = proc_dointvec, 549 }, 550 { 551 .procname = "cipso_rbm_optfmt", 552 .data = &cipso_v4_rbm_optfmt, 553 .maxlen = sizeof(int), 554 .mode = 0644, 555 .proc_handler = proc_dointvec, 556 }, 557 { 558 .procname = "cipso_rbm_strictvalid", 559 .data = &cipso_v4_rbm_strictvalid, 560 .maxlen = sizeof(int), 561 .mode = 0644, 562 .proc_handler = proc_dointvec, 563 }, 564 #endif /* CONFIG_NETLABEL */ 565 { 566 .procname = "tcp_available_ulp", 567 .maxlen = TCP_ULP_BUF_MAX, 568 .mode = 0444, 569 .proc_handler = proc_tcp_available_ulp, 570 }, 571 { 572 .procname = "icmp_msgs_per_sec", 573 .data = &sysctl_icmp_msgs_per_sec, 574 .maxlen = sizeof(int), 575 .mode = 0644, 576 .proc_handler = proc_dointvec_minmax, 577 .extra1 = SYSCTL_ZERO, 578 }, 579 { 580 .procname = "icmp_msgs_burst", 581 .data = &sysctl_icmp_msgs_burst, 582 .maxlen = sizeof(int), 583 .mode = 0644, 584 .proc_handler = proc_dointvec_minmax, 585 .extra1 = SYSCTL_ZERO, 586 }, 587 { 588 .procname = "udp_mem", 589 .data = &sysctl_udp_mem, 590 .maxlen = sizeof(sysctl_udp_mem), 591 .mode = 0644, 592 .proc_handler = proc_doulongvec_minmax, 593 }, 594 { 595 .procname = "fib_sync_mem", 596 .data = &sysctl_fib_sync_mem, 597 .maxlen = sizeof(sysctl_fib_sync_mem), 598 .mode = 0644, 599 .proc_handler = proc_douintvec_minmax, 600 .extra1 = &sysctl_fib_sync_mem_min, 601 .extra2 = &sysctl_fib_sync_mem_max, 602 }, 603 { 604 .procname = "tcp_rx_skb_cache", 605 .data = &tcp_rx_skb_cache_key.key, 606 .mode = 0644, 607 .proc_handler = proc_do_static_key, 608 }, 609 { 610 .procname = "tcp_tx_skb_cache", 611 .data = &tcp_tx_skb_cache_key.key, 612 .mode = 0644, 613 .proc_handler = proc_do_static_key, 614 }, 615 #if IS_ENABLED(CONFIG_TCP_COMP) 616 { 617 .procname = "tcp_compression_ports", 618 .data = &sysctl_tcp_compression_ports, 619 .maxlen = 65536, 620 .mode = 0644,
621 .proc_handler = proc_tcp_compression_ports,
622 }, 623 #endif 624 { } 625 }; 626