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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433000370-19509-98-git-send-email-mikko.rapeli@iki.fi>
Date:	Sat, 30 May 2015 17:39:29 +0200
From:	Mikko Rapeli <mikko.rapeli@....fi>
To:	linux-kernel@...r.kernel.org
Cc:	Mikko Rapeli <mikko.rapeli@....fi>, linux-api@...r.kernel.org
Subject: [PATCH 97/98] HACK include/uapi/linux/elfcore.h: use __kernel_pid_t and remove elf_greg_t stuff in userspace

__kernel_pid_t change feels like right one. Commenting out elf_greg_t
things in userspace does not but exporting x86/include/asm/elf.h and its
dependencies to userspace does not feel right either. Hence HACK.

Fixes userspace compilation errors like:

error: unknown type name ‘elf_greg_t’
 typedef elf_greg_t greg_t;
error: unknown type name ‘pid_t’
  pid_t pr_pid;

Signed-off-by: Mikko Rapeli <mikko.rapeli@....fi>
---
 include/uapi/linux/elfcore.h | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/include/uapi/linux/elfcore.h b/include/uapi/linux/elfcore.h
index 569737c..b9d1233 100644
--- a/include/uapi/linux/elfcore.h
+++ b/include/uapi/linux/elfcore.h
@@ -17,11 +17,13 @@ struct elf_siginfo
 
 
 #ifndef __KERNEL__
+#if 0
 typedef elf_greg_t greg_t;
 typedef elf_gregset_t gregset_t;
 typedef elf_fpregset_t fpregset_t;
 typedef elf_fpxregset_t fpxregset_t;
 #define NGREG ELF_NGREG
+#endif /* 0 */
 #endif
 
 /*
@@ -48,10 +50,10 @@ struct elf_prstatus
 	struct sigaltstack pr_altstack;	/* Alternate stack info */
 	struct sigaction pr_action;	/* Signal action for current sig */
 #endif
-	pid_t	pr_pid;
-	pid_t	pr_ppid;
-	pid_t	pr_pgrp;
-	pid_t	pr_sid;
+	__kernel_pid_t	pr_pid;
+	__kernel_pid_t	pr_ppid;
+	__kernel_pid_t	pr_pgrp;
+	__kernel_pid_t	pr_sid;
 	struct timeval pr_utime;	/* User time */
 	struct timeval pr_stime;	/* System time */
 	struct timeval pr_cutime;	/* Cumulative user time */
@@ -59,7 +61,9 @@ struct elf_prstatus
 #if 0
 	long	pr_instr;		/* Current instruction */
 #endif
+#ifdef __KERNEL__
 	elf_gregset_t pr_reg;	/* GP registers */
+#endif /* __KERNEL__ */
 #ifdef CONFIG_BINFMT_ELF_FDPIC
 	/* When using FDPIC, the loadmap addresses need to be communicated
 	 * to GDB in order for GDB to do the necessary relocations.  The
@@ -84,7 +88,7 @@ struct elf_prpsinfo
 	unsigned long pr_flag;	/* flags */
 	__kernel_uid_t	pr_uid;
 	__kernel_gid_t	pr_gid;
-	pid_t	pr_pid, pr_ppid, pr_pgrp, pr_sid;
+	__kernel_pid_t	pr_pid, pr_ppid, pr_pgrp, pr_sid;
 	/* Lots missing */
 	char	pr_fname[16];	/* filename of executable */
 	char	pr_psargs[ELF_PRARGSZ];	/* initial part of arg list */
-- 
2.1.4

--
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