lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109280713.W0cGPnJH-lkp@intel.com>
Date:   Tue, 28 Sep 2021 07:23:20 +0800
From:   kernel test robot <lkp@...el.com>
To:     Cong Wang <cong.wang@...edance.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [congwang:bpf2 3/4] net/core/skmsg.c:482:38: warning: passing
 argument 1 of 'sk_psock_get_checked' discards 'const' qualifier from pointer
 target type

tree:   https://github.com/congwang/linux.git bpf2
head:   ec3836e59604af89a5f07045ea7a3a1f60ff2cf4
commit: 5417d71bbf55e2a31ceba94cc0d1e4912354c67e [3/4] net: implement ->sock_is_readable for UDP and AF_UNIX
config: openrisc-buildonly-randconfig-r006-20210927 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/congwang/linux/commit/5417d71bbf55e2a31ceba94cc0d1e4912354c67e
        git remote add congwang https://github.com/congwang/linux.git
        git fetch --no-tags congwang bpf2
        git checkout 5417d71bbf55e2a31ceba94cc0d1e4912354c67e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   net/core/skmsg.c: In function 'sk_msg_is_readable':
>> net/core/skmsg.c:482:38: warning: passing argument 1 of 'sk_psock_get_checked' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     482 |         psock = sk_psock_get_checked(sk);
         |                                      ^~
   In file included from net/core/skmsg.c:4:
   include/linux/skmsg.h:456:66: note: expected 'struct sock *' but argument is of type 'const struct sock *'
     456 | static inline struct sk_psock *sk_psock_get_checked(struct sock *sk)
         |                                                     ~~~~~~~~~~~~~^~
>> net/core/skmsg.c:486:22: warning: passing argument 1 of 'sk_psock_put' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     486 |         sk_psock_put(sk, psock);
         |                      ^~
   In file included from net/core/skmsg.c:4:
   include/linux/skmsg.h:478:46: note: expected 'struct sock *' but argument is of type 'const struct sock *'
     478 | static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock)
         |                                 ~~~~~~~~~~~~~^~


vim +482 net/core/skmsg.c

   476	
   477	bool sk_msg_is_readable(const struct sock *sk)
   478	{
   479		struct sk_psock *psock;
   480		bool empty = true;
   481	
 > 482		psock = sk_psock_get_checked(sk);
   483		if (IS_ERR_OR_NULL(psock))
   484			return false;
   485		empty = sk_psock_queue_empty(psock);
 > 486		sk_psock_put(sk, psock);
   487		return !empty;
   488	}
   489	EXPORT_SYMBOL_GPL(skmsg_is_readable);
   490	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (35133 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ