From: "H. J. Lu" <hjl@lucon.org>
To: linux kernel <linux-kernel@vger.kernel.org>
Subject: PATCH: Define auxiliary vector size, AT_VECTOR_SIZE
Date: Tue, 26 Jul 2005 14:05:56 -0700 [thread overview]
Message-ID: <20050726210556.GA4663@lucon.org> (raw)
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;
reply other threads:[~2005-07-26 21:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050726210556.GA4663@lucon.org \
--to=hjl@lucon.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.