From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 901C3C32771 for ; Wed, 21 Sep 2022 09:39:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 051EF80008; Wed, 21 Sep 2022 05:39:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F1CD380007; Wed, 21 Sep 2022 05:39:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBD5680008; Wed, 21 Sep 2022 05:39:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id C940080007 for ; Wed, 21 Sep 2022 05:39:19 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 9ED6BC0BB0 for ; Wed, 21 Sep 2022 09:39:19 +0000 (UTC) X-FDA: 79935594438.08.8E341B3 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf10.hostedemail.com (Postfix) with ESMTP id 15CC2C005C for ; Wed, 21 Sep 2022 09:39:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663753159; x=1695289159; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=VJnMfkjVt6R4xqCodT1PncCAy2K/67p9tish/CyCUBQ=; b=CxnvoiYGV8yDRxT4zTzOd36Cn5fXCWqGsOdjXnyE0RIdJ4NxlgZPjWCd P3QJRf/yyalGCOpG0uqVgPFaeScBT71C6MdCMXh6Giwwp6bPGyM40DUJI AwOZ6AZ5qD7CavR2qLsV/K5PNcLAuBP8DnlMLbRVmBc8AMho+2ZHNSpqf QjEXLLDE2gJn2ErAud1IExz5pvIuq1IXDLOytMoI61PLzOhvN+TE3C6Wo 850Q7EnuqBeGafhK+pGZ1wkkH1kwRs8yLFa+JJo8dfquyon0jZR21VwcC OxIWuxq9Hzq2+87sXSoYlD4Rb1o59zqQV93/nYYAieQSJ2c6COylKAIFL Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10476"; a="298673364" X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="298673364" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 02:39:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="761681806" Received: from lkp-server01.sh.intel.com (HELO c0a60f19fe7e) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 21 Sep 2022 02:39:15 -0700 Received: from kbuild by c0a60f19fe7e with local (Exim 4.96) (envelope-from ) id 1oawCI-0003Tl-0N; Wed, 21 Sep 2022 09:39:14 +0000 Date: Wed, 21 Sep 2022 17:38:22 +0800 From: kernel test robot To: Alexey Gladkov , LKML , Linux Containers Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Andrew Morton , Linux Memory Management List , Christian Brauner , "Eric W . Biederman" , Kees Cook , Manfred Spraul Subject: Re: [PATCH v2 1/3] sysctl: Allow change system v ipc sysctls inside ipc namespace Message-ID: <202209211737.0Bu0F40t-lkp@intel.com> References: <0895bd453013370eb4f9600e26e2a9969ee755de.1663696560.git.legion@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0895bd453013370eb4f9600e26e2a9969ee755de.1663696560.git.legion@kernel.org> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663753159; a=rsa-sha256; cv=none; b=OIgS7564YDcwRJI1xMeJMmROSWRBn4XPiZWepiqHlvCYySxnf0NT1TedkXrAq9wgpr3pf+ kAnYH+9msuBuEMEsRr7fMwmEdWpVS2KMmwhpnnXDO8oGX7ofnO/4D5M+GeuN7DmroaJ63+ WRg1sdxxLgtlhp3pSkgO4lIgHfqJSHM= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=CxnvoiYG; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf10.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663753159; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PIoZMdkXmW2oxdwzrHW37yt6fziDfVEw479y7qRL2E4=; b=0/hzaw3fXzfT+gbytKmki0tjM1WnVR1QYLyJtus3KZqBN/rNSrns8gvGCKSt7MsJiSQKY7 8HBQBQSHDXejy8eBTwDhIXbpMxMPlm7N/If7NHgV4Azn5VZNYYLYZsB7VdnfPQEEgGCStG uEPM4VIB6OkBEGe2/U2+eMXixBvUyww= X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 15CC2C005C X-Stat-Signature: iz5isqggq5h66tr97rgfhxwk7ofnidoi Authentication-Results: imf10.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=CxnvoiYG; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf10.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-HE-Tag: 1663753158-746823 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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