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:	Wed, 4 Nov 2009 13:00:19 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Stefani Seibold <stefani@...bold.net>
Cc:	Andi Kleen <andi@...stfloor.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Americo Wang <xiyou.wangcong@...il.com>
Subject: Re: [PATCH] update fix X86_64 procfs provide stack information for threads

> This is true, but i think it is better to get an outdated value than a
> complete wrong value like -1.

-1 means "I don't know".  I don't think "completely wrong" 
is the correct term to describe that.

> The truth is that KSTK_ESP always return an outdated value on a multi
> core system if the process never do a system call.

I think not supporting updates on interrupts at least is very poor.
Unfortunately there's no good way fast path way to detect this I know of
(that is why I originally added -1 here)

> Question: is task_pt_regs(task)->sp set in 64 bit mode when the process
> is blocked in an interrupt? If true, we can add two additional assembly
> instruction to the system call handler and store the stack pointer into
> this. Than KSTK_ESP wil be again a simple macro like

You want to add instructions to one of the hottest kernel paths
for this hyper-obscure application?  Bad idea.

> The drawback is that this will cost a litte bit performance for a litte
> bit more accuracy.

As far as I can figure out this whole proc hack is never accurate
anyways, because it can report arbitarily outdated (or completely bogus
if the process never did any system calls/interrupts) information.

My recommendation would be to just deprecate this proc field
and if anyone really wants that information they can use
a trivial ptrace() based user program.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only.
--
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