projects
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c107b3
)
cvs-cpuid-level2
author
GNU Libc Maintainers
<debian-glibc@lists.debian.org>
Sun, 4 Dec 2016 21:49:53 +0000
(21:49 +0000)
committer
Samuel Thibault
<sthibault@debian.org>
Sun, 4 Dec 2016 21:49:53 +0000
(21:49 +0000)
2016-10-12 H.J. Lu <hongjiu.lu@intel.com>
[BZ #20647]
* sysdeps/x86/cacheinfo.c (handle_intel): Return -1 if the
maximum CPUID level is less than 2.
Gbp-Pq: Topic i386
Gbp-Pq: Name cvs-cpuid-level2.diff
sysdeps/x86/cacheinfo.c
patch
|
blob
|
history
diff --git
a/sysdeps/x86/cacheinfo.c
b/sysdeps/x86/cacheinfo.c
index cf4f64b0d8e2a4ab7cc7a3d7c96e28b42c0dcb61..35268e8d9af98f30397e6e3bc37386f1c79e5635 100644
(file)
--- a/
sysdeps/x86/cacheinfo.c
+++ b/
sysdeps/x86/cacheinfo.c
@@
-259,7
+259,9
@@
intel_check_word (int name, unsigned int value, bool *has_level_2,
static long int __attribute__ ((noinline))
handle_intel (int name, unsigned int maxidx)
{
- assert (maxidx >= 2);
+ /* Return -1 for older CPUs. */
+ if (maxidx < 2)
+ return -1;
/* OK, we can use the CPUID instruction to get all info about the
caches. */