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: <20211119113644.1600-8-alx.manpages@gmail.com>
Date:   Fri, 19 Nov 2021 12:36:35 +0100
From:   Alejandro Colomar <alx.manpages@...il.com>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Alejandro Colomar <alx.manpages@...il.com>
Subject: [PATCH 07/17] linux/NULL.h: Move NULL to a separate header

Touching files so used for the kernel,
forces 'make' to recompile most of the kernel.

Having those definitions in more granular files
helps avoid recompiling so much of the kernel.

Signed-off-by: Alejandro Colomar <alx.manpages@...il.com>
---
 include/linux/NULL.h     | 10 ++++++++++
 include/linux/memberof.h |  2 ++
 include/linux/stddef.h   |  3 +--
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 include/linux/NULL.h

diff --git a/include/linux/NULL.h b/include/linux/NULL.h
new file mode 100644
index 000000000000..628eacaf598a
--- /dev/null
+++ b/include/linux/NULL.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_NULL_H
+#define _LINUX_NULL_H
+
+
+#undef NULL
+#define NULL ((void *)0)
+
+
+#endif  /* _LINUX_NULL_H */
diff --git a/include/linux/memberof.h b/include/linux/memberof.h
index 3853c91d1fb2..6c5eb70bc60f 100644
--- a/include/linux/memberof.h
+++ b/include/linux/memberof.h
@@ -2,6 +2,8 @@
 #ifndef _LINUX_MEMBEROF_H
 #define _LINUX_MEMBEROF_H
 
+#include <linux/NULL.h>
+
 
 #define memberof(T, m)   (((T *) NULL)->m)
 
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index ca507bd5f808..0fbbaa83a9d8 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -3,9 +3,8 @@
 #define _LINUX_STDDEF_H
 
 #include <uapi/linux/stddef.h>
+#include <linux/NULL.h>
 
-#undef NULL
-#define NULL ((void *)0)
 
 enum {
 	false	= 0,
-- 
2.33.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ