All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tingmao Wang <m@maowtm.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 5/9] Define user structure for events and responses.
Date: Wed, 5 Mar 2025 12:13:37 +0800	[thread overview]
Message-ID: <202503051149.MimDe0ds-lkp@intel.com> (raw)
In-Reply-To: <cde6bbf0b52710b33170f2787fdcb11538e40813.1741047969.git.m@maowtm.org>

Hi Tingmao,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.14-rc5 next-20250304]
[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/Tingmao-Wang/Define-the-supervisor-and-event-structure/20250304-092354
base:   linus/master
patch link:    https://lore.kernel.org/r/cde6bbf0b52710b33170f2787fdcb11538e40813.1741047969.git.m%40maowtm.org
patch subject: [RFC PATCH 5/9] Define user structure for events and responses.
config: i386-buildonly-randconfig-003-20250305 (https://download.01.org/0day-ci/archive/20250305/202503051149.MimDe0ds-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/20250305/202503051149.MimDe0ds-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/202503051149.MimDe0ds-lkp@intel.com/

All errors (new ones prefixed by >>):

>> security/landlock/syscalls.c:137:2: error: call to '__compiletime_assert_358' declared with 'error' attribute: BUILD_BUG_ON failed: __alignof__(typeof(*event)) != 8
     137 |         BUILD_BUG_ON(__alignof__(typeof(*event)) != 8);
         |         ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^
   include/linux/compiler_types.h:542:2: note: expanded from macro 'compiletime_assert'
     542 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^
   include/linux/compiler_types.h:530:2: note: expanded from macro '_compiletime_assert'
     530 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:523:4: note: expanded from macro '__compiletime_assert'
     523 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:137:1: note: expanded from here
     137 | __compiletime_assert_358
         | ^
   1 error generated.


vim +137 security/landlock/syscalls.c

    82	
    83	/*
    84	 * This function only contains arithmetic operations with constants, leading to
    85	 * BUILD_BUG_ON().  The related code is evaluated and checked at build time,
    86	 * but it is then ignored thanks to compiler optimizations.
    87	 */
    88	static void build_check_abi(void)
    89	{
    90		struct landlock_ruleset_attr ruleset_attr;
    91		struct landlock_path_beneath_attr path_beneath_attr;
    92		struct landlock_net_port_attr net_port_attr;
    93		size_t ruleset_size, path_beneath_size, net_port_size;
    94		struct landlock_supervise_event *event;
    95		struct landlock_supervise_response response;
    96		size_t supervise_evt_size, supervise_response_size;
    97	
    98		/*
    99		 * For each user space ABI structures, first checks that there is no
   100		 * hole in them, then checks that all architectures have the same
   101		 * struct size.
   102		 */
   103		ruleset_size = sizeof(ruleset_attr.handled_access_fs);
   104		ruleset_size += sizeof(ruleset_attr.handled_access_net);
   105		ruleset_size += sizeof(ruleset_attr.scoped);
   106		ruleset_size += sizeof(ruleset_attr.supervisor_fd);
   107		ruleset_size += sizeof(ruleset_attr.pad);
   108		BUILD_BUG_ON(sizeof(ruleset_attr) != ruleset_size);
   109		BUILD_BUG_ON(sizeof(ruleset_attr) != 32);
   110	
   111		path_beneath_size = sizeof(path_beneath_attr.allowed_access);
   112		path_beneath_size += sizeof(path_beneath_attr.parent_fd);
   113		BUILD_BUG_ON(sizeof(path_beneath_attr) != path_beneath_size);
   114		BUILD_BUG_ON(sizeof(path_beneath_attr) != 12);
   115	
   116		net_port_size = sizeof(net_port_attr.allowed_access);
   117		net_port_size += sizeof(net_port_attr.port);
   118		BUILD_BUG_ON(sizeof(net_port_attr) != net_port_size);
   119		BUILD_BUG_ON(sizeof(net_port_attr) != 16);
   120	
   121		/* Check that anything before the destname does not have holes */
   122		supervise_evt_size = sizeof(event->hdr.type);
   123		supervise_evt_size += sizeof(event->hdr.length);
   124		supervise_evt_size += sizeof(event->hdr.cookie);
   125		BUILD_BUG_ON(offsetofend(typeof(*event), hdr) != 8);
   126		supervise_evt_size += sizeof(event->access_request);
   127		supervise_evt_size += sizeof(event->accessor);
   128		supervise_evt_size += sizeof(event->fd1);
   129		supervise_evt_size += sizeof(event->fd2);
   130		BUILD_BUG_ON(offsetof(typeof(*event), destname) != supervise_evt_size);
   131		BUILD_BUG_ON(offsetof(typeof(*event), destname) != 28);
   132	
   133		/*
   134		 * Make sure this struct does not end up with stricter
   135		 * alignment than 8
   136		 */
 > 137		BUILD_BUG_ON(__alignof__(typeof(*event)) != 8);
   138	
   139		supervise_response_size = sizeof(response.length);
   140		supervise_response_size += sizeof(response.decision);
   141		supervise_response_size += sizeof(response._reserved);
   142		supervise_response_size += sizeof(response.cookie);
   143		BUILD_BUG_ON(sizeof(response) != supervise_response_size);
   144		BUILD_BUG_ON(sizeof(response) != 8);
   145	}
   146	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2025-03-05  4:14 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04  1:12 [RFC PATCH 0/9] Landlock supervise: a mechanism for interactive permission requests Tingmao Wang
2025-03-04  1:12 ` [RFC PATCH 1/9] Define the supervisor and event structure Tingmao Wang
2025-03-04  1:12 ` [RFC PATCH 2/9] Refactor per-layer information in rulesets and rules Tingmao Wang
2025-03-04 19:49   ` Mickaël Salaün
2025-03-06  2:58     ` Tingmao Wang
2025-03-08 18:57       ` Mickaël Salaün
2025-03-10  0:38         ` Tingmao Wang
2025-03-04  1:12 ` [RFC PATCH 3/9] Adds a supervisor reference in the per-layer information Tingmao Wang
2025-03-04  1:13 ` [RFC PATCH 4/9] User-space API for creating a supervisor-fd Tingmao Wang
2025-03-05 16:09   ` Mickaël Salaün
2025-03-10  0:41     ` Tingmao Wang
2025-03-11 19:28       ` Mickaël Salaün
2025-03-26  0:06         ` Tingmao Wang
2025-04-11 10:55           ` Mickaël Salaün
2025-03-04  1:13 ` [RFC PATCH 5/9] Define user structure for events and responses Tingmao Wang
2025-03-04 19:49   ` Mickaël Salaün
2025-03-06  3:05     ` Tingmao Wang
2025-03-08 19:07       ` Mickaël Salaün
2025-03-10  0:39         ` Tingmao Wang
2025-03-11 19:29           ` Mickaël Salaün
2025-03-10  0:39       ` Tingmao Wang
2025-03-11 19:28         ` Mickaël Salaün
2025-03-11 23:18           ` Tingmao Wang
2025-03-12 11:49             ` Mickaël Salaün
2025-03-26  0:02               ` Tingmao Wang
2025-03-05  4:13   ` kernel test robot [this message]
2025-03-04  1:13 ` [RFC PATCH 6/9] Creating supervisor events for filesystem operations Tingmao Wang
2025-03-04 19:50   ` Mickaël Salaün
2025-03-10  0:39     ` Tingmao Wang
2025-03-11 19:29       ` Mickaël Salaün
2025-03-05  5:05   ` kernel test robot
2025-03-04  1:13 ` [RFC PATCH 7/9] Implement fdinfo for ruleset and supervisor fd Tingmao Wang
2025-03-04  1:13 ` [RFC PATCH 8/9] Implement fops for supervisor-fd Tingmao Wang
2025-03-04  1:13 ` [RFC PATCH 9/9] Enhance the sandboxer example to support landlock-supervise Tingmao Wang
2025-03-05  3:36   ` kernel test robot
2025-03-04 19:48 ` [RFC PATCH 0/9] Landlock supervise: a mechanism for interactive permission requests Mickaël Salaün
2025-03-06  2:57   ` Tingmao Wang
2025-03-06 17:07     ` Amir Goldstein
2025-03-08 19:14       ` Mickaël Salaün
2025-03-11  0:42       ` Tingmao Wang
2025-03-11 19:28         ` Mickaël Salaün
2025-03-11 20:58           ` Song Liu
2025-03-11 22:03             ` Tingmao Wang
2025-03-11 23:23               ` Song Liu
2025-03-12 11:50             ` Mickaël Salaün
2025-03-12 10:58         ` Jan Kara
2025-03-12 12:26         ` Amir Goldstein
2025-03-08 18:57     ` Mickaël Salaün
2025-03-06 21:04 ` Jan Kara
2025-03-08 19:15   ` Mickaël Salaün
2025-03-12  6:20 ` Tetsuo Handa
2025-03-24  1:58   ` Tingmao Wang
2025-03-24 10:43     ` Tetsuo Handa
2026-02-15  2:41       ` Tingmao Wang

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=202503051149.MimDe0ds-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=m@maowtm.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 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.