Offering: HULK
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB7V02
--------------------------------
If the xfs reserve block related ioctl takes a large input value, the input
reserved size is still assigned to mp->m_resblks in xfs_reserve_blocks()
even if the requested size is larger than the total free size in the
filesystem. This is because the subsequent xfs_mod_fdblocks() will handle
the adjustment.
However, in the current code, xfs_mod_fdblocks() calculates mp->m_resblks
- mp->m_resblks_avail and casts the result to a long long type, while both
mp->m_resblks and mp->m_resblks_avail are of type unsigned long long. If
the difference between these two values is very large, and the most
significant bit (MSB) is set to 1 (indicating a large unsigned value), the
result of the cast becomes a large negative value. This causes
mp->m_fdblocks to be updated to a very large value. As a result, xfs will
incorrectly determine that there is always free space during foreground
writes, while background writebacks may fail due to lack of space.
Modify the relevant data types in xfs_mod_fdblocks() to address this issue.
Fixes: 0d485ada404b ("xfs: use generic percpu counters for free block counter")
Signed-off-by: Zizhi Wo <wozizhi(a)huawei.com>
---
fs/xfs/xfs_mount.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 04b347fe1b59..4983fe7eadf0 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1259,8 +1259,8 @@ xfs_mod_fdblocks(
bool rsvd)
{
int64_t lcounter;
- long long res_used;
s32 batch;
+ uint64_t res_used;
uint64_t set_aside;
if (delta > 0) {
@@ -1274,7 +1274,7 @@ xfs_mod_fdblocks(
}
spin_lock(&mp->m_sb_lock);
- res_used = (long long)(mp->m_resblks - mp->m_resblks_avail);
+ res_used = mp->m_resblks - mp->m_resblks_avail;
if (res_used > delta) {
mp->m_resblks_avail += delta;
--
2.46.1
Hi Daniel,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: b5504db0db8375a77340b5bb54c17cfb75d3c754
commit: 99dec2700cf36e58d3fdb295e1fed7e9d04a916c [1298/1298] x86/speculation: Add Gather Data Sampling mitigation
config: x86_64-buildonly-randconfig-006-20241118 (https://download.01.org/0day-ci/archive/20241202/202412020932.YwT4OkOM-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412020932.YwT4OkOM-lkp@…)
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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412020932.YwT4OkOM-lkp@intel.com/
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
arch/x86/kernel/cpu/bugs.c:2407:9: warning: no previous prototype for 'cpu_show_gds' [-Wmissing-prototypes]
2407 | ssize_t cpu_show_gds(struct device *dev, struct device_attribute *attr, char *buf)
| ^~~~~~~~~~~~
In file included from arch/x86/include/asm/processor.h:21,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_bits.h:22,
from include/linux/thread_info.h:14,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:81,
from include/linux/rcupdate.h:40,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/utsname.h:6,
from arch/x86/kernel/cpu/bugs.c:12:
In function 'wrmsrl',
inlined from 'update_gds_msr' at arch/x86/kernel/cpu/bugs.c:689:2:
>> arch/x86/include/asm/msr.h:272:9: warning: 'mcu_ctrl' may be used uninitialized [-Wmaybe-uninitialized]
272 | native_write_msr(msr, (u32)(val & 0xffffffffULL), (u32)(val >> 32));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/bugs.c: In function 'update_gds_msr':
arch/x86/kernel/cpu/bugs.c:667:13: note: 'mcu_ctrl' was declared here
667 | u64 mcu_ctrl;
| ^~~~~~~~
vim +/mcu_ctrl +272 arch/x86/include/asm/msr.h
be7baf80a69964 include/asm-x86/msr.h Thomas Gleixner 2007-10-23 266
be7baf80a69964 include/asm-x86/msr.h Thomas Gleixner 2007-10-23 267 #define rdmsrl(msr, val) \
abb0ade013507c include/asm-x86/msr.h Joe Perches 2008-03-23 268 ((val) = native_read_msr((msr)))
be7baf80a69964 include/asm-x86/msr.h Thomas Gleixner 2007-10-23 269
5d07c2cc1962fa arch/x86/include/asm/msr.h Borislav Petkov 2016-11-02 270 static inline void wrmsrl(unsigned int msr, u64 val)
47edb65178cb70 arch/x86/include/asm/msr.h Andy Lutomirski 2015-07-23 271 {
679bcea857d728 arch/x86/include/asm/msr.h Borislav Petkov 2015-11-23 @272 native_write_msr(msr, (u32)(val & 0xffffffffULL), (u32)(val >> 32));
47edb65178cb70 arch/x86/include/asm/msr.h Andy Lutomirski 2015-07-23 273 }
be7baf80a69964 include/asm-x86/msr.h Thomas Gleixner 2007-10-23 274
:::::: The code at line 272 was first introduced by commit
:::::: 679bcea857d72868e3431dde3a0e158bf0ed9119 x86/MSR: Chop off lower 32-bit value
:::::: TO: Borislav Petkov <bp(a)suse.de>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Andreas,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: b5504db0db8375a77340b5bb54c17cfb75d3c754
commit: 484798bc8218ce6a0f8269675897b870a12c49e2 [1298/1298] gfs2: gfs2_walk_metadata fix
config: x86_64-buildonly-randconfig-006-20241118 (https://download.01.org/0day-ci/archive/20241202/202412020544.XfPLNgzY-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412020544.XfPLNgzY-lkp@…)
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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412020544.XfPLNgzY-lkp@intel.com/
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
fs/gfs2/bmap.c: In function 'gfs2_iomap_alloc':
fs/gfs2/bmap.c:748:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
748 | if (n == 0)
| ^
fs/gfs2/bmap.c:751:17: note: here
751 | case ALLOC_GROW_DEPTH:
| ^~~~
fs/gfs2/bmap.c:759:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
759 | if (n == 0)
| ^
fs/gfs2/bmap.c:762:17: note: here
762 | case ALLOC_DATA:
| ^~~~
fs/gfs2/bmap.c: In function 'gfs2_iomap_get':
>> fs/gfs2/bmap.c:960:31: warning: 'lblock' may be used uninitialized [-Wmaybe-uninitialized]
960 | ret = gfs2_hole_size(inode, lblock, len, mp, iomap);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/bmap.c:851:18: note: 'lblock' was declared here
851 | sector_t lblock;
| ^~~~~~
fs/gfs2/bmap.c:960:31: warning: 'len' may be used uninitialized [-Wmaybe-uninitialized]
960 | ret = gfs2_hole_size(inode, lblock, len, mp, iomap);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/bmap.c:855:13: note: 'len' was declared here
855 | u64 len;
| ^~~
fs/gfs2/bmap.c:959:32: warning: 'height' may be used uninitialized [-Wmaybe-uninitialized]
959 | if (pos < size && height == ip->i_height)
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/bmap.c:857:12: note: 'height' was declared here
857 | u8 height;
| ^~~~~~
fs/gfs2/bmap.c:1290: warning: Function parameter or member 'inode' not described in 'gfs2_block_zero_range'
fs/gfs2/bmap.c:1290: warning: Function parameter or member 'from' not described in 'gfs2_block_zero_range'
fs/gfs2/bmap.c:1290: warning: Function parameter or member 'length' not described in 'gfs2_block_zero_range'
fs/gfs2/bmap.c:1493: warning: Function parameter or member 'rd_gh' not described in 'sweep_bh_for_rgrps'
fs/gfs2/bmap.c:1493: warning: Excess function parameter 'rg_gh' description in 'sweep_bh_for_rgrps'
fs/gfs2/bmap.c:1661: warning: Function parameter or member 'sdp' not described in 'find_nonnull_ptr'
fs/gfs2/bmap.c:1661: warning: Function parameter or member 'end_list' not described in 'find_nonnull_ptr'
fs/gfs2/bmap.c:1661: warning: Function parameter or member 'end_aligned' not described in 'find_nonnull_ptr'
vim +/lblock +960 fs/gfs2/bmap.c
7ee66c03e40a57 Christoph Hellwig 2018-06-01 831
3974320ca6aa68 Bob Peterson 2017-02-16 832 /**
628e366df11c0a Andreas Gruenbacher 2018-06-04 833 * gfs2_iomap_get - Map blocks from an inode to disk blocks
3974320ca6aa68 Bob Peterson 2017-02-16 834 * @inode: The inode
3974320ca6aa68 Bob Peterson 2017-02-16 835 * @pos: Starting position in bytes
3974320ca6aa68 Bob Peterson 2017-02-16 836 * @length: Length to map, in bytes
3974320ca6aa68 Bob Peterson 2017-02-16 837 * @flags: iomap flags
3974320ca6aa68 Bob Peterson 2017-02-16 838 * @iomap: The iomap structure
628e366df11c0a Andreas Gruenbacher 2018-06-04 839 * @mp: The metapath
3974320ca6aa68 Bob Peterson 2017-02-16 840 *
3974320ca6aa68 Bob Peterson 2017-02-16 841 * Returns: errno
3974320ca6aa68 Bob Peterson 2017-02-16 842 */
628e366df11c0a Andreas Gruenbacher 2018-06-04 843 static int gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length,
628e366df11c0a Andreas Gruenbacher 2018-06-04 844 unsigned flags, struct iomap *iomap,
628e366df11c0a Andreas Gruenbacher 2018-06-04 845 struct metapath *mp)
b3b94faa5fe596 David Teigland 2006-01-16 846 {
feaa7bba026c18 Steven Whitehouse 2006-06-14 847 struct gfs2_inode *ip = GFS2_I(inode);
feaa7bba026c18 Steven Whitehouse 2006-06-14 848 struct gfs2_sbd *sdp = GFS2_SB(inode);
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 849 loff_t size = i_size_read(inode);
9b8c81d1de4994 Steven Whitehouse 2008-02-22 850 __be64 *ptr;
3974320ca6aa68 Bob Peterson 2017-02-16 851 sector_t lblock;
628e366df11c0a Andreas Gruenbacher 2018-06-04 852 sector_t lblock_stop;
628e366df11c0a Andreas Gruenbacher 2018-06-04 853 int ret;
9b8c81d1de4994 Steven Whitehouse 2008-02-22 854 int eob;
628e366df11c0a Andreas Gruenbacher 2018-06-04 855 u64 len;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 856 struct buffer_head *dibh = NULL, *bh;
9b8c81d1de4994 Steven Whitehouse 2008-02-22 857 u8 height;
7276b3b0c77101 Steven Whitehouse 2006-09-21 858
628e366df11c0a Andreas Gruenbacher 2018-06-04 859 if (!length)
628e366df11c0a Andreas Gruenbacher 2018-06-04 860 return -EINVAL;
b3b94faa5fe596 David Teigland 2006-01-16 861
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 862 down_read(&ip->i_rw_mutex);
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 863
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 864 ret = gfs2_meta_inode_buffer(ip, &dibh);
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 865 if (ret)
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 866 goto unlock;
38084377af4fc8 Andreas Gruenbacher 2018-11-11 867 mp->mp_bh[0] = dibh;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 868
49edd5bf429c40 Andreas Gruenbacher 2018-02-06 869 if (gfs2_is_stuffed(ip)) {
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 870 if (flags & IOMAP_WRITE) {
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 871 loff_t max_size = gfs2_max_stuffed_size(ip);
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 872
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 873 if (pos + length > max_size)
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 874 goto unstuff;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 875 iomap->length = max_size;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 876 } else {
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 877 if (pos >= size) {
49edd5bf429c40 Andreas Gruenbacher 2018-02-06 878 if (flags & IOMAP_REPORT) {
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 879 ret = -ENOENT;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 880 goto unlock;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 881 } else {
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 882 /* report a hole */
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 883 iomap->offset = pos;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 884 iomap->length = length;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 885 goto do_alloc;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 886 }
3974320ca6aa68 Bob Peterson 2017-02-16 887 }
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 888 iomap->length = size;
49edd5bf429c40 Andreas Gruenbacher 2018-02-06 889 }
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 890 iomap->addr = (ip->i_no_addr << inode->i_blkbits) +
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 891 sizeof(struct gfs2_dinode);
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 892 iomap->type = IOMAP_INLINE;
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 893 iomap->inline_data = dibh->b_data + sizeof(struct gfs2_dinode);
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 894 goto out;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 895 }
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 896
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 897 unstuff:
3974320ca6aa68 Bob Peterson 2017-02-16 898 lblock = pos >> inode->i_blkbits;
3974320ca6aa68 Bob Peterson 2017-02-16 899 iomap->offset = lblock << inode->i_blkbits;
628e366df11c0a Andreas Gruenbacher 2018-06-04 900 lblock_stop = (pos + length - 1) >> inode->i_blkbits;
628e366df11c0a Andreas Gruenbacher 2018-06-04 901 len = lblock_stop - lblock + 1;
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 902 iomap->length = len << inode->i_blkbits;
20cdc1931ee8e0 Andreas Gruenbacher 2017-09-22 903
9b8c81d1de4994 Steven Whitehouse 2008-02-22 904 height = ip->i_height;
9a38662ba4e268 Andreas Gruenbacher 2018-04-16 905 while ((lblock + 1) * sdp->sd_sb.sb_bsize > sdp->sd_heightsize[height])
ecc30c79157103 Steven Whitehouse 2008-01-28 906 height++;
628e366df11c0a Andreas Gruenbacher 2018-06-04 907 find_metapath(sdp, lblock, mp, height);
9b8c81d1de4994 Steven Whitehouse 2008-02-22 908 if (height > ip->i_height || gfs2_is_stuffed(ip))
9b8c81d1de4994 Steven Whitehouse 2008-02-22 909 goto do_alloc;
3974320ca6aa68 Bob Peterson 2017-02-16 910
628e366df11c0a Andreas Gruenbacher 2018-06-04 911 ret = lookup_metapath(ip, mp);
e8b43fe0c1e035 Andreas Gruenbacher 2017-12-08 912 if (ret)
628e366df11c0a Andreas Gruenbacher 2018-06-04 913 goto unlock;
3974320ca6aa68 Bob Peterson 2017-02-16 914
628e366df11c0a Andreas Gruenbacher 2018-06-04 915 if (mp->mp_aheight != ip->i_height)
9b8c81d1de4994 Steven Whitehouse 2008-02-22 916 goto do_alloc;
3974320ca6aa68 Bob Peterson 2017-02-16 917
628e366df11c0a Andreas Gruenbacher 2018-06-04 918 ptr = metapointer(ip->i_height - 1, mp);
9b8c81d1de4994 Steven Whitehouse 2008-02-22 919 if (*ptr == 0)
9b8c81d1de4994 Steven Whitehouse 2008-02-22 920 goto do_alloc;
3974320ca6aa68 Bob Peterson 2017-02-16 921
628e366df11c0a Andreas Gruenbacher 2018-06-04 922 bh = mp->mp_bh[ip->i_height - 1];
bcfe94139a45fa Andreas Gruenbacher 2018-05-11 923 len = gfs2_extent_length(bh, ptr, len, &eob);
3974320ca6aa68 Bob Peterson 2017-02-16 924
628e366df11c0a Andreas Gruenbacher 2018-06-04 925 iomap->addr = be64_to_cpu(*ptr) << inode->i_blkbits;
628e366df11c0a Andreas Gruenbacher 2018-06-04 926 iomap->length = len << inode->i_blkbits;
628e366df11c0a Andreas Gruenbacher 2018-06-04 927 iomap->type = IOMAP_MAPPED;
0ed91eca1130e6 Andreas Gruenbacher 2018-07-25 928 iomap->flags |= IOMAP_F_MERGED;
9b8c81d1de4994 Steven Whitehouse 2008-02-22 929 if (eob)
7ee66c03e40a57 Christoph Hellwig 2018-06-01 930 iomap->flags |= IOMAP_F_GFS2_BOUNDARY;
3974320ca6aa68 Bob Peterson 2017-02-16 931
3974320ca6aa68 Bob Peterson 2017-02-16 932 out:
628e366df11c0a Andreas Gruenbacher 2018-06-04 933 iomap->bdev = inode->i_sb->s_bdev;
628e366df11c0a Andreas Gruenbacher 2018-06-04 934 unlock:
628e366df11c0a Andreas Gruenbacher 2018-06-04 935 up_read(&ip->i_rw_mutex);
9b8c81d1de4994 Steven Whitehouse 2008-02-22 936 return ret;
9b8c81d1de4994 Steven Whitehouse 2008-02-22 937
9b8c81d1de4994 Steven Whitehouse 2008-02-22 938 do_alloc:
628e366df11c0a Andreas Gruenbacher 2018-06-04 939 iomap->addr = IOMAP_NULL_ADDR;
628e366df11c0a Andreas Gruenbacher 2018-06-04 940 iomap->type = IOMAP_HOLE;
628e366df11c0a Andreas Gruenbacher 2018-06-04 941 if (flags & IOMAP_REPORT) {
49edd5bf429c40 Andreas Gruenbacher 2018-02-06 942 if (pos >= size)
3974320ca6aa68 Bob Peterson 2017-02-16 943 ret = -ENOENT;
628e366df11c0a Andreas Gruenbacher 2018-06-04 944 else if (height == ip->i_height)
628e366df11c0a Andreas Gruenbacher 2018-06-04 945 ret = gfs2_hole_size(inode, lblock, len, mp, iomap);
49edd5bf429c40 Andreas Gruenbacher 2018-02-06 946 else
49edd5bf429c40 Andreas Gruenbacher 2018-02-06 947 iomap->length = size - pos;
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 948 } else if (flags & IOMAP_WRITE) {
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 949 u64 alloc_size;
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 950
967bcc91b04493 Andreas Gruenbacher 2018-06-19 951 if (flags & IOMAP_DIRECT)
967bcc91b04493 Andreas Gruenbacher 2018-06-19 952 goto out; /* (see gfs2_file_direct_write) */
967bcc91b04493 Andreas Gruenbacher 2018-06-19 953
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 954 len = gfs2_alloc_size(inode, mp, len);
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 955 alloc_size = len << inode->i_blkbits;
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 956 if (alloc_size < iomap->length)
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 957 iomap->length = alloc_size;
64bc06bb32ee9c Andreas Gruenbacher 2018-06-24 958 } else {
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 959 if (pos < size && height == ip->i_height)
d505a96a3b16f4 Andreas Gruenbacher 2018-06-24 @960 ret = gfs2_hole_size(inode, lblock, len, mp, iomap);
3974320ca6aa68 Bob Peterson 2017-02-16 961 }
628e366df11c0a Andreas Gruenbacher 2018-06-04 962 goto out;
628e366df11c0a Andreas Gruenbacher 2018-06-04 963 }
628e366df11c0a Andreas Gruenbacher 2018-06-04 964
:::::: The code at line 960 was first introduced by commit
:::::: d505a96a3b16f46455035dc0296bc2da6014e163 gfs2: Further iomap cleanups
:::::: TO: Andreas Gruenbacher <agruenba(a)redhat.com>
:::::: CC: Andreas Gruenbacher <agruenba(a)redhat.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi LeoLiu-oc,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: b5504db0db8375a77340b5bb54c17cfb75d3c754
commit: 0ce7c3b6e8a986ee9ef92a07ae18964835446c07 [1291/1291] x86/perf: Add hardware performance events support for Zhaoxin CPU.
config: x86_64-randconfig-013-20241113 (https://download.01.org/0day-ci/archive/20241202/202412020554.iOBx6LMV-lkp@…)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412020554.iOBx6LMV-lkp@…)
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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412020554.iOBx6LMV-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition [-Wignored-attributes]
505 | __init int zhaoxin_pmu_init(void)
| ^
include/linux/init.h:50:17: note: expanded from macro '__init'
50 | #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline
| ^
include/linux/compiler_types.h:222:38: note: expanded from macro '__section'
222 | #define __section(S) __attribute__((__section__(#S)))
| ^
arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here
1054 | static inline int zhaoxin_pmu_init(void)
| ^
arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition [-Wignored-attributes]
505 | __init int zhaoxin_pmu_init(void)
| ^
include/linux/init.h:50:39: note: expanded from macro '__init'
50 | #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline
| ^
include/linux/compiler_types.h:221:33: note: expanded from macro '__cold'
221 | #define __cold __attribute__((cold))
| ^
arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here
1054 | static inline int zhaoxin_pmu_init(void)
| ^
>> arch/x86/events/zhaoxin/core.c:505:12: error: redefinition of 'zhaoxin_pmu_init'
505 | __init int zhaoxin_pmu_init(void)
| ^
arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here
1054 | static inline int zhaoxin_pmu_init(void)
| ^
2 warnings and 1 error generated.
vim +/zhaoxin_pmu_init +505 arch/x86/events/zhaoxin/core.c
504
> 505 __init int zhaoxin_pmu_init(void)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: df4c334beecb4cf58e4e8d63b491aa5ac0a84f46
commit: 8c6e9756375dff2e96d3b598992b2f0e8b3682ee [1474/1474] xfs: fix xfs shutdown since we reserve more blocks in agfl fixup
config: x86_64-randconfig-121-20241118 (https://download.01.org/0day-ci/archive/20241202/202412020323.jAdcem7b-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412020323.jAdcem7b-lkp@…)
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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412020323.jAdcem7b-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/xfs/libxfs/xfs_alloc.c:102:1: sparse: sparse: symbol 'xfs_ag_fixup_aside' was not declared. Should it be static?
vim +/xfs_ag_fixup_aside +102 fs/xfs/libxfs/xfs_alloc.c
94
95 /*
96 * Twice fixup for the same ag may happen within exact one tp, and the consume
97 * of agfl after first fixup may trigger second fixup's failure, then xfs will
98 * shutdown. To avoid that, we reserve blocks which can satisfy the second
99 * fixup.
100 */
101 xfs_extlen_t
> 102 xfs_ag_fixup_aside(
103 struct xfs_mount *mp)
104 {
105 xfs_extlen_t ret;
106
107 ret = 2 * mp->m_alloc_maxlevels;
108 if (xfs_has_rmapbt(mp))
109 ret += mp->m_rmap_maxlevels;
110
111 return ret;
112 }
113
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: b5504db0db8375a77340b5bb54c17cfb75d3c754
commit: 211070f39ed4ec7390dca8351c9fee934b8179e7 [1298/1298] HID: i2c-hid: override HID descriptors for certain devices
config: x86_64-buildonly-randconfig-006-20241118 (https://download.01.org/0day-ci/archive/20241202/202412020345.oZKo876S-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412020345.oZKo876S-lkp@…)
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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412020345.oZKo876S-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/hid/i2c-hid/i2c-hid-core.c:21:
include/linux/module.h:140:14: warning: 'cleanup_module' specifies less restrictive attribute than its target 'i2c_hid_driver_exit': 'cold' [-Wmissing-attributes]
140 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
include/linux/device.h:1637:1: note: in expansion of macro 'module_exit'
1637 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/i2c.h:870:9: note: in expansion of macro 'module_driver'
870 | module_driver(__i2c_driver, i2c_add_driver, \
| ^~~~~~~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:1344:1: note: in expansion of macro 'module_i2c_driver'
1344 | module_i2c_driver(i2c_hid_driver);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/i2c.h:30,
from drivers/hid/i2c-hid/i2c-hid-core.c:22:
drivers/hid/i2c-hid/i2c-hid-core.c:1344:19: note: 'cleanup_module' target declared here
1344 | module_i2c_driver(i2c_hid_driver);
| ^~~~~~~~~~~~~~
include/linux/device.h:1633:20: note: in definition of macro 'module_driver'
1633 | static void __exit __driver##_exit(void) \
| ^~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:1344:1: note: in expansion of macro 'module_i2c_driver'
1344 | module_i2c_driver(i2c_hid_driver);
| ^~~~~~~~~~~~~~~~~
include/linux/module.h:134:13: warning: 'init_module' specifies less restrictive attribute than its target 'i2c_hid_driver_init': 'cold' [-Wmissing-attributes]
134 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
include/linux/device.h:1632:1: note: in expansion of macro 'module_init'
1632 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/i2c.h:870:9: note: in expansion of macro 'module_driver'
870 | module_driver(__i2c_driver, i2c_add_driver, \
| ^~~~~~~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:1344:1: note: in expansion of macro 'module_i2c_driver'
1344 | module_i2c_driver(i2c_hid_driver);
| ^~~~~~~~~~~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:1344:19: note: 'init_module' target declared here
1344 | module_i2c_driver(i2c_hid_driver);
| ^~~~~~~~~~~~~~
include/linux/device.h:1628:19: note: in definition of macro 'module_driver'
1628 | static int __init __driver##_init(void) \
| ^~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:1344:1: note: in expansion of macro 'module_i2c_driver'
1344 | module_i2c_driver(i2c_hid_driver);
| ^~~~~~~~~~~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:327: warning: Function parameter or member 'data_len' not described in 'i2c_hid_set_or_send_report'
drivers/hid/i2c-hid/i2c-hid-core.c:327: warning: Excess function parameter 'len' description in 'i2c_hid_set_or_send_report'
drivers/hid/i2c-hid/i2c-hid-core.o: warning: objtool: i2c_hid_parse()+0x41e: sibling call from callable instruction with modified stack frame
drivers/hid/i2c-hid/i2c-hid-core.o: warning: objtool: i2c_hid_probe()+0x2f: sibling call from callable instruction with modified stack frame
>> drivers/hid/i2c-hid/i2c-hid-core.o: warning: objtool: missing symbol for section .init.text
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki