tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 660a8fc17efc471c239b7a5a2de6bd9519fe9db3 commit: c31dcf6c5ab41f07da38d3f270987807735ec93e [2170/10500] tcp_comp: implement tcp compression config: loongarch-randconfig-r113-20240701 compiler: loongarch64-linux-gcc (GCC) 13.2.0 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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202407010557.qDFEOeJ2-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
net/ipv4/sysctl_net_ipv4.c:481:50: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
net/ipv4/sysctl_net_ipv4.c:481:50: sparse: expected void * net/ipv4/sysctl_net_ipv4.c:481:50: sparse: got void [noderef] __user *buffer
net/ipv4/sysctl_net_ipv4.c:620: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:620:35: sparse: expected int ( [usertype] *proc_handler )( ... ) net/ipv4/sysctl_net_ipv4.c:620:35: sparse: got int ( * )( ... ) net/ipv4/sysctl_net_ipv4.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/slab.h): include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
vim +481 net/ipv4/sysctl_net_ipv4.c
471 472 #if IS_ENABLED(CONFIG_TCP_COMP) 473 static int proc_tcp_compression_ports(struct ctl_table *table, int write, 474 void __user *buffer, size_t *lenp, 475 loff_t *ppos) 476 { 477 unsigned long *bitmap = *(unsigned long **)table->data; 478 unsigned long bitmap_len = table->maxlen; 479 int ret; 480
481 ret = proc_do_large_bitmap(table, write, buffer, lenp, ppos);
482 if (write && ret == 0) { 483 if (bitmap_empty(bitmap, bitmap_len)) { 484 if (static_key_enabled(&tcp_have_comp)) 485 static_branch_disable(&tcp_have_comp); 486 } else { 487 if (!static_key_enabled(&tcp_have_comp)) 488 static_branch_enable(&tcp_have_comp); 489 } 490 } 491 492 return ret; 493 } 494 #endif 495 496 static struct ctl_table ipv4_table[] = { 497 { 498 .procname = "tcp_max_orphans", 499 .data = &sysctl_tcp_max_orphans, 500 .maxlen = sizeof(int), 501 .mode = 0644, 502 .proc_handler = proc_dointvec 503 }, 504 { 505 .procname = "inet_peer_threshold", 506 .data = &inet_peer_threshold, 507 .maxlen = sizeof(int), 508 .mode = 0644, 509 .proc_handler = proc_dointvec 510 }, 511 { 512 .procname = "inet_peer_minttl", 513 .data = &inet_peer_minttl, 514 .maxlen = sizeof(int), 515 .mode = 0644, 516 .proc_handler = proc_dointvec_jiffies, 517 }, 518 { 519 .procname = "inet_peer_maxttl", 520 .data = &inet_peer_maxttl, 521 .maxlen = sizeof(int), 522 .mode = 0644, 523 .proc_handler = proc_dointvec_jiffies, 524 }, 525 { 526 .procname = "tcp_mem", 527 .maxlen = sizeof(sysctl_tcp_mem), 528 .data = &sysctl_tcp_mem, 529 .mode = 0644, 530 .proc_handler = proc_doulongvec_minmax, 531 }, 532 { 533 .procname = "tcp_low_latency", 534 .data = &sysctl_tcp_low_latency, 535 .maxlen = sizeof(int), 536 .mode = 0644, 537 .proc_handler = proc_dointvec 538 }, 539 #ifdef CONFIG_NETLABEL 540 { 541 .procname = "cipso_cache_enable", 542 .data = &cipso_v4_cache_enabled, 543 .maxlen = sizeof(int), 544 .mode = 0644, 545 .proc_handler = proc_dointvec, 546 }, 547 { 548 .procname = "cipso_cache_bucket_size", 549 .data = &cipso_v4_cache_bucketsize, 550 .maxlen = sizeof(int), 551 .mode = 0644, 552 .proc_handler = proc_dointvec, 553 }, 554 { 555 .procname = "cipso_rbm_optfmt", 556 .data = &cipso_v4_rbm_optfmt, 557 .maxlen = sizeof(int), 558 .mode = 0644, 559 .proc_handler = proc_dointvec, 560 }, 561 { 562 .procname = "cipso_rbm_strictvalid", 563 .data = &cipso_v4_rbm_strictvalid, 564 .maxlen = sizeof(int), 565 .mode = 0644, 566 .proc_handler = proc_dointvec, 567 }, 568 #endif /* CONFIG_NETLABEL */ 569 { 570 .procname = "tcp_available_ulp", 571 .maxlen = TCP_ULP_BUF_MAX, 572 .mode = 0444, 573 .proc_handler = proc_tcp_available_ulp, 574 }, 575 { 576 .procname = "icmp_msgs_per_sec", 577 .data = &sysctl_icmp_msgs_per_sec, 578 .maxlen = sizeof(int), 579 .mode = 0644, 580 .proc_handler = proc_dointvec_minmax, 581 .extra1 = SYSCTL_ZERO, 582 }, 583 { 584 .procname = "icmp_msgs_burst", 585 .data = &sysctl_icmp_msgs_burst, 586 .maxlen = sizeof(int), 587 .mode = 0644, 588 .proc_handler = proc_dointvec_minmax, 589 .extra1 = SYSCTL_ZERO, 590 }, 591 { 592 .procname = "udp_mem", 593 .data = &sysctl_udp_mem, 594 .maxlen = sizeof(sysctl_udp_mem), 595 .mode = 0644, 596 .proc_handler = proc_doulongvec_minmax, 597 }, 598 { 599 .procname = "fib_sync_mem", 600 .data = &sysctl_fib_sync_mem, 601 .maxlen = sizeof(sysctl_fib_sync_mem), 602 .mode = 0644, 603 .proc_handler = proc_douintvec_minmax, 604 .extra1 = &sysctl_fib_sync_mem_min, 605 .extra2 = &sysctl_fib_sync_mem_max, 606 }, 607 { 608 .procname = "local_port_allocation", 609 .data = &sysctl_local_port_allocation, 610 .maxlen = sizeof(int), 611 .mode = 0644, 612 .proc_handler = proc_dointvec, 613 }, 614 #if IS_ENABLED(CONFIG_TCP_COMP) 615 { 616 .procname = "tcp_compression_ports", 617 .data = &sysctl_tcp_compression_ports, 618 .maxlen = 65536, 619 .mode = 0644,
620 .proc_handler = proc_tcp_compression_ports,
621 }, 622 { 623 .procname = "tcp_compression_local", 624 .data = &sysctl_tcp_compression_local, 625 .maxlen = sizeof(int), 626 .mode = 0644, 627 .proc_handler = proc_dointvec_minmax, 628 .extra1 = SYSCTL_ZERO, 629 .extra2 = SYSCTL_ONE, 630 }, 631 #endif 632 { } 633 }; 634