diff mbox series

[01/22] struct dentry: get rid of randomize_layout idiocy

Message ID 20231109062056.3181775-1-viro@zeniv.linux.org.uk (mailing list archive)
State New
Headers show
Series [01/22] struct dentry: get rid of randomize_layout idiocy | expand

Commit Message

Al Viro Nov. 9, 2023, 6:20 a.m. UTC
This is beyond ridiculous.  There is a reason why that thing is
cacheline-aligned...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 include/linux/dcache.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian Brauner Nov. 9, 2023, 1:33 p.m. UTC | #1
On Thu, Nov 09, 2023 at 06:20:35AM +0000, Al Viro wrote:
> This is beyond ridiculous.  There is a reason why that thing is
> cacheline-aligned...
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---

Yeah, lenient annotation with this stuff makes a bunch of structures
with carefully chosen layouts pretty meaningless.

The thing is that it doesn't matter for most cases as every regular
distro afaict sets CONFIG_RANDSTRUCT_NONE=y which means layout
randomization isn't applied.

In any case,
Reviewed-by: Christian Brauner <brauner@kernel.org>
diff mbox series

Patch

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 6b351e009f59..8b4ad3c3bba0 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -111,7 +111,7 @@  struct dentry {
 		struct hlist_bl_node d_in_lookup_hash;	/* only for in-lookup ones */
 	 	struct rcu_head d_rcu;
 	} d_u;
-} __randomize_layout;
+};
 
 /*
  * dentry->d_lock spinlock nesting subclasses: