From: kernel test robot <lkp@intel.com>
To: Edward Adam Davis <eadavis@qq.com>,
syzbot+00c633585760c05507c3@syzkaller.appspotmail.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, omosnace@redhat.com,
paul@paul-moore.com, selinux@vger.kernel.org,
stephen.smalley.work@gmail.com, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] selinux: read and write sid under lock
Date: Mon, 10 Mar 2025 10:54:13 +0800 [thread overview]
Message-ID: <202503101039.wURTMnYj-lkp@intel.com> (raw)
In-Reply-To: <tencent_0BEE86CD3878D26D402DDD6F949484E96E0A@qq.com>
Hi Edward,
kernel test robot noticed the following build errors:
[auto build test ERROR on pcmoore-selinux/next]
[also build test ERROR on linus/master v6.14-rc6 next-20250307]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Edward-Adam-Davis/selinux-read-and-write-sid-under-lock/20250309-130846
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next
patch link: https://lore.kernel.org/r/tencent_0BEE86CD3878D26D402DDD6F949484E96E0A%40qq.com
patch subject: [PATCH] selinux: read and write sid under lock
config: i386-defconfig (https://download.01.org/0day-ci/archive/20250310/202503101039.wURTMnYj-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/202503101039.wURTMnYj-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/202503101039.wURTMnYj-lkp@intel.com/
All errors (new ones prefixed by >>):
>> security/selinux/hooks.c:4718:21: error: no member named 'lock' in 'struct sk_security_struct'
4718 | spin_lock(&sksec->lock);
| ~~~~~ ^
security/selinux/hooks.c:4721:23: error: no member named 'lock' in 'struct sk_security_struct'
4721 | spin_unlock(&sksec->lock);
| ~~~~~ ^
security/selinux/hooks.c:5198:20: error: no member named 'lock' in 'struct sk_security_struct'
5198 | spin_lock(&sksec->lock);
| ~~~~~ ^
security/selinux/hooks.c:5200:22: error: no member named 'lock' in 'struct sk_security_struct'
5200 | spin_unlock(&sksec->lock);
| ~~~~~ ^
4 errors generated.
vim +4718 security/selinux/hooks.c
4695
4696 static int selinux_socket_post_create(struct socket *sock, int family,
4697 int type, int protocol, int kern)
4698 {
4699 const struct task_security_struct *tsec = selinux_cred(current_cred());
4700 struct inode_security_struct *isec = inode_security_novalidate(SOCK_INODE(sock));
4701 struct sk_security_struct *sksec;
4702 u16 sclass = socket_type_to_security_class(family, type, protocol);
4703 u32 sid = SECINITSID_KERNEL;
4704 int err = 0;
4705
4706 if (!kern) {
4707 err = socket_sockcreate_sid(tsec, sclass, &sid);
4708 if (err)
4709 return err;
4710 }
4711
4712 isec->sclass = sclass;
4713 isec->sid = sid;
4714 isec->initialized = LABEL_INITIALIZED;
4715
4716 if (sock->sk) {
4717 sksec = selinux_sock(sock->sk);
> 4718 spin_lock(&sksec->lock);
4719 sksec->sclass = sclass;
4720 sksec->sid = sid;
4721 spin_unlock(&sksec->lock);
4722 /* Allows detection of the first association on this socket */
4723 if (sksec->sclass == SECCLASS_SCTP_SOCKET)
4724 sksec->sctp_assoc_state = SCTP_ASSOC_UNSET;
4725
4726 err = selinux_netlbl_socket_post_create(sock->sk, family);
4727 }
4728
4729 return err;
4730 }
4731
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-03-10 2:54 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <tencent_0BEE86CD3878D26D402DDD6F949484E96E0A@qq.com>]
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=202503101039.wURTMnYj-lkp@intel.com \
--to=lkp@intel.com \
--cc=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
--cc=syzbot+00c633585760c05507c3@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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