lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250829142556.72577-3-aqibaf@amazon.com>
Date: Fri, 29 Aug 2025 14:25:46 +0000
From: Aqib Faruqui <aqibaf@...zon.com>
To: Paolo Bonzini <pbonzini@...hat.com>, Shuah Khan <shuah@...nel.org>,
	<kvm@...r.kernel.org>, <linux-kselftest@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
CC: <nh-open-source@...zon.com>, <aqibaf@...zon.com>
Subject: [PATCH 2/9] KVM: selftests: Add __packed attribute fallback

Kernel UAPI headers use __packed but don't provide the definition in
userspace builds.

Add a fallback definition matching the kernel's implementation. This
follows the same pattern used by BPF and SGX selftests.

Signed-off-by: Aqib Faruqui <aqibaf@...zon.com>
---
 tools/testing/selftests/kvm/include/kvm_util.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h
index 23a506d7e..7fae7f5e7 100644
--- a/tools/testing/selftests/kvm/include/kvm_util.h
+++ b/tools/testing/selftests/kvm/include/kvm_util.h
@@ -5,6 +5,10 @@
 #ifndef SELFTEST_KVM_UTIL_H
 #define SELFTEST_KVM_UTIL_H
 
+#ifndef __packed
+#define __packed __attribute__((__packed__))
+#endif
+
 #include "test_util.h"
 
 #include <linux/compiler.h>
-- 
2.47.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ