Stackgap support

Matthew Dillon dillon at apollo.backplane.com
Wed Jun 22 11:15:45 PDT 2005


:
:On Wed, Jun 22, 2005 at 09:57:15AM -0400, Craig Dooley wrote:
:> Just as a quick update, after looking at the FreeBSD patches made by
:> Suleiman Souhlal, this line
:> sgap += (ALIGN(arc4random())) & (stackgap_random - 1);
:> should be
:> sgap += ALIGN(arc4random() & (stackgap_random - 1));
:
:Actually:
:sgap = ALIGN(arc4random() & (stackgap_random - 1));
:
:Joerg

    Not to mention that the int sgap = 0 at the top should just be
    int sgap, and then an else clause to set it to zero if stackgap_random
    is 0.  And the comment is incorrect as well, there is no STACKGAPLEN.

    So a little work is needed here, but otherwise the concept is just 
    fine.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Submit mailing list