tree:
https://android.googlesource.com/kernel/common android-4.19
head: 7bab03039e64ed6c26be90530e08978eab3be578
commit: 040942fc50b20325bb56737c32b303268bb6f35c [1/4] ANDROID: Initial commit of
Incremental FS
config: arm-randconfig-r001-20210430 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.19
git checkout 040942fc50b20325bb56737c32b303268bb6f35c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from fs/incfs/format.c:5:
In file included from include/linux/fs.h:6:
In file included from include/linux/wait_bit.h:8:
In file included from include/linux/wait.h:7:
In file included from include/linux/list.h:9:
In file included from include/linux/kernel.h:11:
In file included from include/linux/bitops.h:19:
In file included from arch/arm/include/asm/bitops.h:268:
In file included from include/asm-generic/bitops/le.h:6:
In file included from arch/arm/include/uapi/asm/byteorder.h:22:
In file included from include/linux/byteorder/little_endian.h:11:
include/linux/byteorder/generic.h:195:16: warning: comparison of integers of different
signs: 'int' and 'size_t' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < len; i++)
~ ^ ~~~
include/linux/byteorder/generic.h:203:16: warning: comparison of integers of different
signs: 'int' and 'size_t' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < len; i++)
~ ^ ~~~
In file included from fs/incfs/format.c:5:
In file included from include/linux/fs.h:6:
In file included from include/linux/wait_bit.h:8:
In file included from include/linux/wait.h:9:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:81:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
include/linux/thread_info.h:141:29: warning: comparison of integers of different signs:
'int' and 'size_t' (aka 'unsigned int') [-Wsign-compare]
if (unlikely(sz >= 0 && sz < bytes)) {
~~ ^ ~~~~~
include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
In file included from fs/incfs/format.c:5:
In file included from include/linux/fs.h:8:
In file included from include/linux/dcache.h:7:
In file included from include/linux/rculist.h:11:
In file included from include/linux/rcupdate.h:44:
In file included from include/linux/cpumask.h:12:
include/linux/bitmap.h:359:36: warning: comparison of integers of different signs:
'int' and 'unsigned int' [-Wsign-compare]
return find_first_bit(src, nbits) == nbits;
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
include/linux/bitmap.h:367:41: warning: comparison of integers of different signs:
'int' and 'unsigned int' [-Wsign-compare]
return find_first_zero_bit(src, nbits) == nbits;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
In file included from fs/incfs/format.c:5:
In file included from include/linux/fs.h:237:
In file included from include/linux/quota.h:40:
In file included from include/linux/percpu_counter.h:16:
In file included from include/linux/gfp.h:6:
include/linux/mmzone.h:987:44: warning: comparison of integers of different signs:
'int' and 'enum zone_type' [-Wsign-compare]
if (likely(!nodes && zonelist_zone_idx(z) <= highest_zoneidx))
~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
include/linux/compiler.h:76:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from fs/incfs/format.c:9:
In file included from include/linux/mm.h:26:
In file included from include/linux/page_ref.h:7:
include/linux/page-flags.h:163:21: warning: comparison of integers of different signs:
'const unsigned long' and 'long' [-Wsign-compare]
return page->flags == PAGE_POISON_PATTERN;
~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
In file included from fs/incfs/format.c:15:
fs/incfs/compat.h:11:22: warning: redefinition of typedef '__poll_t' is a C11
feature [-Wtypedef-redefinition]
typedef unsigned int __poll_t;
^
include/uapi/linux/types.h:52:28: note: previous definition is here
typedef unsigned __bitwise __poll_t;
^
fs/incfs/format.c:130:10: warning: comparison of integers of different signs:
'ssize_t' (aka 'int') and 'size_t' (aka 'unsigned int')
[-Wsign-compare]
if (res != count)
~~~ ^ ~~~~~
fs/incfs/format.c:534:13: warning: comparison of integers of different signs:
'int' and 'const size_t' (aka 'const unsigned int')
[-Wsign-compare]
if (result < bytes_to_read)
~~~~~~ ^ ~~~~~~~~~~~~~
fs/incfs/format.c:555:17: warning: comparison of integers of different signs:
'ssize_t' (aka 'int') and 'unsigned int' [-Wsign-compare]
if (bytes_read < sizeof(fh))
~~~~~~~~~~ ^ ~~~~~~~~~~
> fs/incfs/format.c:617:5: warning: format specifies type
'long' but the argument has type 'size_t' (aka 'unsigned int')
[-Wformat]
md_record_size);
^~~~~~~~~~~~~~
include/linux/printk.h:311:17: note: expanded from macro 'pr_warn'
#define pr_warn pr_warning
^
include/linux/printk.h:310:37: note: expanded from macro 'pr_warning'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
fs/incfs/format.c:607:17: warning: comparison of integers of different signs:
'ssize_t' (aka 'int') and 'unsigned int' [-Wsign-compare]
if (bytes_read < sizeof(*md_hdr))
~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
fs/incfs/format.c:621:17: warning: comparison of integers of different signs:
'ssize_t' (aka 'int') and 'size_t' (aka 'unsigned int')
[-Wsign-compare]
if (bytes_read < md_record_size) {
~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
14 warnings generated.
/usr/bin/as: unrecognized option '-EL'
clang-13: error: assembler command failed with exit code 1 (use -v to see invocation)
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for WIRELESS_EXT
Depends on NET && WIRELESS
Selected by
- GKI_LEGACY_WEXT_ALLCONFIG
WARNING: unmet direct dependencies detected for WEXT_CORE
Depends on NET && WIRELESS && (CFG80211_WEXT || WIRELESS_EXT
Selected by
- GKI_LEGACY_WEXT_ALLCONFIG
WARNING: unmet direct dependencies detected for WEXT_PROC
Depends on NET && WIRELESS && PROC_FS && WEXT_CORE
Selected by
- GKI_LEGACY_WEXT_ALLCONFIG
WARNING: unmet direct dependencies detected for WEXT_PRIV
Depends on NET && WIRELESS
Selected by
- GKI_LEGACY_WEXT_ALLCONFIG
WARNING: unmet direct dependencies detected for WEXT_SPY
Depends on NET && WIRELESS
Selected by
- GKI_LEGACY_WEXT_ALLCONFIG
vim +617 fs/incfs/format.c
578
579 /*
580 * Read through metadata records from the backing file one by one
581 * and call provided metadata handlers.
582 */
583 int incfs_read_next_metadata_record(struct backing_file_context *bfc,
584 struct metadata_handler *handler)
585 {
586 const ssize_t max_md_size = INCFS_MAX_METADATA_RECORD_SIZE;
587 ssize_t bytes_read = 0;
588 size_t md_record_size = 0;
589 loff_t next_record = 0;
590 loff_t prev_record = 0;
591 int res = 0;
592 struct incfs_md_header *md_hdr = NULL;
593
594 if (!bfc || !handler)
595 return -EFAULT;
596
597 LOCK_REQUIRED(bfc->bc_mutex);
598
599 if (handler->md_record_offset == 0)
600 return -EPERM;
601
602 memset(&handler->md_buffer, 0, max_md_size);
603 bytes_read = incfs_kread(bfc->bc_file, &handler->md_buffer,
604 max_md_size, handler->md_record_offset);
605 if (bytes_read < 0)
606 return bytes_read;
607 if (bytes_read < sizeof(*md_hdr))
608 return -EBADMSG;
609
610 md_hdr = &handler->md_buffer.md_header;
611 next_record = le64_to_cpu(md_hdr->h_next_md_offset);
612 prev_record = le64_to_cpu(md_hdr->h_prev_md_offset);
613 md_record_size = le16_to_cpu(md_hdr->h_record_size);
614
615 if (md_record_size > max_md_size) {
616 pr_warn("incfs: The record is too large. Size: %ld",
617 md_record_size);
618 return -EBADMSG;
619 }
620
621 if (bytes_read < md_record_size) {
622 pr_warn("incfs: The record hasn't been fully read.");
623 return -EBADMSG;
624 }
625
626 if (next_record <= handler->md_record_offset && next_record != 0) {
627 pr_warn("incfs: Next record (%lld) points back in file.",
628 next_record);
629 return -EBADMSG;
630 }
631
632 if (prev_record != handler->md_prev_record_offset) {
633 pr_warn("incfs: Metadata chain has been corrupted.");
634 return -EBADMSG;
635 }
636
637 if (le32_to_cpu(md_hdr->h_record_crc) != calc_md_crc(md_hdr)) {
638 pr_warn("incfs: Metadata CRC mismatch.");
639 return -EBADMSG;
640 }
641
642 switch (md_hdr->h_md_entry_type) {
643 case INCFS_MD_NONE:
644 break;
645 case INCFS_MD_BLOCK_MAP:
646 if (handler->handle_blockmap)
647 res = handler->handle_blockmap(
648 &handler->md_buffer.blockmap, handler);
649 break;
650 case INCFS_MD_FILE_ATTR:
651 if (handler->handle_file_attr)
652 res = handler->handle_file_attr(
653 &handler->md_buffer.file_attr, handler);
654 break;
655 case INCFS_MD_SIGNATURE:
656 if (handler->handle_signature)
657 res = handler->handle_signature(
658 &handler->md_buffer.signature, handler);
659 break;
660 default:
661 res = -ENOTSUPP;
662 break;
663 }
664
665 if (!res) {
666 if (next_record == 0) {
667 /*
668 * Zero offset for the next record means that the last
669 * metadata record has just been processed.
670 */
671 bfc->bc_last_md_record_offset =
672 handler->md_record_offset;
673 }
674 handler->md_prev_record_offset = handler->md_record_offset;
675 handler->md_record_offset = next_record;
676 }
677 return res;
678 }
679
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org