From: Ralf Baechle <ralf@linux-mips.org>
To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: [RFC] User stack pointer randomisation
Date: Thu, 19 Jul 2007 13:01:30 +0100 [thread overview]
Message-ID: <20070719120130.GB16258@linux-mips.org> (raw)
In-Reply-To: <cda58cb80707190447m1cd9b37fye7d330b50331b199@mail.gmail.com>
On Thu, Jul 19, 2007 at 01:47:19PM +0200, Franck Bui-Huu wrote:
> this is weird I would have defined them like this instead:
>
> #if (_MIPS_SIM == _MIPS_SIM_ABI32)
> #define ALSZ 8
> #elif (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
> #define ALSZ 16
> #endif
>
> #define ALMASK (~(ALSZ-1))
<asm/asm.h> which is fairly similar to it's userspace equivalent <sys/asm.h>
contains definitions which are some sort of pseudo-standard in the MIPS
world, including ALSZ and ALMASK. If I had choosen them I'd have set
ALSZ to 8 rsp. 16, just like you ... Anyway, having similar macros makes
porting of assembler code easier. This also is why <asm/regdef.h> and
<asm/fpregdef.h> are as they are. RISC/os, IRIX, some of the BSD variants,
even the non-Linux SDE variants for example for baremetal use a similar
set of macros and headers.
Ralf
next prev parent reply other threads:[~2007-07-19 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 7:10 [RFC] User stack pointer randomisation Franck Bui-Huu
2007-07-19 9:43 ` Nigel Stephens
2007-07-19 11:36 ` Franck Bui-Huu
2007-07-19 11:14 ` Ralf Baechle
2007-07-19 11:47 ` Franck Bui-Huu
2007-07-19 12:01 ` Ralf Baechle [this message]
2007-07-19 12:19 ` Franck Bui-Huu
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=20070719120130.GB16258@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=vagabon.xyz@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox