From: kernel test robot <lkp@intel.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: oe-kbuild-all@lists.linux.dev, ntfs3@lists.linux.dev
Subject: [paragon-software-group-ntfs3:master 35/42] fs/ntfs3/frecord.c:1934:16: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Thu, 27 Jun 2024 19:30:43 +0800 [thread overview]
Message-ID: <202406271920.hndE8N6D-lkp@intel.com> (raw)
tree: https://github.com/Paragon-Software-Group/linux-ntfs3.git master
head: bde63e8eae5d67582b32517229de11ef00223e34
commit: 27ba86795ed65b6f2f88f1b63786fe68c57b3b61 [35/42] fs/ntfs3: Do copy_to_user out of run_lock
config: nios2-randconfig-r111-20240627 (https://download.01.org/0day-ci/archive/20240627/202406271920.hndE8N6D-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240627/202406271920.hndE8N6D-lkp@intel.com/reproduce)
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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406271920.hndE8N6D-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/ntfs3/frecord.c:1934:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *d @@ got struct fiemap_extent [noderef] __user *[assigned] dest @@
fs/ntfs3/frecord.c:1934:16: sparse: expected void *d
fs/ntfs3/frecord.c:1934:16: sparse: got struct fiemap_extent [noderef] __user *[assigned] dest
fs/ntfs3/frecord.c:2011:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct fiemap_extent [noderef] __user *fi_extents_start @@ got struct fiemap_extent *[assigned] fe_k @@
fs/ntfs3/frecord.c:2011:35: sparse: expected struct fiemap_extent [noderef] __user *fi_extents_start
fs/ntfs3/frecord.c:2011:35: sparse: got struct fiemap_extent *[assigned] fe_k
fs/ntfs3/frecord.c: note: in included file:
fs/ntfs3/ntfs.h:461:21: sparse: sparse: self-comparison always evaluates to false
vim +1934 fs/ntfs3/frecord.c
1900
1901 /*
1902 * fiemap_fill_next_extent_k - a copy of fiemap_fill_next_extent
1903 * but it accepts kernel address for fi_extents_start
1904 */
1905 static int fiemap_fill_next_extent_k(struct fiemap_extent_info *fieinfo,
1906 u64 logical, u64 phys, u64 len, u32 flags)
1907 {
1908 struct fiemap_extent extent;
1909 struct fiemap_extent __user *dest = fieinfo->fi_extents_start;
1910
1911 /* only count the extents */
1912 if (fieinfo->fi_extents_max == 0) {
1913 fieinfo->fi_extents_mapped++;
1914 return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
1915 }
1916
1917 if (fieinfo->fi_extents_mapped >= fieinfo->fi_extents_max)
1918 return 1;
1919
1920 if (flags & FIEMAP_EXTENT_DELALLOC)
1921 flags |= FIEMAP_EXTENT_UNKNOWN;
1922 if (flags & FIEMAP_EXTENT_DATA_ENCRYPTED)
1923 flags |= FIEMAP_EXTENT_ENCODED;
1924 if (flags & (FIEMAP_EXTENT_DATA_TAIL | FIEMAP_EXTENT_DATA_INLINE))
1925 flags |= FIEMAP_EXTENT_NOT_ALIGNED;
1926
1927 memset(&extent, 0, sizeof(extent));
1928 extent.fe_logical = logical;
1929 extent.fe_physical = phys;
1930 extent.fe_length = len;
1931 extent.fe_flags = flags;
1932
1933 dest += fieinfo->fi_extents_mapped;
> 1934 memcpy(dest, &extent, sizeof(extent));
1935
1936 fieinfo->fi_extents_mapped++;
1937 if (fieinfo->fi_extents_mapped == fieinfo->fi_extents_max)
1938 return 1;
1939 return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
1940 }
1941
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-06-27 11:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202406271920.hndE8N6D-lkp@intel.com \
--to=lkp@intel.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=ntfs3@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox