lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Jul 2006 13:02:29 -0400
From:	Chuck Ebbert <76306.1226@...puserve.com>
To:	Al Boldi <a1426z@...ab.com>
Cc:	Paulo Marques <pmarques@...popie.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Frank van Maarseveen <frankvm@...nkvm.com>
Subject: Re: [PATCH] x86: Don't randomize stack unless
  current->personality permits it

In-Reply-To: <200607180821.45346.a1426z@...ab.com>

On Tue, 18 Jul 2006 08:21:45 +0300. Al Boldi wrote:

> Going one step further,
> with #define arch_stack_align(x) (x)
> all blips/hits/weirdness are gone
> 
> Which means that either arch_stack_align isn't necessary at all, or 
> randomization isn't working as intended.
> 
> Can somebody prove me wrong here?

Your program seems highly sensitive to any changes, e.g. with the
following code, results with and without the commented lines are
different.  (I changed i to 5555555 because my cpu is slower than
yours and changed main() to call it 10 times.)  This on an AMD
Turion64 1.6GHz running an i386 kernel with stock arch_stack_align()
and randomize_va_space == 1.

void fn()
{
        double x = 0.0, y = 0.0;
        long i = 5555555;
//      static int printed = 0;
//
//      if (!printed) {
//              printed++;
//              printf("&x = %p, &y = %p\n", &x, &y);
//      }

        elapsed(1);
        while (i--)
                fn2(&x,&y);
        printf("%4lu ", elapsed(0));
}

$ ./tst.ex
&x = 0xbfb32d90, &y = 0xbfb32d98
  10    6   10   10    6   10    7   10   10   10   10   10   10   10   10   10   10   10   10   10 msec
$ ./tst.ex
   7   10    6    6    6    6   10   10    6    6    6   10   10    6    6    6    6   10    6    6 msec

BTW when compiled with gcc 4.1.1 using -O3 it just prints all zeros,
so I had to use 3.3.3.
-- 
Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ