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]
Message-ID: <18539.27303.187681.716560@cargo.ozlabs.ibm.com>
Date:	Wed, 2 Jul 2008 21:46:47 +1000
From:	Paul Mackerras <paulus@...ba.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	greg@...ah.com
Subject: Re: Is sysfs the right place to get cache and CPU topology info?

Andrew Morton writes:

> Oh.  I thought "they" (or you) were proposing adding some new
> topology-exporting files to sysfs.

I was proposing adding them on powerpc using the same format and
location as x86 already uses.  That way the HPC library can use the
one parsing routine on both x86 and powerpc.

> If they're talking about using the existing ones then sure, those are
> cast in stone as far as I'm concerned.
> 
> But they do need to be a _bit_ defensive.  If they see a file which has
> multiple name:value fields (shouldn't happen) then don't fail if new
> tuples turn up later on.  Don't expect them to always be in the same
> order.  Don't fail if new files later turn up in a sysfs directory.  If
> a file has (a stupid) format like /proc/self/stat then be prepared for
> new columns to appear later on, etc.
> 
> But if basic and obvious steps like that are taken in the library, and
> later kernel changes cause that library to break, we get to fix the
> kernel to unbreak their library.

I assume they can rely on finding the stuff they need under
/sys/devices/system/cpu.  Or do they need to traverse the whole of
/sys, and if so, how would they know which directories they should be
looking in?

Paul.
--
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