summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorDave Hansen <dave.hansen@linux.intel.com>2026-05-22 08:56:29 -0700
committerDave Hansen <dave.hansen@linux.intel.com>2026-06-03 08:59:44 -0700
commit8d1376e6b0e6d98bed8e7d14fa8587a1d1139e93 (patch)
treee808610f69f7431a868cecbdd8ca5162ec638093 /scripts/Makefile.thinlto
parent6e97c234cdf0d11f51f75e918b3f612e57ecd027 (diff)
coco/tdx-host: Lock out module updates when reading version
The TDX module version is currently stashed in some global variables and dumped out to sysfs without locking. This works fine when the version is static and never changes. But with runtime module updates, the TDX module version can change. Some kind of locking is needed. Barring this, userspace could theoretically see a strange torn module version that is some Frankenstein version from from two different updates. Use the new module update lock/unlock to prevent updates while trying to read the version. Don't be fussy about it. There's no need to snapshot the version or do READ_ONCE(), or minimize lock holding times. sysfs_emit() does not sleep. Also note that the lock/unlock are backed by preempt_dis/enable() which are really cheap CPU-local operations. This is not a heavyweight lock. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions