From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.15 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796464562; b=BxN54Kqrn0jUeLrSVK3A6dUugc1n6TKlE2xj75oQrTNX/uZhS5Wtd/j70eOVr5mjoEsA 22W4ezL+cwAiezL5iWhi+/2WNFCFG81PGt/EdYlLIXoycVR6YKOsMBWGfTLgKRMopoIcE pYzRnRZYR/ALnjGJQ43sg5uNZtiU0HM/qm0IvwhaWNU6eWF8hRhkj2CHHyMaiBQJLBdKJ iC9gYC99D6PX1pa9Hz+Cx411RNJ1YHFlIzW6wa6vjndQ0v0X1KXotvxi9i/+a6dpYWgYM 9DIESUApZyqs1iQDkAz1cSpRPPhLDjo3svcCKX83HTHEip+Ul+9hVm00pMt6eHBzLkw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796464562; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:MIME-Version:Content-Type:Content-Disposition; bh=jFKsRt6j2nHCKcPRay2KZJN7vPxFI/ccGabCdjolDDc=; b=DRoO44fOiDDbZWA9/kW2AfZUmKRrRZrkCJbQlP4ycMDu5OfQYnro4T/u+ciZXcFNHLen 6zuTuArdJld5AB6ffhswwm+QPVpIobXmUdNObopucD63kgABO95T2VXfmnY2K3OowH7ag HjkGpfVSTnADOpUfZL6HUj3IA/sgq7xMdV+iaFQV2ulsyzufPWjMHIWRe9/U4pTF59egf sk11lVTDxZFFlevAQ4zi81ZIla/Md70A1nRE8ZS5fwVC+35fsn2lexJpe9H+opE8tqeps hzDy2Mr347u7KOzqYFdoUsGC5oNLeOg2HjryZC6KVL8PgWpejfv6lJa6fXEA80f1EIA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Gt9aHP9n; arc=none smtp.remote-ip=198.175.65.15 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA895606A338 for ; Sat, 5 Dec 2026 09:56:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AA895606A338 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Gt9aHP9n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796464562; x=1828000562; h=date:from:to:cc:subject:message-id:mime-version; bh=jFKsRt6j2nHCKcPRay2KZJN7vPxFI/ccGabCdjolDDc=; b=Gt9aHP9n3eAT/iXg+lrUJk36Id0Jw9TuCJE2azMOIJQejf1U1y2guwHK ZWGAL/2I/T1nGfkHu3MsPqBVZNICqnw3c3a47R65n7Wig9MYGY+sZM/TD QwONS5WRf0LBZ4m6DjLyllNbt/qkXC3dF+b45nFYrHEhJPkiuoj3M04TY H25h8NjF+LWaQX3Q8hz8MQtATrVkw8yku1shKcuPOx3unaTfijxNfa3KB 1L4YvEYUCFHimS5eK1vK+VG0mEdn5BmV05NKV5fJBNxbaZAzcUOa5o3dD GMfwOVIRgyQhPOJtYulS+EblqwAfuNEK88tWVHTUxZMMmZsECH3kBAxU6 Q==; X-CSE-ConnectionGUID: oAETSHwiTNKwWqc/C+XHZQ== X-CSE-MsgGUID: FcMPiglbScukciS3L2pkPA== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5442056" X-IronPort-AV: E=Sophos;i="6.29,80,1794902400"; d="scan'208";a="5442056" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2026 01:56:00 -0800 X-CSE-ConnectionGUID: ouIe+QZFTiepkartvuhcpA== X-CSE-MsgGUID: oWAlzDtdQweSqNuyX8NzMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,80,1794902400"; d="scan'208";a="14292206" Received: from lkp-server01.sh.intel.com (HELO 0caa9d2d175c) ([10.239.97.150]) by orviesa007.jf.intel.com with ESMTP; 05 Dec 2026 01:55:59 -0800 Received: from kbuild by 0caa9d2d175c with local (Exim 4.98.2) (envelope-from ) id 1xZmUm-00000001m1Z-3TRU; Sat, 05 Dec 2026 09:55:56 +0000 Date: Sat, 5 Dec 2026 17:55:18 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com Subject: Re: [PATCH 09/13] platform/x86: lenovo: tlmi: Add authentication sysfs entries Message-ID: <20261205035448.5vnIqP7d-lkp@intel.com> X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline :::::: :::::: Manual check reason: "same reports for this branch" :::::: BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev In-Reply-To: <20261204022032.3074618-10-mpearson-lenovo@squebb.ca> References: <20261204022032.3074618-10-mpearson-lenovo@squebb.ca> TO: Mark Pearson TO: mpearson-lenovo@squebb.ca CC: derekjohn.clark@gmail.com CC: i@rong.moe CC: hansg@kernel.org CC: ilpo.jarvinen@linux.intel.com CC: platform-driver-x86@vger.kernel.org CC: linux-kernel@vger.kernel.org Hi Mark, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v7.4-rc5 next-20261203] [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/Mark-Pearson/platform-x86-lenovo-think-lmi-Convert-name-arrays-to-pointers/20261203-212010 base: linus/master patch link: https://lore.kernel.org/r/20261204022032.3074618-10-mpearson-lenovo%40squebb.ca patch subject: [PATCH 09/13] platform/x86: lenovo: tlmi: Add authentication sysfs entries :::::: branch date: 16 hours ago :::::: commit date: 16 hours ago config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261205/20261205035448.5vnIqP7d-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261205/20261205035448.5vnIqP7d-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 | Closes: https://lore.kernel.org/r/20261205035448.5vnIqP7d-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/platform/x86/lenovo/tlmi-auth.c: In function 'new_password_store': >> drivers/platform/x86/lenovo/tlmi-auth.c:144:14: error: implicit declaration of function 'capable' [-Wimplicit-function-declaration] 144 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~ >> drivers/platform/x86/lenovo/tlmi-auth.c:144:22: error: 'CAP_SYS_ADMIN' undeclared (first use in this function) 144 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c:144:22: note: each undeclared identifier is reported only once for each function it appears in drivers/platform/x86/lenovo/tlmi-auth.c: In function 'cert_to_password_store': drivers/platform/x86/lenovo/tlmi-auth.c:409:22: error: 'CAP_SYS_ADMIN' undeclared (first use in this function) 409 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c: In function 'certificate_store': drivers/platform/x86/lenovo/tlmi-auth.c:476:22: error: 'CAP_SYS_ADMIN' undeclared (first use in this function) 476 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c: In function 'signature_store': drivers/platform/x86/lenovo/tlmi-auth.c:585:22: error: 'CAP_SYS_ADMIN' undeclared (first use in this function) 585 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c: In function 'save_signature_store': drivers/platform/x86/lenovo/tlmi-auth.c:612:22: error: 'CAP_SYS_ADMIN' undeclared (first use in this function) 612 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ vim +/capable +144 drivers/platform/x86/lenovo/tlmi-auth.c 380a386e1f8ad51 Mark Pearson 2026-12-03 130 380a386e1f8ad51 Mark Pearson 2026-12-03 131 static ssize_t new_password_store(struct kobject *kobj, 380a386e1f8ad51 Mark Pearson 2026-12-03 132 struct kobj_attribute *attr, 380a386e1f8ad51 Mark Pearson 2026-12-03 133 const char *buf, size_t count) 380a386e1f8ad51 Mark Pearson 2026-12-03 134 { 380a386e1f8ad51 Mark Pearson 2026-12-03 135 struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj); 380a386e1f8ad51 Mark Pearson 2026-12-03 136 struct think_lmi *td = dev_get_drvdata(&setting->wdev->dev); 380a386e1f8ad51 Mark Pearson 2026-12-03 137 enum pwd_type_v2 pwd_type; 380a386e1f8ad51 Mark Pearson 2026-12-03 138 size_t pwdlen, cur_pwdlen; 380a386e1f8ad51 Mark Pearson 2026-12-03 139 struct wmi_buffer wmibuf; 380a386e1f8ad51 Mark Pearson 2026-12-03 140 char *start; 380a386e1f8ad51 Mark Pearson 2026-12-03 141 int ix = 0; 380a386e1f8ad51 Mark Pearson 2026-12-03 142 int ret; 380a386e1f8ad51 Mark Pearson 2026-12-03 143 380a386e1f8ad51 Mark Pearson 2026-12-03 @144 if (!capable(CAP_SYS_ADMIN)) 380a386e1f8ad51 Mark Pearson 2026-12-03 145 return -EPERM; 380a386e1f8ad51 Mark Pearson 2026-12-03 146 380a386e1f8ad51 Mark Pearson 2026-12-03 147 guard(mutex)(&td->tlmi_auth_lock); 380a386e1f8ad51 Mark Pearson 2026-12-03 148 380a386e1f8ad51 Mark Pearson 2026-12-03 149 /* Authorisation needs to be done first */ 380a386e1f8ad51 Mark Pearson 2026-12-03 150 ret = tlmi_auth_authenticate_user(td); 380a386e1f8ad51 Mark Pearson 2026-12-03 151 /* Ignore most errors. We might be in deployment mode */ 380a386e1f8ad51 Mark Pearson 2026-12-03 152 if (ret == -ENOMEM) 380a386e1f8ad51 Mark Pearson 2026-12-03 153 return ret; 380a386e1f8ad51 Mark Pearson 2026-12-03 154 380a386e1f8ad51 Mark Pearson 2026-12-03 155 /* Strip out CR if one is present, setting password won't work if it is present */ 380a386e1f8ad51 Mark Pearson 2026-12-03 156 char *new_pwd __free(kfree_sensitive) = kstrdup_and_replace(buf, '\n', '\0', GFP_KERNEL); 380a386e1f8ad51 Mark Pearson 2026-12-03 157 if (!new_pwd) 380a386e1f8ad51 Mark Pearson 2026-12-03 158 return -ENOMEM; 380a386e1f8ad51 Mark Pearson 2026-12-03 159 380a386e1f8ad51 Mark Pearson 2026-12-03 160 pwdlen = strlen(new_pwd); 380a386e1f8ad51 Mark Pearson 2026-12-03 161 /* pwdlen == 0 is allowed to clear the password */ 380a386e1f8ad51 Mark Pearson 2026-12-03 162 if (pwdlen && (pwdlen < setting->minlen || pwdlen > setting->maxlen)) 380a386e1f8ad51 Mark Pearson 2026-12-03 163 return -EINVAL; 380a386e1f8ad51 Mark Pearson 2026-12-03 164 380a386e1f8ad51 Mark Pearson 2026-12-03 165 cur_pwdlen = struct_size_t(struct wmi_string, chars, strlen(setting->password) + 1); 380a386e1f8ad51 Mark Pearson 2026-12-03 166 pwdlen = struct_size_t(struct wmi_string, chars, strlen(new_pwd) + 1); 380a386e1f8ad51 Mark Pearson 2026-12-03 167 wmibuf.length = 2 + cur_pwdlen + pwdlen; 380a386e1f8ad51 Mark Pearson 2026-12-03 168 char *wmidata __free(kfree_sensitive) = kzalloc(wmibuf.length, GFP_KERNEL); 380a386e1f8ad51 Mark Pearson 2026-12-03 169 if (!wmidata) 380a386e1f8ad51 Mark Pearson 2026-12-03 170 return -ENOMEM; 380a386e1f8ad51 Mark Pearson 2026-12-03 171 wmibuf.data = wmidata; 380a386e1f8ad51 Mark Pearson 2026-12-03 172 380a386e1f8ad51 Mark Pearson 2026-12-03 173 if (setting == td->pwd_admin) { 380a386e1f8ad51 Mark Pearson 2026-12-03 174 pwd_type = SVP; 380a386e1f8ad51 Mark Pearson 2026-12-03 175 } else if (setting == td->pwd_power) { 380a386e1f8ad51 Mark Pearson 2026-12-03 176 pwd_type = POP; 380a386e1f8ad51 Mark Pearson 2026-12-03 177 } else if (setting == td->pwd_system) { 380a386e1f8ad51 Mark Pearson 2026-12-03 178 pwd_type = SMP; 380a386e1f8ad51 Mark Pearson 2026-12-03 179 } else if (setting == td->pwd_hdd) { 380a386e1f8ad51 Mark Pearson 2026-12-03 180 if (setting->level == TLMI_LEVEL_MASTER) 380a386e1f8ad51 Mark Pearson 2026-12-03 181 pwd_type = MASTERHDD; 380a386e1f8ad51 Mark Pearson 2026-12-03 182 else 380a386e1f8ad51 Mark Pearson 2026-12-03 183 pwd_type = HDD; 380a386e1f8ad51 Mark Pearson 2026-12-03 184 pwd_type += setting->index - 1; 380a386e1f8ad51 Mark Pearson 2026-12-03 185 } else if (setting == td->pwd_nvme) { 380a386e1f8ad51 Mark Pearson 2026-12-03 186 if (setting->level == TLMI_LEVEL_MASTER) 380a386e1f8ad51 Mark Pearson 2026-12-03 187 pwd_type = MASTERNVME; 380a386e1f8ad51 Mark Pearson 2026-12-03 188 else 380a386e1f8ad51 Mark Pearson 2026-12-03 189 pwd_type = NVME; 380a386e1f8ad51 Mark Pearson 2026-12-03 190 pwd_type += setting->index - 1; 380a386e1f8ad51 Mark Pearson 2026-12-03 191 } else { 380a386e1f8ad51 Mark Pearson 2026-12-03 192 return -EOPNOTSUPP; 380a386e1f8ad51 Mark Pearson 2026-12-03 193 } 380a386e1f8ad51 Mark Pearson 2026-12-03 194 380a386e1f8ad51 Mark Pearson 2026-12-03 195 start = wmibuf.data; 380a386e1f8ad51 Mark Pearson 2026-12-03 196 start[0] = pwd_type; 380a386e1f8ad51 Mark Pearson 2026-12-03 197 start += 2; 380a386e1f8ad51 Mark Pearson 2026-12-03 198 380a386e1f8ad51 Mark Pearson 2026-12-03 199 ix = tlmi_populate_string_buffer(start, cur_pwdlen, setting->password); 380a386e1f8ad51 Mark Pearson 2026-12-03 200 if (ix < 0) 380a386e1f8ad51 Mark Pearson 2026-12-03 201 return ix; 380a386e1f8ad51 Mark Pearson 2026-12-03 202 start += ix; 380a386e1f8ad51 Mark Pearson 2026-12-03 203 ix = tlmi_populate_string_buffer(start, pwdlen, new_pwd); 380a386e1f8ad51 Mark Pearson 2026-12-03 204 if (ix < 0) 380a386e1f8ad51 Mark Pearson 2026-12-03 205 return ix; 380a386e1f8ad51 Mark Pearson 2026-12-03 206 380a386e1f8ad51 Mark Pearson 2026-12-03 207 ret = tlmi_request(td->auth_wdev, 0, SET_PASSWORD, &wmibuf); 380a386e1f8ad51 Mark Pearson 2026-12-03 208 return ret ?: count; 380a386e1f8ad51 Mark Pearson 2026-12-03 209 } 380a386e1f8ad51 Mark Pearson 2026-12-03 210 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki