From: kernel test robot <lkp@intel.com>
To: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Mickaël Salaün" <mic@digikod.net>
Subject: [mic:next 8/12] security/landlock/net.c:165:50: error: expected ';' after top level declarator
Date: Tue, 6 Jun 2023 06:47:46 +0800 [thread overview]
Message-ID: <202306060602.Grdt8eev-lkp@intel.com> (raw)
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git next
head: 33ccf2aa61758ef2887862301b574f5d9a77553c
commit: 6d0bfdb25ce6a9652a68ea095d9a9fdacc25aa27 [8/12] landlock: Add network rules and TCP hooks support
config: x86_64-randconfig-a001-20230605 (https://download.01.org/0day-ci/archive/20230606/202306060602.Grdt8eev-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git/commit/?id=6d0bfdb25ce6a9652a68ea095d9a9fdacc25aa27
git remote add mic git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git
git fetch --no-tags mic next
git checkout 6d0bfdb25ce6a9652a68ea095d9a9fdacc25aa27
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash security/
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/202306060602.Grdt8eev-lkp@intel.com/
All errors (new ones prefixed by >>):
>> security/landlock/net.c:165:50: error: expected ';' after top level declarator
static struct security_hook_list landlock_hooks[] __lsm_ro_after_init = {
^
;
>> security/landlock/net.c:172:37: error: invalid application of 'sizeof' to an incomplete type 'struct security_hook_list[]'
security_add_hooks(landlock_hooks, ARRAY_SIZE(landlock_hooks),
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:56:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
security/landlock/net.c:165:34: warning: tentative array definition assumed to have one element
static struct security_hook_list landlock_hooks[] __lsm_ro_after_init = {
^
1 warning and 2 errors generated.
vim +165 security/landlock/net.c
164
> 165 static struct security_hook_list landlock_hooks[] __lsm_ro_after_init = {
166 LSM_HOOK_INIT(socket_bind, hook_socket_bind),
167 LSM_HOOK_INIT(socket_connect, hook_socket_connect),
168 };
169
170 __init void landlock_add_net_hooks(void)
171 {
> 172 security_add_hooks(landlock_hooks, ARRAY_SIZE(landlock_hooks),
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-06-05 22:48 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=202306060602.Grdt8eev-lkp@intel.com \
--to=lkp@intel.com \
--cc=konstantin.meskhidze@huawei.com \
--cc=llvm@lists.linux.dev \
--cc=mic@digikod.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.