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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Apr 2007 19:01:26 +0200
From:	John Sigler <linux.kernel@...e.fr>
To:	unlisted-recipients:; (no To-header on input)
CC:	linux-kernel@...r.kernel.org
Subject: Re: Disabling x86 System Management Mode

John Sigler wrote:

> static int hello_init(void)
> {
>   int i;
>   int *lat;
>   printk(KERN_ALERT "INIT\n");
>   lat = kmalloc(MAX * sizeof *lat, GFP_KERNEL);
>   if (lat == NULL) return -1;
>   for (i=0; i < MAX; ++i) lat[i] = 0;
>   for (i=0; i < 5; ++i) foo();
>   for (i=0; i < N; ++i)
>   {
>     unsigned count, res;
>     set_current_state(TASK_INTERRUPTIBLE);
>     schedule_timeout(1);
>     foo();
>     local_irq_disable();
>     count = foo();
>     local_irq_enable();
>     res = count >> 8;
>     if (res < MAX) ++lat[res]; else printk(KERN_ALERT "OUT OF RANGE\n");
>   }
> 
>   for (i=0; i < MAX; ++i)
>     if (lat[i] != 0) printk(KERN_ALERT "%d %d\n", i<<8, lat[i]);

kfree(lat);

>   return 0;
> }

-
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