containers.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexey Gladkov <legion@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux.dev>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Christian Brauner <brauner@kernel.org>,
	"Eric W . Biederman" <ebiederm@xmission.com>,
	Kees Cook <keescook@chromium.org>,
	Manfred Spraul <manfred@colorfullife.com>
Subject: Re: [PATCH v2 1/3] sysctl: Allow change system v ipc sysctls inside ipc namespace
Date: Wed, 21 Sep 2022 17:38:22 +0800	[thread overview]
Message-ID: <202209211737.0Bu0F40t-lkp@intel.com> (raw)
In-Reply-To: <0895bd453013370eb4f9600e26e2a9969ee755de.1663696560.git.legion@kernel.org>

Hi Alexey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on kees/for-next/pstore linus/master v6.0-rc6 next-20220920]
[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/Alexey-Gladkov/sysctl-Allow-change-system-v-ipc-sysctls-inside-ipc-namespace/20220921-030939
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
config: hexagon-randconfig-r041-20220921 (https://download.01.org/0day-ci/archive/20220921/202209211737.0Bu0F40t-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/eb972fb9aad60123519d8dd32df26cb58985ce4a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Alexey-Gladkov/sysctl-Allow-change-system-v-ipc-sysctls-inside-ipc-namespace/20220921-030939
        git checkout eb972fb9aad60123519d8dd32df26cb58985ce4a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> ipc/ipc_sysctl.c:215:47: error: passing 'kgid_t' to parameter of incompatible type 'kgid_t *'; take the address with &
           ipc_set_ownership(head, table, &ns_root_uid, ns_root_gid);
                                                        ^~~~~~~~~~~
                                                        &
   ipc/ipc_sysctl.c:195:31: note: passing argument to parameter 'gid' here
                                 kuid_t *uid, kgid_t *gid)
                                                      ^
>> ipc/ipc_sysctl.c:225:13: error: call to undeclared function 'current_euid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (uid_eq(current_euid(), ns_root_uid))
                      ^
   ipc/ipc_sysctl.c:225:13: note: did you mean 'current_work'?
   include/linux/workqueue.h:467:28: note: 'current_work' declared here
   extern struct work_struct *current_work(void);
                              ^
>> ipc/ipc_sysctl.c:225:13: error: passing 'int' to parameter of incompatible type 'kuid_t'
           if (uid_eq(current_euid(), ns_root_uid))
                      ^~~~~~~~~~~~~~
   include/linux/uidgid.h:61:34: note: passing argument to parameter 'left' here
   static inline bool uid_eq(kuid_t left, kuid_t right)
                                    ^
>> ipc/ipc_sysctl.c:228:11: error: call to undeclared function 'in_egroup_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           else if (in_egroup_p(ns_root_gid))
                    ^
   4 errors generated.


vim +215 ipc/ipc_sysctl.c

   206	
   207	static int ipc_permissions(struct ctl_table_header *head, struct ctl_table *table)
   208	{
   209		struct ipc_namespace *ns =
   210			container_of(head->set, struct ipc_namespace, ipc_set);
   211		int mode = table->mode;
   212		kuid_t ns_root_uid;
   213		kgid_t ns_root_gid;
   214	
 > 215		ipc_set_ownership(head, table, &ns_root_uid, ns_root_gid);
   216	
   217	#ifdef CONFIG_CHECKPOINT_RESTORE
   218		if (((table->data == &ns->ids[IPC_SEM_IDS].next_id) ||
   219		     (table->data == &ns->ids[IPC_MSG_IDS].next_id) ||
   220		     (table->data == &ns->ids[IPC_SHM_IDS].next_id)) &&
   221		    checkpoint_restore_ns_capable(ns->user_ns))
   222			mode = 0666;
   223		else
   224	#endif
 > 225		if (uid_eq(current_euid(), ns_root_uid))
   226			mode >>= 6;
   227	
 > 228		else if (in_egroup_p(ns_root_gid))
   229			mode >>= 3;
   230	
   231		mode &= 7;
   232	
   233		return (mode << 6) | (mode << 3) | mode;
   234	}
   235	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  reply	other threads:[~2022-09-21  9:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 16:17 [PATCH v1] sysctl: Allow change system v ipc sysctls inside ipc namespace Alexey Gladkov
2022-07-25 16:16 ` Eric W. Biederman
2022-08-16 15:42   ` Alexey Gladkov
2022-08-16 15:42     ` [PATCH v1 1/3] " Alexey Gladkov
2022-09-19 15:26       ` Eric W. Biederman
2022-09-20 16:15         ` Alexey Gladkov
2022-09-20 18:08           ` [PATCH v2 0/3] Allow to change ipc/mq " Alexey Gladkov
2022-09-20 18:08             ` [PATCH v2 1/3] sysctl: Allow change system v ipc " Alexey Gladkov
2022-09-21  9:38               ` kernel test robot [this message]
2022-09-21 10:41                 ` [PATCH v3 0/3] Allow to change ipc/mq " Alexey Gladkov
2022-09-21 10:41                   ` [PATCH v3 1/3] sysctl: Allow change system v ipc " Alexey Gladkov
2022-09-21 10:41                   ` [PATCH v3 2/3] sysctl: Allow to change limits for posix messages queues Alexey Gladkov
2022-09-21 10:41                   ` [PATCH v3 3/3] docs: Add information about ipc sysctls limitations Alexey Gladkov
2024-01-15 15:46                   ` [RESEND PATCH v3 0/3] Allow to change ipc/mq sysctls inside ipc namespace Alexey Gladkov
2024-01-15 15:46                     ` [RESEND PATCH v3 1/3] sysctl: Allow change system v ipc " Alexey Gladkov
2024-01-15 15:46                     ` [RESEND PATCH v3 2/3] docs: Add information about ipc sysctls limitations Alexey Gladkov
2024-01-15 15:46                     ` [RESEND PATCH v3 3/3] sysctl: Allow to change limits for posix messages queues Alexey Gladkov
2022-09-20 18:08             ` [PATCH v2 2/3] " Alexey Gladkov
2022-09-20 18:08             ` [PATCH v2 3/3] docs: Add information about ipc sysctls limitations Alexey Gladkov
2022-08-16 15:42     ` [PATCH v1 2/3] sysctl: Allow to change limits for posix messages queues Alexey Gladkov
2022-09-19 15:27       ` Eric W. Biederman
2022-08-16 15:42     ` [PATCH v1 3/3] docs: Add information about ipc sysctls limitations Alexey Gladkov
2022-09-19 15:29       ` Eric W. Biederman

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=202209211737.0Bu0F40t-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=containers@lists.linux.dev \
    --cc=ebiederm@xmission.com \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=legion@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=manfred@colorfullife.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;
as well as URLs for NNTP newsgroup(s).