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=j3swQYHBiIzVYitQy8lc8bzIOQGIG5IImUSOGO3t9F1xog5KwmPRvv7OK+Qwv5WJc78h lXoIdKK56/AeMsiXzVoQ2ikbWZuI5zpjlJsmq8ksuhG9cfFOkCy3w2Ux8ZsseBEJbOaMO ibkvB5JfMfwKamnTY+eIKQNWe/dltIUdjeHyEyywNtfzwTxgC0dw4YMQS4wsfKkhGF98t Xaw2tlhXxidrOLrweqmUIUyiAB3ZmgRCZEZ4q45ztltdUTzj9mtW3FbbvF4QHj7j/QzbW TfYeXHqU58cvGmq2W3nwl7eajWIJZCNKyiUPWgO2v8+IAkNcXRxgs1Yi98CAhjGW/PA== 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:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=nU/Dkswk/JhW6PgVXpwl2rHTNozfJWJYMJLhHVoDizY=; b=BD4rbvuc90FzWXGsg2NT7XJJEkefwdB9/gYqPF7JPCjCFxLZS1mWZlqKQA6/RkWqNMyU C9pTOmuRTQ3m2D0d6A3auCeIoA7voiiLbSl5qE2jKgYWhFDgZBL4ScObZroZcsfO7ZYlY 4Ws6yAmyR3Uprr1rokIPVzdVst7PW5fQqLzV84r14FreAyCZvoJ6yOi+TTt2fFWYVi1XQ OEwe8BCgN8rHAoTW0a1KLPCub/ofARugB8Njg6j6Bve04YrHFCJ0XNRSBtLQxxnekUHml NyyZSbxMxuVWNnLWP5B89aSiYcuFyRYAmHFICTg/1ulRazeCdDm4EjA8UjmhDmwL1cg== 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=RYY8mljT; 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 30533606A33E; Sat, 5 Dec 2026 09:56:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 30533606A33E 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=RYY8mljT 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:references: mime-version:in-reply-to; bh=nU/Dkswk/JhW6PgVXpwl2rHTNozfJWJYMJLhHVoDizY=; b=RYY8mljT9OLh5mtWHdvuBNMdm5aUNCC+Ugvfu4XWCjusPzRmMqYt+5BP JPUu61EL6ApsZiDH4sT4IBK5+cp84CXeBcaAbATLb7Z0AjMFhC3LS8Olz kNjRH/cdNG7LK3ZAOatb2WY3GhZrjrYfnkbc3qZPJnyZUIqqNUFGm4Hs7 cvz5Q1ErDfSNyEQK1tKrxoWeVEDbo9ZTNECQY1oYPD3sPSsMshujomT3n r9BckvbsaTy7g7Z83Zwo90/9iOyDW6h7xRAq9ITbtVRBrqg+fTz4cVykd /2v9Ad4SNSlpFC4j08E/kPyTJ6k4zUB6fQbEPeb/j5eN1hV9s0wCdoVRx g==; X-CSE-ConnectionGUID: 4KaI4tHGSFWCWxbif2AaWQ== X-CSE-MsgGUID: PNZTtK9LTnGwWXNVZ13e0Q== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5442082" X-IronPort-AV: E=Sophos;i="6.29,80,1794902400"; d="scan'208";a="5442082" 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:01 -0800 X-CSE-ConnectionGUID: BfUEEOXASW+sbGR3+x3rYg== X-CSE-MsgGUID: 00ISyHL+SKCJ8Ow4IIpgKA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,80,1794902400"; d="scan'208";a="14292155" 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-00000001m1X-3NmJ; Sat, 05 Dec 2026 09:55:56 +0000 Date: Sat, 5 Dec 2026 17:55:10 +0800 From: kernel test robot To: Mark Pearson Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, derekjohn.clark@gmail.com, i@rong.moe, hansg@kernel.org, ilpo.jarvinen@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/13] platform/x86: lenovo: tlmi: Add authentication sysfs entries Message-ID: <20261205003244.J2YIJH3E-lkp@intel.com> References: <20261204022032.3074618-10-mpearson-lenovo@squebb.ca> X-Mailing-List: linux-kernel@vger.kernel.org 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 In-Reply-To: <20261204022032.3074618-10-mpearson-lenovo@squebb.ca> 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 config: i386-randconfig-1006-20261204 (https://download.01.org/0day-ci/archive/20261205/20261205003244.J2YIJH3E-lkp@intel.com/config) compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261205/20261205003244.J2YIJH3E-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/oe-kbuild-all/20261205003244.J2YIJH3E-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/platform/x86/lenovo/tlmi-auth.c:144:7: error: call to undeclared function 'capable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 144 | if (!capable(CAP_SYS_ADMIN)) | ^ >> drivers/platform/x86/lenovo/tlmi-auth.c:144:15: error: use of undeclared identifier 'CAP_SYS_ADMIN' 144 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c:409:7: error: call to undeclared function 'capable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 409 | if (!capable(CAP_SYS_ADMIN)) | ^ drivers/platform/x86/lenovo/tlmi-auth.c:409:15: error: use of undeclared identifier 'CAP_SYS_ADMIN' 409 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c:476:7: error: call to undeclared function 'capable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 476 | if (!capable(CAP_SYS_ADMIN)) | ^ drivers/platform/x86/lenovo/tlmi-auth.c:476:15: error: use of undeclared identifier 'CAP_SYS_ADMIN' 476 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c:585:7: error: call to undeclared function 'capable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 585 | if (!capable(CAP_SYS_ADMIN)) | ^ drivers/platform/x86/lenovo/tlmi-auth.c:585:15: error: use of undeclared identifier 'CAP_SYS_ADMIN' 585 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ drivers/platform/x86/lenovo/tlmi-auth.c:612:7: error: call to undeclared function 'capable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 612 | if (!capable(CAP_SYS_ADMIN)) | ^ drivers/platform/x86/lenovo/tlmi-auth.c:612:15: error: use of undeclared identifier 'CAP_SYS_ADMIN' 612 | if (!capable(CAP_SYS_ADMIN)) | ^~~~~~~~~~~~~ 10 errors generated. vim +/capable +144 drivers/platform/x86/lenovo/tlmi-auth.c 130 131 static ssize_t new_password_store(struct kobject *kobj, 132 struct kobj_attribute *attr, 133 const char *buf, size_t count) 134 { 135 struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj); 136 struct think_lmi *td = dev_get_drvdata(&setting->wdev->dev); 137 enum pwd_type_v2 pwd_type; 138 size_t pwdlen, cur_pwdlen; 139 struct wmi_buffer wmibuf; 140 char *start; 141 int ix = 0; 142 int ret; 143 > 144 if (!capable(CAP_SYS_ADMIN)) 145 return -EPERM; 146 147 guard(mutex)(&td->tlmi_auth_lock); 148 149 /* Authorisation needs to be done first */ 150 ret = tlmi_auth_authenticate_user(td); 151 /* Ignore most errors. We might be in deployment mode */ 152 if (ret == -ENOMEM) 153 return ret; 154 155 /* Strip out CR if one is present, setting password won't work if it is present */ 156 char *new_pwd __free(kfree_sensitive) = kstrdup_and_replace(buf, '\n', '\0', GFP_KERNEL); 157 if (!new_pwd) 158 return -ENOMEM; 159 160 pwdlen = strlen(new_pwd); 161 /* pwdlen == 0 is allowed to clear the password */ 162 if (pwdlen && (pwdlen < setting->minlen || pwdlen > setting->maxlen)) 163 return -EINVAL; 164 165 cur_pwdlen = struct_size_t(struct wmi_string, chars, strlen(setting->password) + 1); 166 pwdlen = struct_size_t(struct wmi_string, chars, strlen(new_pwd) + 1); 167 wmibuf.length = 2 + cur_pwdlen + pwdlen; 168 char *wmidata __free(kfree_sensitive) = kzalloc(wmibuf.length, GFP_KERNEL); 169 if (!wmidata) 170 return -ENOMEM; 171 wmibuf.data = wmidata; 172 173 if (setting == td->pwd_admin) { 174 pwd_type = SVP; 175 } else if (setting == td->pwd_power) { 176 pwd_type = POP; 177 } else if (setting == td->pwd_system) { 178 pwd_type = SMP; 179 } else if (setting == td->pwd_hdd) { 180 if (setting->level == TLMI_LEVEL_MASTER) 181 pwd_type = MASTERHDD; 182 else 183 pwd_type = HDD; 184 pwd_type += setting->index - 1; 185 } else if (setting == td->pwd_nvme) { 186 if (setting->level == TLMI_LEVEL_MASTER) 187 pwd_type = MASTERNVME; 188 else 189 pwd_type = NVME; 190 pwd_type += setting->index - 1; 191 } else { 192 return -EOPNOTSUPP; 193 } 194 195 start = wmibuf.data; 196 start[0] = pwd_type; 197 start += 2; 198 199 ix = tlmi_populate_string_buffer(start, cur_pwdlen, setting->password); 200 if (ix < 0) 201 return ix; 202 start += ix; 203 ix = tlmi_populate_string_buffer(start, pwdlen, new_pwd); 204 if (ix < 0) 205 return ix; 206 207 ret = tlmi_request(td->auth_wdev, 0, SET_PASSWORD, &wmibuf); 208 return ret ?: count; 209 } 210 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki