* PATCH: Define auxiliary vector size, AT_VECTOR_SIZE
@ 2005-07-26 21:05 H. J. Lu
0 siblings, 0 replies; only message in thread
From: H. J. Lu @ 2005-07-26 21:05 UTC (permalink / raw)
To: linux kernel
The size of auxiliary vector is fixed at 42 in linux/sched.h. But
it isn't very obvious when looking at linux/elf.h. This patch adds
AT_VECTOR_SIZE so that we can change it if necessary when a new
vector is added.
H.J.
--- linux/include/linux/elf.h.auxv 2004-10-18 14:53:22.000000000 -0700
+++ linux/include/linux/elf.h 2005-07-26 10:39:26.000000000 -0700
@@ -178,6 +178,8 @@ typedef __s64 Elf64_Sxword;
#define AT_SECURE 23 /* secure mode boolean */
+#define AT_VECTOR_SIZE 42 /* Size of auxiliary table. */
+
typedef struct dynamic{
Elf32_Sword d_tag;
union{
--- linux/include/linux/sched.h.auxv 2005-07-19 09:01:33.000000000 -0700
+++ linux/include/linux/sched.h 2005-07-26 10:41:08.000000000 -0700
@@ -30,6 +30,8 @@
#include <linux/pid.h>
#include <linux/percpu.h>
+#include <linux/elf.h> /* For AT_VECTOR_SIZE */
+
struct exec_domain;
extern int exec_shield;
extern int exec_shield_randomize;
@@ -238,7 +240,7 @@ struct mm_struct {
unsigned long rss, anon_rss, total_vm, locked_vm, shared_vm;
unsigned long exec_vm, stack_vm, reserved_vm, def_flags;
- unsigned long saved_auxv[42]; /* for /proc/PID/auxv */
+ unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */
unsigned dumpable:2;
cpumask_t cpu_vm_mask;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-26 21:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26 21:05 PATCH: Define auxiliary vector size, AT_VECTOR_SIZE H. J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox