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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202402040416.3h4bSPKV-lkp@intel.com>
Date: Sun, 4 Feb 2024 04:20:46 +0800
From: kernel test robot <lkp@...el.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	netdev@...r.kernel.org, Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: Re: [PATCH v1 net-next 02/16] af_unix: Allocate struct unix_edge for
 each inflight AF_UNIX fd.

Hi Kuniyuki,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Kuniyuki-Iwashima/af_unix-Add-struct-unix_vertex-in-struct-unix_sock/20240203-110847
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240203030058.60750-3-kuniyu%40amazon.com
patch subject: [PATCH v1 net-next 02/16] af_unix: Allocate struct unix_edge for each inflight AF_UNIX fd.
config: i386-buildonly-randconfig-004-20240203 (https://download.01.org/0day-ci/archive/20240204/202402040416.3h4bSPKV-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240204/202402040416.3h4bSPKV-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402040416.3h4bSPKV-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/core/scm.c:90:8: error: no member named 'edges' in 'struct scm_fp_list'
      90 |                 fpl->edges = NULL;
         |                 ~~~  ^
   net/core/scm.c:381:12: error: no member named 'edges' in 'struct scm_fp_list'
     381 |                 new_fpl->edges = NULL;
         |                 ~~~~~~~  ^
   2 errors generated.


vim +90 net/core/scm.c

    66	
    67	static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
    68	{
    69		int *fdp = (int*)CMSG_DATA(cmsg);
    70		struct scm_fp_list *fpl = *fplp;
    71		struct file **fpp;
    72		int i, num;
    73	
    74		num = (cmsg->cmsg_len - sizeof(struct cmsghdr))/sizeof(int);
    75	
    76		if (num <= 0)
    77			return 0;
    78	
    79		if (num > SCM_MAX_FD)
    80			return -EINVAL;
    81	
    82		if (!fpl)
    83		{
    84			fpl = kmalloc(sizeof(struct scm_fp_list), GFP_KERNEL_ACCOUNT);
    85			if (!fpl)
    86				return -ENOMEM;
    87			*fplp = fpl;
    88			fpl->count = 0;
    89			fpl->count_unix = 0;
  > 90			fpl->edges = NULL;
    91			fpl->max = SCM_MAX_FD;
    92			fpl->user = NULL;
    93		}
    94		fpp = &fpl->fp[fpl->count];
    95	
    96		if (fpl->count + num > fpl->max)
    97			return -EINVAL;
    98	
    99		/*
   100		 *	Verify the descriptors and increment the usage count.
   101		 */
   102	
   103		for (i=0; i< num; i++)
   104		{
   105			int fd = fdp[i];
   106			struct file *file;
   107	
   108			if (fd < 0 || !(file = fget_raw(fd)))
   109				return -EBADF;
   110			/* don't allow io_uring files */
   111			if (io_is_uring_fops(file)) {
   112				fput(file);
   113				return -EINVAL;
   114			}
   115			if (unix_get_socket(file))
   116				fpl->count_unix++;
   117	
   118			*fpp++ = file;
   119			fpl->count++;
   120		}
   121	
   122		if (!fpl->user)
   123			fpl->user = get_uid(current_user());
   124	
   125		return num;
   126	}
   127	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ