From: kernel test robot <lkp@intel.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [gustavoars:testing/fam01-next20230530 9/9] fs/smb/client/cifssmb.c:2987:31: warning: writing 1 byte into a region of size 0
Date: Wed, 31 May 2023 08:21:51 +0800 [thread overview]
Message-ID: <202305310857.whO1DJq1-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/fam01-next20230530
head: a2e8533878017f1874b21d78b6bf08a6c4095365
commit: a2e8533878017f1874b21d78b6bf08a6c4095365 [9/9] Makefile: Globally enable -Wstringop-overflow
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20230531/202305310857.whO1DJq1-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=a2e8533878017f1874b21d78b6bf08a6c4095365
git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
git fetch --no-tags gustavoars testing/fam01-next20230530
git checkout a2e8533878017f1874b21d78b6bf08a6c4095365
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/smb/client/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305310857.whO1DJq1-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:23,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:60,
from arch/x86/include/asm/preempt.h:9,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/smb/client/cifssmb.c:17:
In function 'fortify_memcpy_chk',
inlined from 'CIFS_open' at fs/smb/client/cifssmb.c:1249:3:
include/linux/fortify-string.h:592:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
592 | __read_overflow2_field(q_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'cifs_init_ace',
inlined from 'posix_acl_to_cifs' at fs/smb/client/cifssmb.c:3046:3,
inlined from 'cifs_do_set_acl' at fs/smb/client/cifssmb.c:3191:15:
>> fs/smb/client/cifssmb.c:2987:31: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
2987 | cifs_ace->cifs_e_perm = local_ace->e_perm;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from fs/smb/client/cifssmb.c:27:
fs/smb/client/cifspdu.h: In function 'cifs_do_set_acl':
fs/smb/client/cifspdu.h:384:14: note: at offset [7, 11] into destination object 'Protocol' of size 4
384 | __u8 Protocol[4];
| ^~~~~~~~
In function 'cifs_init_ace',
inlined from 'posix_acl_to_cifs' at fs/smb/client/cifssmb.c:3046:3,
inlined from 'cifs_do_set_acl' at fs/smb/client/cifssmb.c:3191:15:
fs/smb/client/cifssmb.c:2988:30: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
2988 | cifs_ace->cifs_e_tag = local_ace->e_tag;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
fs/smb/client/cifspdu.h: In function 'cifs_do_set_acl':
fs/smb/client/cifspdu.h:384:14: note: at offset [6, 10] into destination object 'Protocol' of size 4
384 | __u8 Protocol[4];
| ^~~~~~~~
vim +2987 fs/smb/client/cifssmb.c
bd9684b042dcbb fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2978
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2979 /**
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2980 * cifs_init_ace - convert ACL entry from POSIX ACL to cifs format
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2981 * @cifs_ace: the cifs ACL entry to store into
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2982 * @local_ace: the POSIX ACL entry to convert
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2983 */
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2984 static void cifs_init_ace(struct cifs_posix_ace *cifs_ace,
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2985 const struct posix_acl_entry *local_ace)
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2986 {
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 @2987 cifs_ace->cifs_e_perm = local_ace->e_perm;
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2988 cifs_ace->cifs_e_tag = local_ace->e_tag;
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2989
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2990 switch (local_ace->e_tag) {
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2991 case ACL_USER:
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2992 cifs_ace->cifs_uid =
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2993 cpu_to_le64(from_kuid(&init_user_ns, local_ace->e_uid));
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2994 break;
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2995 case ACL_GROUP:
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2996 cifs_ace->cifs_uid =
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2997 cpu_to_le64(from_kgid(&init_user_ns, local_ace->e_gid));
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2998 break;
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 2999 default:
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 3000 cifs_ace->cifs_uid = cpu_to_le64(-1);
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 3001 }
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 3002 }
dc1af4c4b4721a fs/cifs/cifssmb.c Christian Brauner 2022-09-22 3003
:::::: The code at line 2987 was first introduced by commit
:::::: dc1af4c4b4721abfa07b351063825acc7e69cc66 cifs: implement set acl method
:::::: TO: Christian Brauner <brauner@kernel.org>
:::::: CC: Christian Brauner (Microsoft) <brauner@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-05-31 0:22 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=202305310857.whO1DJq1-lkp@intel.com \
--to=lkp@intel.com \
--cc=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®