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: <36ca99e90803290159v33ab43cbu5acd4bc2b0cd0262@mail.gmail.com>
Date:	Sat, 29 Mar 2008 09:59:26 +0100
From:	"Bert Wesarg" <bert.wesarg@...glemail.com>
To:	"Mike Travis" <travis@....com>
Cc:	"Ingo Molnar" <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cacheinfo

On Fri, Mar 28, 2008 at 7:19 PM, Mike Travis <travis@....com> wrote:
>  > Aren't the most cpumaps (like cpu/cpu*/topology/*_siblings or
>  > node/node*/cpumap) bitmasks?
>
>  I did an informal survey and you are right, the majority of references do use
>  cpumask_scnprintf instead of cpulist_scnprintf.  Maybe the later function was
>  added later?
>
>  To me though, it would seem that:
>
>  240-255
>
>  is more readable than:
>
>  00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000ffff
>
>  And as I mentioned, bitmask_parselist() [libbitmask(3)] does parse the output.
But libbitmask has a bitmask_parsehex() too. (but thanks for the
pointer to this code).

Anyway, your above example is wrong, the most significant bits comes first:

ffff0000,00000000,00000000,00000000,00000000,00000000,00000000,00000000

This makes it not more readable, but I think readability isn't in this
case of that much importance.

I further think, this problem could be easily solved, if NR_CPUS and
possibly your nr_cpus_ids is somehow exported to user space.

With this information, the user is not surprised to see more that 1024
bits (=CPU_SETSIZE, which is currently the glibc constant for the
sched_{set,get}affinity() API). Also the glibc has the new variable
cpu_set_t size API (since 2.7).

Bert
>
>  Thanks,
>  Mike
>
--
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