[ammarfaizi2-block:dhowells/linux-fs/netfs-maple 38/39] fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof ((1UL << 18) - offset) *' (aka 'unsigned long *'))
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple
head: b995bc7182f60aa2b4d8930a7446f10dfbcebcc2
commit: 8573fb679d751564f10601acf56465d777132b03 [38/39] netfs: Perform content encryption
config: hexagon-randconfig-r034-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150936.6AhJ1Nev-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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
# https://github.com/ammarfaizi2/linux-block/commit/8573fb679d751564f10601a...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple
git checkout 8573fb679d751564f10601acf56465d777132b03
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/netfs/
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 >>):
>> fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof ((1UL << 18) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
seg = min(len, PAGE_SIZE - offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +76 fs/netfs/crypto.c
45
46 /*
47 * Populate a scatterlist from folios in an xarray.
48 */
49 static int netfs_xarray_to_sglist(struct xarray *xa, loff_t pos, size_t len,
50 struct scatterlist *sg, unsigned int n_sg)
51 {
52 struct scatterlist *p = sg;
53 struct folio *folio = NULL;
54 size_t seg, offset, skip = 0;
55 loff_t start = pos;
56 pgoff_t index = start >> PAGE_SHIFT;
57 int j;
58
59 XA_STATE(xas, xa, index);
60
61 sg_init_table(sg, n_sg);
62
63 rcu_read_lock();
64
65 xas_for_each(&xas, folio, ULONG_MAX) {
66 if (xas_retry(&xas, folio))
67 continue;
68 if (WARN_ON(xa_is_value(folio)) || WARN_ON(folio_test_hugetlb(folio)))
69 break;
70 for (j = (folio_index(folio) < index) ? index - folio_index(folio) : 0;
71 j < folio_nr_pages(folio); j++
72 ) {
73 struct page *subpage = folio_file_page(folio, j);
74
75 offset = (pos + skip) & ~PAGE_MASK;
> 76 seg = min(len, PAGE_SIZE - offset);
77
78 sg_set_page(p++, subpage, seg, offset);
79
80 len -= seg;
81 skip += seg;
82 if (len == 0)
83 break;
84 }
85 if (len == 0)
86 break;
87 }
88
89 rcu_read_unlock();
90 if (len > 0) {
91 kdebug("*** Insufficient source (%zx)", len);
92 //WARN_ON(len > 0);
93 return -EIO;
94 }
95
96 sg_mark_end(p - 1);
97 return p - sg;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v1 2/2] serial: sh-sci: Switch to use dev_err_probe_ptr()
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on usb/usb-testing linux/master linus/master v5.17-rc4 next-20220214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/driver-core-add-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220215/202202150928.sqyjprfB-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/810910d324cc80b092207d043651de696...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/driver-core-add-a-wrapper-to-device-probe-log-helper-to-return-pointer/20220214-223425
git checkout 810910d324cc80b092207d043651de696d293cbd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/tty/serial/sh-sci.c: In function 'sci_parse_dt':
>> drivers/tty/serial/sh-sci.c:3205:24: error: too few arguments to function 'dev_err_probe_ptr'
3205 | return dev_err_probe_ptr(&pdev->dev, PTR_ERR(rstc), "failed to get reset ctrl\n");
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/node.h:18,
from include/linux/cpu.h:17,
from include/linux/cpufreq.h:12,
from drivers/tty/serial/sh-sci.c:23:
include/linux/device.h:988:7: note: declared here
988 | void *dev_err_probe_ptr(const struct device *dev, int err, const char *fmt, va_list args)
| ^~~~~~~~~~~~~~~~~
vim +/dev_err_probe_ptr +3205 drivers/tty/serial/sh-sci.c
3187
3188 static struct plat_sci_port *sci_parse_dt(struct platform_device *pdev,
3189 unsigned int *dev_id)
3190 {
3191 struct device_node *np = pdev->dev.of_node;
3192 struct reset_control *rstc;
3193 struct plat_sci_port *p;
3194 struct sci_port *sp;
3195 const void *data;
3196 int id, ret;
3197
3198 if (!IS_ENABLED(CONFIG_OF) || !np)
3199 return ERR_PTR(-EINVAL);
3200
3201 data = of_device_get_match_data(&pdev->dev);
3202
3203 rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
3204 if (IS_ERR(rstc))
> 3205 return dev_err_probe_ptr(&pdev->dev, PTR_ERR(rstc), "failed to get reset ctrl\n");
3206
3207 ret = reset_control_deassert(rstc);
3208 if (ret) {
3209 dev_err(&pdev->dev, "failed to deassert reset %d\n", ret);
3210 return ERR_PTR(ret);
3211 }
3212
3213 ret = devm_add_action_or_reset(&pdev->dev, sci_reset_control_assert, rstc);
3214 if (ret) {
3215 dev_err(&pdev->dev, "failed to register assert devm action, %d\n",
3216 ret);
3217 return ERR_PTR(ret);
3218 }
3219
3220 p = devm_kzalloc(&pdev->dev, sizeof(struct plat_sci_port), GFP_KERNEL);
3221 if (!p)
3222 return ERR_PTR(-ENOMEM);
3223
3224 /* Get the line number from the aliases node. */
3225 id = of_alias_get_id(np, "serial");
3226 if (id < 0 && ~sci_ports_in_use)
3227 id = ffz(sci_ports_in_use);
3228 if (id < 0) {
3229 dev_err(&pdev->dev, "failed to get alias id (%d)\n", id);
3230 return ERR_PTR(-EINVAL);
3231 }
3232 if (id >= ARRAY_SIZE(sci_ports)) {
3233 dev_err(&pdev->dev, "serial%d out of range\n", id);
3234 return ERR_PTR(-EINVAL);
3235 }
3236
3237 sp = &sci_ports[id];
3238 *dev_id = id;
3239
3240 p->type = SCI_OF_TYPE(data);
3241 p->regtype = SCI_OF_REGTYPE(data);
3242
3243 sp->has_rtscts = of_property_read_bool(np, "uart-has-rtscts");
3244
3245 return p;
3246 }
3247
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[hch-misc:swiotlb-init-cleanup 8/11] arch/x86/include/asm/gart.h:56:2: error: void function 'gart_iommu_hole_init' should not return a value
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git swiotlb-init-cleanup
head: b0a4b60e2b05556a265441d07464d016e160ed50
commit: 12f2fe176ef701bc27dd2bf8061a5f178b547024 [8/11] x86: remove the IOMMU table infrastructure
config: i386-randconfig-a002-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150933.VKTRTbyq-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc swiotlb-init-cleanup
git checkout 12f2fe176ef701bc27dd2bf8061a5f178b547024
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/kernel/setup.c:37:
>> arch/x86/include/asm/gart.h:56:2: error: void function 'gart_iommu_hole_init' should not return a value [-Wreturn-type]
return -ENODEV;
^ ~~~~~~~
1 error generated.
--
In file included from arch/x86/kernel/pci-dma.c:15:
>> arch/x86/include/asm/gart.h:56:2: error: void function 'gart_iommu_hole_init' should not return a value [-Wreturn-type]
return -ENODEV;
^ ~~~~~~~
>> arch/x86/kernel/pci-dma.c:86:2: error: implicit declaration of function 'detect_intel_iommu' [-Werror,-Wimplicit-function-declaration]
detect_intel_iommu();
^
>> arch/x86/kernel/pci-dma.c:196:5: error: redefinition of 'pci_xen_swiotlb_init_late'
int pci_xen_swiotlb_init_late(void)
^
arch/x86/include/asm/xen/swiotlb-xen.h:8:19: note: previous definition is here
static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; }
^
3 errors generated.
vim +/gart_iommu_hole_init +56 arch/x86/include/asm/gart.h
1d9b16d1690fe5 Joerg Roedel 2008-11-27 47
1d9b16d1690fe5 Joerg Roedel 2008-11-27 48 static inline void early_gart_iommu_check(void)
1d9b16d1690fe5 Joerg Roedel 2008-11-27 49 {
1d9b16d1690fe5 Joerg Roedel 2008-11-27 50 }
1d9b16d1690fe5 Joerg Roedel 2008-11-27 51 static inline void gart_parse_options(char *options)
1d9b16d1690fe5 Joerg Roedel 2008-11-27 52 {
1d9b16d1690fe5 Joerg Roedel 2008-11-27 53 }
12f2fe176ef701 Christoph Hellwig 2022-02-14 54 static inline void gart_iommu_hole_init(void)
1d9b16d1690fe5 Joerg Roedel 2008-11-27 55 {
480125ba49ba62 Konrad Rzeszutek Wilk 2010-08-26 @56 return -ENODEV;
1d9b16d1690fe5 Joerg Roedel 2008-11-27 57 }
1d9b16d1690fe5 Joerg Roedel 2008-11-27 58 #endif
1d9b16d1690fe5 Joerg Roedel 2008-11-27 59
:::::: The code at line 56 was first introduced by commit
:::::: 480125ba49ba62be93beea37770f266846e077ab x86, iommu: Make all IOMMU's detection routines return a value.
:::::: TO: Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
:::::: CC: H. Peter Anvin <hpa(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[ammarfaizi2-block:dhowells/linux-fs/netfs-maple 28/39] fs/netfs/write_helper.c:665:32: error: no member named 'cache' in 'struct netfs_i_context'
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple
head: b995bc7182f60aa2b4d8930a7446f10dfbcebcc2
commit: f923e34430afd434b984d1d604f3ec3898f63ad8 [28/39] netfs: Implement buffered writes through netfs_file_write_iter()
config: hexagon-randconfig-r034-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150844.OSL410Oz-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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
# https://github.com/ammarfaizi2/linux-block/commit/f923e34430afd434b984d1d...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple
git checkout f923e34430afd434b984d1d604f3ec3898f63ad8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/netfs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> fs/netfs/write_helper.c:28:26: warning: comparison of distinct pointer types ('typeof ((1UL << 18) - offset) *' (aka 'unsigned long *') and 'typeof (size) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
unsigned int psize = min(PAGE_SIZE - offset, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
fs/netfs/write_helper.c:125:18: warning: comparison of distinct pointer types ('typeof (target->from) *' (aka 'unsigned long long *') and 'typeof (folio_pos(folio) + offset) *' (aka 'long long *')) [-Wcompare-distinct-pointer-types]
target->from = min(target->from, folio_pos(folio) + offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
fs/netfs/write_helper.c:126:18: warning: comparison of distinct pointer types ('typeof (target->to) *' (aka 'unsigned long long *') and 'typeof (folio_pos(folio) + offset + len) *' (aka 'long long *')) [-Wcompare-distinct-pointer-types]
target->to = max(target->to, folio_pos(folio) + offset + len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:52:19: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
>> fs/netfs/write_helper.c:665:32: error: no member named 'cache' in 'struct netfs_i_context'
fscache_update_cookie(ctx->cache, NULL, &pos);
~~~ ^
3 warnings and 1 error generated.
vim +665 fs/netfs/write_helper.c
507
508 /*
509 * Write data into a prereserved region of the pagecache attached to a netfs
510 * inode.
511 */
512 static ssize_t netfs_perform_write(struct kiocb *iocb, struct iov_iter *iter,
513 enum netfs_write_type write_type)
514 {
515 struct netfs_dirty_region *spare_region = NULL;
516 struct file *file = iocb->ki_filp;
517 struct netfs_i_context *ctx = netfs_i_context(file_inode(file));
518 struct folio *folio;
519 enum netfs_handle_nonuptodate nupt;
520 ssize_t written = 0, ret;
521 loff_t i_size, pos = iocb->ki_pos;
522 bool always_fill = false;
523 bool locked = false;
524
525 MA_STATE(mas, &ctx->dirty_regions, pos / PAGE_SIZE,
526 (pos + iov_iter_count(iter) - 1) / PAGE_SIZE);
527
528 ret = ctx->ops->validate_for_write(file_inode(file), file);
529 if (ret < 0)
530 return ret;
531
532 do {
533 size_t plen;
534 size_t offset; /* Offset into pagecache folio */
535 size_t bytes; /* Bytes to write to folio */
536 size_t copied; /* Bytes copied from user */
537
538 folio = netfs_grab_folio_for_write(file->f_mapping,
539 pos / PAGE_SIZE,
540 iov_iter_count(iter));
541 if (!folio) {
542 ret = -ENOMEM;
543 goto out;
544 }
545
546 plen = folio_size(folio);
547 offset = pos - folio_file_pos(folio);
548 bytes = min_t(size_t, plen - offset, iov_iter_count(iter));
549 locked = true;
550
551 if (!folio_test_uptodate(folio)) {
552 folio_unlock(folio); /* Avoid deadlocking fault-in */
553 locked = false;
554 }
555
556 /* Bring in the user page that we will copy from _first_.
557 * Otherwise there's a nasty deadlock on copying from the same
558 * page as we're writing to, without it being marked
559 * up-to-date.
560 *
561 * Not only is this an optimisation, but it is also required to
562 * check that the address is actually valid, when atomic
563 * usercopies are used, below.
564 */
565 if (unlikely(fault_in_iov_iter_readable(iter, bytes))) {
566 ret = -EFAULT;
567 goto error_folio;
568 }
569
570 if (fatal_signal_pending(current)) {
571 ret = -EINTR;
572 goto error_folio;
573 }
574
575 if (!locked) {
576 ret = folio_lock_killable(folio);
577 if (ret < 0)
578 goto error_folio;
579 }
580
581 redo_prefetch:
582 /* See if we need to prefetch the area we're going to modify.
583 * We need to do this before we get a lock on the folio in case
584 * there's more than one writer competing for the same cache
585 * block.
586 */
587 nupt = netfs_handle_nonuptodate_folio(ctx, file, folio,
588 offset, bytes, always_fill);
589 _debug("nupt %u", nupt);
590 switch (nupt) {
591 case NETFS_JUST_PREFETCH:
592 ret = netfs_prefetch_for_write(file, folio, bytes);
593 if (ret < 0) {
594 _debug("prefetch = %zd", ret);
595 goto error_folio;
596 }
597 nupt = NETFS_FOLIO_IS_UPTODATE;
598 fallthrough;
599 case NETFS_FOLIO_IS_UPTODATE:
600 break;
601 case NETFS_MODIFY_AND_CLEAR:
602 zero_user_segment(&folio->page, 0, offset);
603 break;
604 case NETFS_WHOLE_FOLIO_MODIFY:
605 break;
606 }
607
608 /* Preallocate the space we need in the dirty region list. */
609 ret = mas_expected_entries(&mas, 1);
610 if (ret < 0)
611 goto error_folio;
612
613 if (!spare_region) {
614 spare_region = netfs_alloc_dirty_region();
615 if (IS_ERR(spare_region)) {
616 ret = PTR_ERR(spare_region);
617 spare_region = NULL;
618 goto error_folio;
619 }
620 }
621
622 if (mapping_writably_mapped(folio_file_mapping(folio)))
623 flush_dcache_folio(folio);
624 copied = copy_folio_from_iter_atomic(folio, offset, bytes, iter);
625 flush_dcache_folio(folio);
626
627 /* Deal with a (partially) failed copy */
628 if (!folio_test_uptodate(folio)) {
629 if (copied == 0) {
630 ret = -EFAULT;
631 goto error_folio;
632 }
633 if (copied < bytes) {
634 iov_iter_revert(iter, copied);
635 always_fill = true;
636 goto redo_prefetch;
637 }
638 switch (nupt) {
639 case NETFS_JUST_PREFETCH:
640 case NETFS_FOLIO_IS_UPTODATE:
641 /* We have the folio locked, so it really ought
642 * to be uptodate.
643 */
644 WARN(true, "Locked folio %lx became non-uptodate\n",
645 folio_index(folio));
646 ret = -EIO;
647 goto error_folio;
648 case NETFS_MODIFY_AND_CLEAR:
649 zero_user_segment(&folio->page, offset + copied, plen);
650 fallthrough;
651 case NETFS_WHOLE_FOLIO_MODIFY:
652 folio_mark_uptodate(folio);
653 break;
654 }
655 }
656
657 /* Update the inode size if we moved the EOF marker */
658 pos += copied;
659 i_size = i_size_read(file_inode(file));
660 if (pos > i_size) {
661 if (ctx->ops->update_i_size) {
662 ctx->ops->update_i_size(file, pos);
663 } else {
664 i_size_write(file_inode(file), pos);
> 665 fscache_update_cookie(ctx->cache, NULL, &pos);
666 }
667 }
668
669 netfs_commit_folio(ctx, file, &spare_region, &mas,
670 folio, offset, copied, write_type);
671
672 folio_mark_dirty(folio);
673 folio_unlock(folio);
674 folio_put(folio);
675 folio = NULL;
676
677 cond_resched();
678
679 written += copied;
680
681 balance_dirty_pages_ratelimited(file->f_mapping);
682 } while (iov_iter_count(iter));
683
684 out:
685 if (likely(written)) {
686 if (write_type == NETFS_ORDINARY_WRITE)
687 netfs_commit_region(ctx, &mas, iocb->ki_pos, written);
688
689 iocb->ki_pos += written;
690
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH net] ipv6: per-netns exclusive flowlabel checks
by kernel test robot
Hi Willem,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/Willem-de-Bruijn/ipv6-per-netns-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 86006f996346e8a5a1ea80637ec949ceeea4ecbc
config: arm-netwinder_defconfig (https://download.01.org/0day-ci/archive/20220215/202202150740.uPYefwp7-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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
# https://github.com/0day-ci/linux/commit/5d3936d3544b4cdd6d63c896d158d4975...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Willem-de-Bruijn/ipv6-per-netns-exclusive-flowlabel-checks/20220215-042330
git checkout 5d3936d3544b4cdd6d63c896d158d4975a4822c3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/mptcp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:313:10: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:313:39: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:314:10: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:314:38: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:302:13: note: expanded from macro '__unqual_scalar_typeof'
_Generic((x), \
^
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
In file included from net/mptcp/protocol.c:16:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:402:60: error: invalid operands to binary expression ('long' and 'void')
if (static_branch_unlikely(&ipv6_flowlabel_exclusive.key) &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
8 errors generated.
--
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:313:10: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:313:39: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:314:10: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:314:38: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:346:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:334:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:326:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:302:13: note: expanded from macro '__unqual_scalar_typeof'
_Generic((x), \
^
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:403:30: error: no member named 'ipv6' in 'struct net'
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
~~~~~~~~~~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
In file included from net/mptcp/options.c:11:
In file included from include/net/tcp.h:32:
In file included from include/net/inet_hashtables.h:27:
In file included from include/net/route.h:24:
In file included from include/net/inetpeer.h:16:
>> include/net/ipv6.h:402:60: error: invalid operands to binary expression ('long' and 'void')
if (static_branch_unlikely(&ipv6_flowlabel_exclusive.key) &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
net/mptcp/options.c:552:21: warning: parameter 'remaining' set but not used [-Wunused-but-set-parameter]
unsigned int remaining,
^
1 warning and 8 errors generated.
vim +403 include/net/ipv6.h
397
398 extern struct static_key_false_deferred ipv6_flowlabel_exclusive;
399 static inline struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk,
400 __be32 label)
401 {
> 402 if (static_branch_unlikely(&ipv6_flowlabel_exclusive.key) &&
> 403 READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
404 return __fl6_sock_lookup(sk, label) ? : ERR_PTR(-ENOENT);
405
406 return NULL;
407 }
408
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week