mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* net/core/filter.c:11773:17: warning: no previous declaration for 'bpf_sock_addr_set_sun_path'
@ 2023-11-02  4:14 kernel test robot
  2023-11-02 10:10 ` Philip Li
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-11-02  4:14 UTC (permalink / raw)
  To: Daan De Meyer; +Cc: oe-kbuild-all, linux-kernel, Martin KaFai Lau

Hi Daan,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   babe393974de0351c0e6cca50f5f84edaf8d7fa1
commit: 53e380d21441909b12b6e0782b77187ae4b971c4 bpf: Add bpf_sock_addr_set_sun_path() to allow writing unix sockaddr from bpf
date:   3 weeks ago
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20231102/202311021257.nD9pHYSn-lkp@intel.com/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/20231102/202311021257.nD9pHYSn-lkp@intel.com/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/202311021257.nD9pHYSn-lkp@intel.com/

All warnings (new ones prefixed by >>):

   net/core/filter.c:11747: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:11760: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:11773:17: warning: no previous declaration for 'bpf_sock_addr_set_sun_path' [-Wmissing-declarations]
    __bpf_kfunc int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:11877: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_sun_path +11773 net/core/filter.c

 11772	
 11773	__bpf_kfunc int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern,
 11774						   const u8 *sun_path, u32 sun_path__sz)
 11775	{
 11776		struct sockaddr_un *un;
 11777	
 11778		if (sa_kern->sk->sk_family != AF_UNIX)
 11779			return -EINVAL;
 11780	
 11781		/* We do not allow changing the address to unnamed or larger than the
 11782		 * maximum allowed address size for a unix sockaddr.
 11783		 */
 11784		if (sun_path__sz == 0 || sun_path__sz > UNIX_PATH_MAX)
 11785			return -EINVAL;
 11786	
 11787		un = (struct sockaddr_un *)sa_kern->uaddr;
 11788		memcpy(un->sun_path, sun_path, sun_path__sz);
 11789		sa_kern->uaddrlen = offsetof(struct sockaddr_un, sun_path) + sun_path__sz;
 11790	
 11791		return 0;
 11792	}
 11793	__diag_pop();
 11794	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: net/core/filter.c:11773:17: warning: no previous declaration for 'bpf_sock_addr_set_sun_path'
  2023-11-02  4:14 net/core/filter.c:11773:17: warning: no previous declaration for 'bpf_sock_addr_set_sun_path' kernel test robot
@ 2023-11-02 10:10 ` Philip Li
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Li @ 2023-11-02 10:10 UTC (permalink / raw)
  To: kernel test robot
  Cc: Daan De Meyer, oe-kbuild-all, linux-kernel, Martin KaFai Lau

On Thu, Nov 02, 2023 at 12:14:31PM +0800, kernel test robot wrote:
> Hi Daan,
> 
> FYI, the error/warning still remains.

sorry for the false report, kindly ignore this. We will resolve the problem
in short time.

> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   babe393974de0351c0e6cca50f5f84edaf8d7fa1
> commit: 53e380d21441909b12b6e0782b77187ae4b971c4 bpf: Add bpf_sock_addr_set_sun_path() to allow writing unix sockaddr from bpf
> date:   3 weeks ago
> config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20231102/202311021257.nD9pHYSn-lkp@intel.com/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/20231102/202311021257.nD9pHYSn-lkp@intel.com/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/202311021257.nD9pHYSn-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    net/core/filter.c:11747: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:11760: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:11773:17: warning: no previous declaration for 'bpf_sock_addr_set_sun_path' [-Wmissing-declarations]
>     __bpf_kfunc int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern,
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>    net/core/filter.c:11877: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_sun_path +11773 net/core/filter.c
> 
>  11772	
>  11773	__bpf_kfunc int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern,
>  11774						   const u8 *sun_path, u32 sun_path__sz)
>  11775	{
>  11776		struct sockaddr_un *un;
>  11777	
>  11778		if (sa_kern->sk->sk_family != AF_UNIX)
>  11779			return -EINVAL;
>  11780	
>  11781		/* We do not allow changing the address to unnamed or larger than the
>  11782		 * maximum allowed address size for a unix sockaddr.
>  11783		 */
>  11784		if (sun_path__sz == 0 || sun_path__sz > UNIX_PATH_MAX)
>  11785			return -EINVAL;
>  11786	
>  11787		un = (struct sockaddr_un *)sa_kern->uaddr;
>  11788		memcpy(un->sun_path, sun_path, sun_path__sz);
>  11789		sa_kern->uaddrlen = offsetof(struct sockaddr_un, sun_path) + sun_path__sz;
>  11790	
>  11791		return 0;
>  11792	}
>  11793	__diag_pop();
>  11794	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-02 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-02  4:14 net/core/filter.c:11773:17: warning: no previous declaration for 'bpf_sock_addr_set_sun_path' kernel test robot
2023-11-02 10:10 ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®