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-next>] [day] [month] [year] [list]
Date:   Mon, 20 Sep 2021 10:56:48 +0100
From:   Gaelan Steele <gbs@...ishe.com>
To:     Alexander Viro <viro@...iv.linux.org.uk>
Cc:     linux-man@...r.kernel.org,
        Michael Kerrisk <mtk.manpages@...il.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-api@...r.kernel.org, Gaelan Steele <gbs@...ishe.com>
Subject: [PATCH 1/2] fs: move struct linux_dirent into headers

Move the definition of linux_dirent to include/linux/dirent.h,
where the newer linux_dirent64 already lives. This is done in
preparation for moving both of these struct definitions into uapi/
so userspace code doesn't need to duplicate them.

Signed-off-by: Gaelan Steele <gbs@...ishe.com>
---
 fs/readdir.c           | 8 +-------
 include/linux/dirent.h | 7 +++++++
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/fs/readdir.c b/fs/readdir.c
index 09e8ed7d4161..51890aeafc53 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -202,14 +202,8 @@ SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
 
 /*
  * New, all-improved, singing, dancing, iBCS2-compliant getdents()
- * interface. 
+ * interface.
  */
-struct linux_dirent {
-	unsigned long	d_ino;
-	unsigned long	d_off;
-	unsigned short	d_reclen;
-	char		d_name[1];
-};
 
 struct getdents_callback {
 	struct dir_context ctx;
diff --git a/include/linux/dirent.h b/include/linux/dirent.h
index 99002220cd45..48e119dd3694 100644
--- a/include/linux/dirent.h
+++ b/include/linux/dirent.h
@@ -2,6 +2,13 @@
 #ifndef _LINUX_DIRENT_H
 #define _LINUX_DIRENT_H
 
+struct linux_dirent {
+	unsigned long	d_ino;
+	unsigned long	d_off;
+	unsigned short	d_reclen;
+	char		d_name[1];
+};
+
 struct linux_dirent64 {
 	u64		d_ino;
 	s64		d_off;
-- 
2.30.1 (Apple Git-130)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ