Re: [PATCH bpf-next v5 3/9] bpf: Add bpf_sock_addr_set_unix_addr() to allow writing unix sockaddr from bpf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Daan-De-Meyer/selftests-bpf-Add-missing-section-name-tests-for-getpeername-getsockname/20230922-032515
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20230921120913.566702-4-daan.j.demeyer%40gmail.com
patch subject: [PATCH bpf-next v5 3/9] bpf: Add bpf_sock_addr_set_unix_addr() to allow writing unix sockaddr from bpf
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20230923/202309231339.L2O0CrMU-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230923/202309231339.L2O0CrMU-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309231339.L2O0CrMU-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   net/core/filter.c:11731:17: warning: no previous declaration for 'bpf_dynptr_from_skb' [-Wmissing-declarations]
    __bpf_kfunc int bpf_dynptr_from_skb(struct sk_buff *skb, u64 flags,
                    ^~~~~~~~~~~~~~~~~~~
   net/core/filter.c:11744:17: warning: no previous declaration for 'bpf_dynptr_from_xdp' [-Wmissing-declarations]
    __bpf_kfunc int bpf_dynptr_from_xdp(struct xdp_buff *xdp, u64 flags,
                    ^~~~~~~~~~~~~~~~~~~
>> net/core/filter.c:11757:17: warning: no previous declaration for 'bpf_sock_addr_set_unix_addr' [-Wmissing-declarations]
    __bpf_kfunc int bpf_sock_addr_set_unix_addr(struct bpf_sock_addr_kern *sa_kern,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:11860:17: warning: no previous declaration for 'bpf_sock_destroy' [-Wmissing-declarations]
    __bpf_kfunc int bpf_sock_destroy(struct sock_common *sock)
                    ^~~~~~~~~~~~~~~~


vim +/bpf_sock_addr_set_unix_addr +11757 net/core/filter.c

 11756	
 11757	__bpf_kfunc int bpf_sock_addr_set_unix_addr(struct bpf_sock_addr_kern *sa_kern,
 11758						    const u8 *addr, u32 addrlen__sz)
 11759	{
 11760		struct sockaddr *sa = sa_kern->uaddr;
 11761		struct sockaddr_un *un;
 11762	
 11763		if (sa_kern->sk->sk_family != AF_UNIX)
 11764			return -EINVAL;
 11765	
 11766		/* We do not allow changing the address of unnamed unix sockets. */
 11767		if (addrlen__sz == 0 || addrlen__sz > UNIX_PATH_MAX)
 11768			return -EINVAL;
 11769	
 11770		un = (struct sockaddr_un *)sa;
 11771		memcpy(un->sun_path, addr, addrlen__sz);
 11772		sa_kern->uaddrlen = offsetof(struct sockaddr_un, sun_path) + addrlen__sz;
 11773	
 11774		return 0;
 11775	}
 11776	__diag_pop();
 11777	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux