tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wab/hfsplus head: 157ca109a1d4c5f8e0c85b636f134b83ba5433fa commit: 157ca109a1d4c5f8e0c85b636f134b83ba5433fa [2/2] hfsplus: Fix out-of-bounds warnings in __hfsplus_setxattr config: um-allmodconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=157ca109a1d4c5f8e0c85b636f134b83ba5433fa git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git git fetch --no-tags gustavoars-linux testing/wab/hfsplus git checkout 157ca109a1d4c5f8e0c85b636f134b83ba5433fa # save the attached .config to linux build tree make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> All errors (new ones prefixed by >>): cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs] fs/hfsplus/catalog.c: In function 'hfsplus_cat_build_record': >> fs/hfsplus/catalog.c:127:10: error: 'struct hfsplus_cat_folder' has no >> member named 'user_info' 127 | folder->user_info.frFlags = cpu_to_be16(0x5000); | ^~ >> fs/hfsplus/catalog.c:145:9: error: 'struct hfsplus_cat_file' has no member >> named 'user_info' 145 | file->user_info.fdType = | ^~ fs/hfsplus/catalog.c:147:9: error: 'struct hfsplus_cat_file' has no member named 'user_info' 147 | file->user_info.fdCreator = | ^~ fs/hfsplus/catalog.c:150:9: error: 'struct hfsplus_cat_file' has no member named 'user_info' 150 | file->user_info.fdType = | ^~ fs/hfsplus/catalog.c:152:9: error: 'struct hfsplus_cat_file' has no member named 'user_info' 152 | file->user_info.fdCreator = | ^~ fs/hfsplus/catalog.c:161:8: error: 'struct hfsplus_cat_file' has no member named 'user_info' 161 | file->user_info.fdType = | ^~ fs/hfsplus/catalog.c:163:8: error: 'struct hfsplus_cat_file' has no member named 'user_info' 163 | file->user_info.fdCreator = | ^~ fs/hfsplus/catalog.c:165:8: error: 'struct hfsplus_cat_file' has no member named 'user_info' 165 | file->user_info.fdFlags = | ^~ -- cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs] fs/hfsplus/dir.c: In function 'hfsplus_lookup': >> fs/hfsplus/dir.c:76:17: error: 'struct hfsplus_cat_file' has no member named >> 'user_info' 76 | if (entry.file.user_info.fdType == | ^ fs/hfsplus/dir.c:78:15: error: 'struct hfsplus_cat_file' has no member named 'user_info' 78 | entry.file.user_info.fdCreator == | ^ vim +127 fs/hfsplus/catalog.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 104 2753cc281c9a0e Anton Salikhmetov 2010-12-16 105 static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, 2753cc281c9a0e Anton Salikhmetov 2010-12-16 106 u32 cnid, struct inode *inode) ^1da177e4c3f41 Linus Torvalds 2005-04-16 107 { dd73a01a30d729 Christoph Hellwig 2010-10-01 108 struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); dd73a01a30d729 Christoph Hellwig 2010-10-01 109 ^1da177e4c3f41 Linus Torvalds 2005-04-16 110 if (S_ISDIR(inode->i_mode)) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 111 struct hfsplus_cat_folder *folder; ^1da177e4c3f41 Linus Torvalds 2005-04-16 112 ^1da177e4c3f41 Linus Torvalds 2005-04-16 113 folder = &entry->folder; ^1da177e4c3f41 Linus Torvalds 2005-04-16 114 memset(folder, 0, sizeof(*folder)); ^1da177e4c3f41 Linus Torvalds 2005-04-16 115 folder->type = cpu_to_be16(HFSPLUS_FOLDER); d7d673a591701f Sergei Antonov 2014-03-10 116 if (test_bit(HFSPLUS_SB_HFSX, &sbi->flags)) d7d673a591701f Sergei Antonov 2014-03-10 117 folder->flags |= cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT); ^1da177e4c3f41 Linus Torvalds 2005-04-16 118 folder->id = cpu_to_be32(inode->i_ino); 6af502de224c37 Christoph Hellwig 2010-10-01 119 HFSPLUS_I(inode)->create_date = 9a4cad95c93380 Roman Zippel 2006-01-18 120 folder->create_date = 9a4cad95c93380 Roman Zippel 2006-01-18 121 folder->content_mod_date = 9a4cad95c93380 Roman Zippel 2006-01-18 122 folder->attribute_mod_date = 9a4cad95c93380 Roman Zippel 2006-01-18 123 folder->access_date = hfsp_now2mt(); 90e616905a4231 Christoph Hellwig 2010-10-14 124 hfsplus_cat_set_perms(inode, &folder->permissions); dd73a01a30d729 Christoph Hellwig 2010-10-01 125 if (inode == sbi->hidden_dir) ^1da177e4c3f41 Linus Torvalds 2005-04-16 126 /* invisible and namelocked */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 @127 folder->user_info.frFlags = cpu_to_be16(0x5000); ^1da177e4c3f41 Linus Torvalds 2005-04-16 128 return sizeof(*folder); ^1da177e4c3f41 Linus Torvalds 2005-04-16 129 } else { ^1da177e4c3f41 Linus Torvalds 2005-04-16 130 struct hfsplus_cat_file *file; ^1da177e4c3f41 Linus Torvalds 2005-04-16 131 ^1da177e4c3f41 Linus Torvalds 2005-04-16 132 file = &entry->file; ^1da177e4c3f41 Linus Torvalds 2005-04-16 133 memset(file, 0, sizeof(*file)); ^1da177e4c3f41 Linus Torvalds 2005-04-16 134 file->type = cpu_to_be16(HFSPLUS_FILE); ^1da177e4c3f41 Linus Torvalds 2005-04-16 135 file->flags = cpu_to_be16(HFSPLUS_FILE_THREAD_EXISTS); ^1da177e4c3f41 Linus Torvalds 2005-04-16 136 file->id = cpu_to_be32(cnid); 6af502de224c37 Christoph Hellwig 2010-10-01 137 HFSPLUS_I(inode)->create_date = 9a4cad95c93380 Roman Zippel 2006-01-18 138 file->create_date = 9a4cad95c93380 Roman Zippel 2006-01-18 139 file->content_mod_date = 9a4cad95c93380 Roman Zippel 2006-01-18 140 file->attribute_mod_date = 9a4cad95c93380 Roman Zippel 2006-01-18 141 file->access_date = hfsp_now2mt(); ^1da177e4c3f41 Linus Torvalds 2005-04-16 142 if (cnid == inode->i_ino) { 90e616905a4231 Christoph Hellwig 2010-10-14 143 hfsplus_cat_set_perms(inode, &file->permissions); 6b192832daae6d Roman Zippel 2006-01-18 144 if (S_ISLNK(inode->i_mode)) { 2753cc281c9a0e Anton Salikhmetov 2010-12-16 @145 file->user_info.fdType = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 146 cpu_to_be32(HFSP_SYMLINK_TYPE); 2753cc281c9a0e Anton Salikhmetov 2010-12-16 147 file->user_info.fdCreator = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 148 cpu_to_be32(HFSP_SYMLINK_CREATOR); 6b192832daae6d Roman Zippel 2006-01-18 149 } else { 2753cc281c9a0e Anton Salikhmetov 2010-12-16 150 file->user_info.fdType = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 151 cpu_to_be32(sbi->type); 2753cc281c9a0e Anton Salikhmetov 2010-12-16 152 file->user_info.fdCreator = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 153 cpu_to_be32(sbi->creator); 6b192832daae6d Roman Zippel 2006-01-18 154 } 2753cc281c9a0e Anton Salikhmetov 2010-12-16 155 if (HFSPLUS_FLG_IMMUTABLE & 2753cc281c9a0e Anton Salikhmetov 2010-12-16 156 (file->permissions.rootflags | 2753cc281c9a0e Anton Salikhmetov 2010-12-16 157 file->permissions.userflags)) 2753cc281c9a0e Anton Salikhmetov 2010-12-16 158 file->flags |= 2753cc281c9a0e Anton Salikhmetov 2010-12-16 159 cpu_to_be16(HFSPLUS_FILE_LOCKED); ^1da177e4c3f41 Linus Torvalds 2005-04-16 160 } else { 2753cc281c9a0e Anton Salikhmetov 2010-12-16 161 file->user_info.fdType = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 162 cpu_to_be32(HFSP_HARDLINK_TYPE); 2753cc281c9a0e Anton Salikhmetov 2010-12-16 163 file->user_info.fdCreator = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 164 cpu_to_be32(HFSP_HFSPLUS_CREATOR); 2753cc281c9a0e Anton Salikhmetov 2010-12-16 165 file->user_info.fdFlags = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 166 cpu_to_be16(0x100); 2753cc281c9a0e Anton Salikhmetov 2010-12-16 167 file->create_date = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 168 HFSPLUS_I(sbi->hidden_dir)->create_date; 2753cc281c9a0e Anton Salikhmetov 2010-12-16 169 file->permissions.dev = 2753cc281c9a0e Anton Salikhmetov 2010-12-16 170 cpu_to_be32(HFSPLUS_I(inode)->linkid); ^1da177e4c3f41 Linus Torvalds 2005-04-16 171 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 172 return sizeof(*file); ^1da177e4c3f41 Linus Torvalds 2005-04-16 173 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 174 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 175 :::::: The code at line 127 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds <[email protected]> :::::: CC: Linus Torvalds <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip

