Re: [PATCH] Stackgap
From: Doug Rabson (dfr_at_nlsystems.com)
Date: 05/29/05
- Previous message: Poul-Henning Kamp: "Re: MPSAFE CAM?"
- In reply to: Robert Watson: "Re: [PATCH] Stackgap"
- Next in thread: Doug Rabson: "Re: [PATCH] Stackgap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: freebsd-arch@freebsd.org Date: Sun, 29 May 2005 15:07:49 +0100
On Saturday 28 May 2005 15:10, Robert Watson wrote:
> On Fri, 27 May 2005, Suleiman Souhlal wrote:
> > You can find an implementation of stackgap from OpenBSD at http://
> > people.freebsd.org/~ssouhlal/testing/stackgap-20050527.diff
> >
> > You can control the range of the random stack gap with the
> > kern.stackgap_random sysctl. A value of 0 disables it. Otherwise,
> > it has to be a power of 2 and not too large. The default value is
> > 64K.
> >
> > I've only had the chance to test this on i386. Could anyone test it
> > on other architectures as well?
> >
> > Any comments/objections?
>
> In the past, substantial performance hits have been measured due to
> poor stack alignment. Specifically, in combination with less optimal
> compiler behavior, the results have been pretty nasty. Have you
> tried micro-benchmarking a series of runs with this stack offset
> randomness using floating point on stack arguments to see if there's
> a measurable cost to moving the stack around? Hopefull if all is
> well, there will be little or no difference, but a small error here
> could result in a substantial performance hit...
I recently modified the crt code to force the stack alignment to 16
bytes on startup (so that I could safely write code that uses movaps).
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Poul-Henning Kamp: "Re: MPSAFE CAM?"
- In reply to: Robert Watson: "Re: [PATCH] Stackgap"
- Next in thread: Doug Rabson: "Re: [PATCH] Stackgap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: [PATCH] Stackgap
... > poor stack alignment. ... > a measurable cost to moving the stack
around? ... I recently modified the crt code to force the stack alignment to 16
... (freebsd-arch) - Re: [PATCH] Stackgap
... >> You can find an implementation of stackgap from OpenBSD at http:// ...
> poor stack alignment. ... > offset randomness using floating point on stack
arguments to see if ... > there's a measurable cost to moving the stack around? ...
(freebsd-arch)