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>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0709271046180.763@alien.or.mcafeemobile.com>
Date:	Thu, 27 Sep 2007 10:48:47 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Michael Kerrisk <mtk-manpages@....net>
Subject: [patch] rename signalfd_siginfo fields


For Michael Kerrisk request, the following patch renames signalfd_siginfo 
fields in order to keep them consistent with the siginfo_t ones.



Signed-off-by: Davide Libenzi <davidel@...ilserver.org>


- Davide


---
 fs/signalfd.c            |   44 ++++++++++++++++++++++----------------------
 include/linux/signalfd.h |   32 ++++++++++++++++----------------
 2 files changed, 38 insertions(+), 38 deletions(-)

Index: linux-2.6.mod/fs/signalfd.c
===================================================================
--- linux-2.6.mod.orig/fs/signalfd.c	2007-09-27 10:31:48.000000000 -0700
+++ linux-2.6.mod/fs/signalfd.c	2007-09-27 10:33:45.000000000 -0700
@@ -74,45 +74,45 @@
 	 * If you change siginfo_t structure, please be sure
 	 * this code is fixed accordingly.
 	 */
-	err |= __put_user(kinfo->si_signo, &uinfo->signo);
-	err |= __put_user(kinfo->si_errno, &uinfo->err);
-	err |= __put_user((short)kinfo->si_code, &uinfo->code);
+	err |= __put_user(kinfo->si_signo, &uinfo->ssi_signo);
+	err |= __put_user(kinfo->si_errno, &uinfo->ssi_errno);
+	err |= __put_user((short) kinfo->si_code, &uinfo->ssi_code);
 	switch (kinfo->si_code & __SI_MASK) {
 	case __SI_KILL:
-		err |= __put_user(kinfo->si_pid, &uinfo->pid);
-		err |= __put_user(kinfo->si_uid, &uinfo->uid);
+		err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid);
+		err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid);
 		break;
 	case __SI_TIMER:
-		 err |= __put_user(kinfo->si_tid, &uinfo->tid);
-		 err |= __put_user(kinfo->si_overrun, &uinfo->overrun);
-		 err |= __put_user((long)kinfo->si_ptr, &uinfo->svptr);
+		 err |= __put_user(kinfo->si_tid, &uinfo->ssi_tid);
+		 err |= __put_user(kinfo->si_overrun, &uinfo->ssi_overrun);
+		 err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr);
 		break;
 	case __SI_POLL:
-		err |= __put_user(kinfo->si_band, &uinfo->band);
-		err |= __put_user(kinfo->si_fd, &uinfo->fd);
+		err |= __put_user(kinfo->si_band, &uinfo->ssi_band);
+		err |= __put_user(kinfo->si_fd, &uinfo->ssi_fd);
 		break;
 	case __SI_FAULT:
-		err |= __put_user((long)kinfo->si_addr, &uinfo->addr);
+		err |= __put_user((long) kinfo->si_addr, &uinfo->ssi_addr);
 #ifdef __ARCH_SI_TRAPNO
-		err |= __put_user(kinfo->si_trapno, &uinfo->trapno);
+		err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
 #endif
 		break;
 	case __SI_CHLD:
-		err |= __put_user(kinfo->si_pid, &uinfo->pid);
-		err |= __put_user(kinfo->si_uid, &uinfo->uid);
-		err |= __put_user(kinfo->si_status, &uinfo->status);
-		err |= __put_user(kinfo->si_utime, &uinfo->utime);
-		err |= __put_user(kinfo->si_stime, &uinfo->stime);
+		err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid);
+		err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid);
+		err |= __put_user(kinfo->si_status, &uinfo->ssi_status);
+		err |= __put_user(kinfo->si_utime, &uinfo->ssi_utime);
+		err |= __put_user(kinfo->si_stime, &uinfo->ssi_stime);
 		break;
 	case __SI_RT: /* This is not generated by the kernel as of now. */
 	case __SI_MESGQ: /* But this is */
-		err |= __put_user(kinfo->si_pid, &uinfo->pid);
-		err |= __put_user(kinfo->si_uid, &uinfo->uid);
-		err |= __put_user((long)kinfo->si_ptr, &uinfo->svptr);
+		err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid);
+		err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid);
+		err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr);
 		break;
 	default: /* this is just in case for now ... */
-		err |= __put_user(kinfo->si_pid, &uinfo->pid);
-		err |= __put_user(kinfo->si_uid, &uinfo->uid);
+		err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid);
+		err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid);
 		break;
 	}
 
Index: linux-2.6.mod/include/linux/signalfd.h
===================================================================
--- linux-2.6.mod.orig/include/linux/signalfd.h	2007-09-27 10:28:59.000000000 -0700
+++ linux-2.6.mod/include/linux/signalfd.h	2007-09-27 10:31:31.000000000 -0700
@@ -10,22 +10,22 @@
 
 
 struct signalfd_siginfo {
-	__u32 signo;
-	__s32 err;
-	__s32 code;
-	__u32 pid;
-	__u32 uid;
-	__s32 fd;
-	__u32 tid;
-	__u32 band;
-	__u32 overrun;
-	__u32 trapno;
-	__s32 status;
-	__s32 svint;
-	__u64 svptr;
-	__u64 utime;
-	__u64 stime;
-	__u64 addr;
+	__u32 ssi_signo;
+	__s32 ssi_errno;
+	__s32 ssi_code;
+	__u32 ssi_pid;
+	__u32 ssi_uid;
+	__s32 ssi_fd;
+	__u32 ssi_tid;
+	__u32 ssi_band;
+	__u32 ssi_overrun;
+	__u32 ssi_trapno;
+	__s32 ssi_status;
+	__s32 ssi_int;
+	__u64 ssi_ptr;
+	__u64 ssi_utime;
+	__u64 ssi_stime;
+	__u64 ssi_addr;
 
 	/*
 	 * Pad strcture to 128 bytes. Remember to update the
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ