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-next>] [day] [month] [year] [list]
Message-ID: <202209301029.GH8uhPky-lkp@intel.com>
Date:   Fri, 30 Sep 2022 10:57:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Günther Noack <gnoack3000@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Mickaël Salaün <mic@...ikod.net>
Subject: [mic:next 4/9] fs/open.c:191: undefined reference to
 `security_file_truncate'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git next
head:   054fdc359167ae7c17a5fb47c0edbf5cb4b737b0
commit: 0052f28b7cba97cefa48623ef087d1c1cc06078f [4/9] security: create file_truncate hook from path_truncate hook
config: x86_64-rhel-8.3-func
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git/commit/?id=0052f28b7cba97cefa48623ef087d1c1cc06078f
        git remote add mic git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git
        git fetch --no-tags mic next
        git checkout 0052f28b7cba97cefa48623ef087d1c1cc06078f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   ld: fs/open.o: in function `do_sys_ftruncate':
>> fs/open.c:191: undefined reference to `security_file_truncate'
   ld: fs/namei.o: in function `handle_truncate':
>> fs/namei.c:3214: undefined reference to `security_file_truncate'


vim +191 fs/open.c

   155	
   156	long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
   157	{
   158		struct inode *inode;
   159		struct dentry *dentry;
   160		struct fd f;
   161		int error;
   162	
   163		error = -EINVAL;
   164		if (length < 0)
   165			goto out;
   166		error = -EBADF;
   167		f = fdget(fd);
   168		if (!f.file)
   169			goto out;
   170	
   171		/* explicitly opened as large or we are on 64-bit box */
   172		if (f.file->f_flags & O_LARGEFILE)
   173			small = 0;
   174	
   175		dentry = f.file->f_path.dentry;
   176		inode = dentry->d_inode;
   177		error = -EINVAL;
   178		if (!S_ISREG(inode->i_mode) || !(f.file->f_mode & FMODE_WRITE))
   179			goto out_putf;
   180	
   181		error = -EINVAL;
   182		/* Cannot ftruncate over 2^31 bytes without large file support */
   183		if (small && length > MAX_NON_LFS)
   184			goto out_putf;
   185	
   186		error = -EPERM;
   187		/* Check IS_APPEND on real upper inode */
   188		if (IS_APPEND(file_inode(f.file)))
   189			goto out_putf;
   190		sb_start_write(inode->i_sb);
 > 191		error = security_file_truncate(f.file);
   192		if (!error)
   193			error = do_truncate(file_mnt_user_ns(f.file), dentry, length,
   194					    ATTR_MTIME | ATTR_CTIME, f.file);
   195		sb_end_write(inode->i_sb);
   196	out_putf:
   197		fdput(f);
   198	out:
   199		return error;
   200	}
   201	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (167472 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ