From: kernel test robot <lkp@intel.com>
To: Leon Romanovsky <leonro@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [leon-rdma:device-trust-core-v1 16/18] drivers/base/test/device-trust-test.c:1106:13: warning: stack frame size (2432) exceeds limit (2048) in 'device_trust_driver_precedence_test'
Date: Thu, 05 Nov 2026 03:29:36 +0100 [thread overview]
Message-ID: <202611050324.haR7ZTLI-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git device-trust-core-v1
head: de870c841cdc66fcef8c15662d737b49b2356904
commit: 16c0a5ab002de9ece57552721116428855565e14 [16/18] driver core: Cover trust authorization and binding with KUnit
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20261105/202611050324.haR7ZTLI-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/20261105/202611050324.haR7ZTLI-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/202611050324.haR7ZTLI-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/base/test/device-trust-test.c:1106:13: warning: stack frame size (2432) exceeds limit (2048) in 'device_trust_driver_precedence_test' [-Wframe-larger-than]
1106 | static void device_trust_driver_precedence_test(struct kunit *test)
| ^
>> drivers/base/test/device-trust-test.c:1152:13: warning: stack frame size (2368) exceeds limit (2048) in 'device_trust_driver_matching_test' [-Wframe-larger-than]
1152 | static void device_trust_driver_matching_test(struct kunit *test)
| ^
>> drivers/base/test/device-trust-test.c:1180:13: warning: stack frame size (2384) exceeds limit (2048) in 'device_trust_driver_user_precedence_test' [-Wframe-larger-than]
1180 | static void device_trust_driver_user_precedence_test(struct kunit *test)
| ^
>> drivers/base/test/device-trust-test.c:1202:13: warning: stack frame size (2320) exceeds limit (2048) in 'device_trust_driver_rejected_write_test' [-Wframe-larger-than]
1202 | static void device_trust_driver_rejected_write_test(struct kunit *test)
| ^
4 warnings generated.
vim +/device_trust_driver_precedence_test +1106 drivers/base/test/device-trust-test.c
1105
> 1106 static void device_trust_driver_precedence_test(struct kunit *test)
1107 {
1108 static const char * const driver_rules[] = {
1109 "pci:test=default", "pci:test=disabled",
1110 "pci:test=adversary", "pci:test=full",
1111 };
1112 static const char * const device_rules[] = {
1113 NULL, "pci:0000:01:00.0=default", "pci:0000:01:00.0=disabled",
1114 "pci:0000:01:00.0=adversary", "pci:0000:01:00.0=full",
1115 };
1116 const struct bus_type bus = { .name = "pci" };
1117 const struct device_driver drv = { .bus = &bus, .name = "test" };
1118 unsigned int initial, global, driver, device;
1119
1120 for (initial = DEVICE_TRUST_POLICY_DEFAULT;
1121 initial <= DEVICE_TRUST_POLICY_FULL; initial++) {
1122 for (global = DEVICE_TRUST_POLICY_DEFAULT;
1123 global <= DEVICE_TRUST_POLICY_FULL; global++) {
1124 for (driver = 0; driver < ARRAY_SIZE(driver_rules); driver++) {
1125 for (device = 0; device < ARRAY_SIZE(device_rules); device++) {
1126 struct device_private private = {};
1127 struct device dev = {
1128 .bus = &bus,
1129 .init_name = "0000:01:00.0",
1130 .trust_policy = initial,
1131 };
1132
1133 mutex_init(&dev.mutex);
1134 device_trust_apply_boot_policy(&dev, global,
1135 device_rules[device]);
1136 dev.p = &private;
1137 device_trust_apply_boot_policy(&dev, global,
1138 device_rules[device]);
1139 device_trust_init_state(&dev);
1140 device_lock(&dev);
1141 device_trust_apply_driver_policy(&dev, &drv,
1142 driver_rules[driver]);
1143 device_unlock(&dev);
1144 KUNIT_EXPECT_EQ(test, dev.trust_policy,
1145 device ? device - 1 : driver);
1146 }
1147 }
1148 }
1149 }
1150 }
1151
> 1152 static void device_trust_driver_matching_test(struct kunit *test)
1153 {
1154 static const char * const unmatched[] = {
1155 NULL, "usb:test=disabled", "pc:test=disabled", "pcie:test=disabled",
1156 "pci:tes=disabled", "pci:test1=disabled", "pci:te*=disabled",
1157 "pci:test=disabled,pci:other=invalid", "pci:test=disabled,",
1158 };
1159 const struct bus_type bus = { .name = "pci" };
1160 const struct device_driver drv = { .bus = &bus, .name = "test" };
1161 struct device_private private = {};
1162 struct device dev = { .p = &private };
1163 unsigned int i;
1164
1165 mutex_init(&dev.mutex);
1166 device_trust_init_state(&dev);
1167 for (i = 0; i < ARRAY_SIZE(unmatched); i++) {
1168 device_lock(&dev);
1169 device_trust_apply_driver_policy(&dev, &drv, unmatched[i]);
1170 device_unlock(&dev);
1171 KUNIT_EXPECT_EQ(test, dev.trust_policy, DEVICE_TRUST_POLICY_DEFAULT);
1172 }
1173 device_lock(&dev);
1174 device_trust_apply_driver_policy(&dev, &drv,
1175 "pci:test=disabled,pci:test=adversary");
1176 device_unlock(&dev);
1177 KUNIT_EXPECT_EQ(test, dev.trust_policy, DEVICE_TRUST_POLICY_ADVERSARY);
1178 }
1179
> 1180 static void device_trust_driver_user_precedence_test(struct kunit *test)
1181 {
1182 const struct bus_type bus = { .name = "pci" };
1183 const struct device_driver drv = { .bus = &bus, .name = "test" };
1184 enum device_trust_policy policy;
1185
1186 for (policy = DEVICE_TRUST_POLICY_DEFAULT;
1187 policy <= DEVICE_TRUST_POLICY_FULL; policy++) {
1188 struct device_private private = {};
1189 struct device dev = { .p = &private, .trust_policy = policy };
1190
1191 mutex_init(&dev.mutex);
1192 device_trust_init_state(&dev);
1193 KUNIT_ASSERT_EQ(test, device_trust_set_policy(&dev, policy), 0);
1194 device_lock(&dev);
1195 device_trust_apply_driver_policy(&dev, &drv, "pci:test=disabled");
1196 device_trust_apply_driver_policy(&dev, &drv, "pci:test=full");
1197 device_unlock(&dev);
1198 KUNIT_EXPECT_EQ(test, dev.trust_policy, policy);
1199 }
1200 }
1201
> 1202 static void device_trust_driver_rejected_write_test(struct kunit *test)
1203 {
1204 const struct bus_type bus = { .name = "pci" };
1205 const struct device_driver drv = { .bus = &bus, .name = "test" };
1206 struct device_private private = {};
1207 struct device dev = {
1208 .p = &private,
1209 .trust_policy = DEVICE_TRUST_POLICY_DISABLED,
1210 };
1211
1212 mutex_init(&dev.mutex);
1213 device_trust_init_state(&dev);
1214 KUNIT_ASSERT_EQ(test, device_trust_set_policy(&dev, DEVICE_TRUST_POLICY_DEFAULT),
1215 -EBUSY);
1216 KUNIT_ASSERT_EQ(test, device_trust_set_policy(&dev, DEVICE_TRUST_POLICY_FULL + 1),
1217 -EINVAL);
1218 device_lock(&dev);
1219 device_trust_apply_driver_policy(&dev, &drv, "pci:test=full");
1220 device_unlock(&dev);
1221 KUNIT_EXPECT_EQ(test, dev.trust_policy, DEVICE_TRUST_POLICY_FULL);
1222 }
1223
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-05 2:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202611050324.haR7ZTLI-lkp@intel.com \
--to=lkp@intel.com \
--cc=leonro@nvidia.com \
--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.