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: <174786677639.1383760.16546264802006958473.stgit@frogsfrogsfrogs>
Date: Wed, 21 May 2025 15:36:13 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 05/29] fuse2fs: compact all the boolean flags in struct
 fuse2fs

From: Darrick J. Wong <djwong@...nel.org>

Compact all the booleans into u8 fields.  I'd go further and turn them
into bitfields but that breaks the fuse argument parsing macros, which
compute the offset of the structure fields, and gcc won't let us do that
to bit fields.  Still, 136 -> 112 bytes isn't bad.

Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
 misc/fuse2fs.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)


diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 3e78b6b13fa7bb..40bb223d50c4fe 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -150,16 +150,16 @@ struct fuse2fs {
 	pthread_mutex_t bfl;
 	char *device;
 	char *shortdev;
-	int ro;
-	int debug;
-	int no_default_opts;
-	int panic_on_error;
-	int minixdf;
-	int fakeroot;
-	int alloc_all_blocks;
-	int norecovery;
-	int kernel;
-	int directio;
+	uint8_t ro;
+	uint8_t debug;
+	uint8_t no_default_opts;
+	uint8_t panic_on_error;
+	uint8_t minixdf;
+	uint8_t fakeroot;
+	uint8_t alloc_all_blocks;
+	uint8_t norecovery;
+	uint8_t kernel;
+	uint8_t directio;
 	unsigned long offset;
 	unsigned int next_generation;
 	unsigned long long cache_size;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ