[an error occurred while processing this directive]
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
 
[an error occurred while processing this directive]
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250607-compiletime_assert-v1-1-a8991a9be729@columbia.edu>
Date: Sat, 07 Jun 2025 03:23:55 -0400
From: Tal Zussman <tz2294@...umbia.edu>
To: Kees Cook <kees@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Cc: Tal Zussman <tz2294@...umbia.edu>
Subject: [PATCH] compiler_types: Remove unnecessary indirection in
 compiletime_assert()

compiletime_assert() is the only user of _compiletime_assert(), which
uses __compiletime_assert() directly with no modification to arguments.
Remove _compiletime_assert() and use __compiletime_assert() directly.

Signed-off-by: Tal Zussman <tz2294@...umbia.edu>
---
 include/linux/compiler_types.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 2b77d12e07b2..60d4fc8a89e5 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -552,9 +552,6 @@ struct ftrace_likely_data {
 # define __compiletime_assert(condition, msg, prefix, suffix) ((void)(condition))
 #endif
 
-#define _compiletime_assert(condition, msg, prefix, suffix) \
-	__compiletime_assert(condition, msg, prefix, suffix)
-
 /**
  * compiletime_assert - break build and emit msg if condition is false
  * @condition: a compile-time constant condition to check
@@ -565,7 +562,7 @@ struct ftrace_likely_data {
  * compiler has support to do so.
  */
 #define compiletime_assert(condition, msg) \
-	_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
+	__compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
 
 #define compiletime_assert_atomic_type(t)				\
 	compiletime_assert(__native_word(t),				\

---
base-commit: bdc7f8c5adad50dad2ec762e317f8b212f5782ac
change-id: 20250607-compiletime_assert-13dc76f26a92

Best regards,
-- 
Tal Zussman <tz2294@...umbia.edu>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ