Samsung Chromebook Pro/Asus C302CA/etc. -- Intel Hyperthreading Bug? - Chromebooks

Hey y'all.
As you may have heard, there's apparently a nasty bug in hyperthreading that affects a lot of kaby lake and skylake Intel processors. I was curious if, as a week-old owner of a Chromebook Pro, I was affected. There's a perl script you can run to see if this will affect your device. Unfortunately, perl isn't built-into my chromebook, so I quickly and sloppily converted it to bash. I'm sad to report that, at least according to this script which was based on the debian post above, the bug does exist on the Chromebook Pro and, as of the current (6/25/17) canary build of Chrome, is unfixed. I guess to do so, the intel microcode needs to be updated from 0x8a to at least 0xb9. Dunno if the debian installer can be used, but I can only assume Google's on it.
There appear to be a number of chromebooks that might be (?) hit by this. If I'm not mistaken the asus c302ca has the same or similar m3 processor, for example. Dunno, but if you want to test your Intel chromebook, I think you can just go to ctrl-alt-T, get a shell, then pipe the script through bash. This way you don't have to worry about saving the file anywhere (on a read-only system). To do this, you'd do something like:
$ curl https://gist.githubusercontent.com/...e89a37585d6752de0a38f6c6a2449/intelchecker.sh | bash
Output:
Checking your CPUs....
cpu 0:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. You should install the latest intel-microcode.
Yours is version 0x8a (138), but you should have at least 0xb9 (185).
cpu 1:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. You should install the latest intel-microcode.
Yours is version 0x8a (138), but you should have at least 0xb9 (185).
cpu 2:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. You should install the latest intel-microcode.
Yours is version 0x8a (138), but you should have at least 0xb9 (185).
cpu 3:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. You should install the latest intel-microcode.
Yours is version 0x8a (138), but you should have at least 0xb9 (185).
HOWEVER, A WARNING: it's never EVER a good habit to just download stuff off the internet and run right away. So read the code first and make sure it's kosher before you run it. There may be (let's face it, probably are) bugs. For one thing, I noticed that it gives slightly different output sometimes when it runs, probably due to reading and sedding /proc/cpuinfo on the fly.
This isn't a project I want to spend a lot of time on, so run it a few times to verify the output , or for pete's sake just look at /proc/cpuinfo to determine if you're affected and follow debian's advice here. As I said i converted this to bash because I knew it was going to be natively on all Chromebooks whereas at least typing "perl", perl couldn't be found. I should have converted this to python--I don't know what I was thinking. Bash is terrible (I just learned) w/regular expressions. Anyway, I tested it on a raspberry pi, an old PC, a mac, and an affected chromebook and I think it worked. It's GPLd, and you are advised to run at your own risk.
You can read more on hacker news. If anyone notices any bugs I'll update the script and this post. Cheers.
Update: Reported to Google. If this affects your device, consider starring it so that Google notices it and hopefully fixes it.

Update: Looks like with the new dev release today, this has been fixed! The new microcode revision is 0xba, which is greater than 0xb9, which was the minimum needed for the fix
Checking your CPUs....
cpu 0:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. BUT your microcode is new enough
cpu 1:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. BUT your microcode is new enough
cpu 2:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. BUT your microcode is new enough
cpu 3:
It's an Intel. Checking model & stepping...
Your CPU is affected by the issue. BUT your microcode is new enough
Nice.

Related

[Q] Tegra2 dual core?

How can I tell if my gtab is using both cores of the tegra2? When I run Quadrant, it only reports 1 core.
TIA
lpsisrl said:
How can I tell if my gtab is using both cores of the tegra2? When I run Quadrant, it only reports 1 core.
TIA
Click to expand...
Click to collapse
Currently the Roms only are utilizing one core. The devs would have to spend hours trying to create and Open source OS to support dual core. It is in the process as i understand and will see something soon.
Does the stock ROM support both cores? If it doesn't, why in the world would they release the gtab with only half a brain? I mean, what's the point of using the Tegra2 if only one core is enabled?
I don't think that's accurate. I'm running the latest Ginger Vegan which uses Pershoot's kernel. The uname -a tell me the kernel is SMP (symetric multi processing).
Doing cat /proc/cpuinfo from a shell shows me two cores, processor 0 and processor 1. So the Linux underneath is using both cores. Now I don't know how you define "use both cores" -- I would expect Dalvik to use threads that gets scheduled by the OS but I don't know that for sure.
But I think it is using the dual cores, at least to some degree.
lpsisrl said:
Does the stock ROM support both cores? If it doesn't, why in the world would they release the gtab with only half a brain? I mean, what's the point of using the Tegra2 if only one core is enabled?
Click to expand...
Click to collapse
Because Android 2.2 was not written with more than one core in mind.
If you were to use one of the several gingerbread themed roms/kernels you would see more than one core is active.. however.. very few software titles utilize more than one core so it's use is limited.
Read this:
http://www.nvidia.com/content/PDF/t...-Multi-core-CPUs-in-Mobile-Devices_Ver1.2.pdf
It does mention Android 2.2.
Like I said, the real issue is twofold. First the underlying OS (Linux) needs to support it. If you've upgraded a kernel here I am sure it does. Not sure about total stock.
Then it depends if the Android not-Java (Dalvik) handles multiple processes and threads. That may or may not vary (certainly from Eclair to Froyo was a major JIT change in Dalvik; not sure about Froyo to Gingerbread). So let's do a thought experiment. Assume the OS handles multiple processors. Even if nothing else is "right" you will get some help because the OS runs processes and threads to do various things.
But the real boost would come in running the Java code. Historically, Java is run by a JVM. So there are a few possible models:
1) JVM is one process and executes all apps and their threads in a single OS thread. Very little benefit for multiple processors in this case.
2) JVMs are spawned for each app and runs all threads for one app in a single thread. Multiple processors would help you run multiple things at once, but not much benefit to running a single program.
3) Single JVM executes each app's threads in separate OS threads. Great potential boost to have multiprocessors. Each app can be in its own process or not. Doesn't really matter. The OS schedules threads in either case.
4) Multiple JVMs execute each app and each app thread is an OS thread. Still good. Some memory waste although since most of the JVM is sharable not too bad. Multiple processors are good here too.
Reading this it appears that #4 is the case: http://davidehringer.com/software/android/The_Dalvik_Virtual_Machine.pdf
I've read elsewhere there may be a limit of 6 Davlik JVMs running at once but I couldn't find that just now.
It's not your tab or the ROM that doesn't support dual-core. It's Quadrant that only supports a single core. Programs must be written to take advantage of the dual cores, that's why you have things like the "Tegra Zone" for apps that maximize the capabilities of the chip.
OK, so what I'm getting is that we really don't know running this gtablet Froyo with TNT Lite 4.4 is actually using both cores?
OK, try this benchmark app:
https://market.android.com/details?id=com.balbadac.mandrobench&feature=search_result
It runs some single-threaded tests, then repeats them dual-threaded and compares the results. Mine showed a 86% improvement between single-core and dual-core tests.
lpsisrl said:
OK, so what I'm getting is that we really don't know running this gtablet Froyo with TNT Lite 4.4 is actually using both cores?
Click to expand...
Click to collapse
Huh? I think I said it was, depending on your definition of using.

Parallella super computer, compiling android?

Does anyone know if the computer spoken about here http://www.kickstarter.com/projects...a-supercomputer-for-everyone?ref=home_popular would be able to compile android if it were running linux??
You would need to get all the tools for teh build system running for arm. I'm pretty sure most of it has been done (gcc, python, bash) because there is a ubuntu built for the arm cpu. The specs on that thing even say it will come with ubuntu on it,. I'm not sure if the jdk is done yet for arm.
I think you're gonna hit a wall with 1GB of ram easily. The operating system youre using will probably take up 1/4 to 1/3 of it. Go around and look at the requirements to build projects like firefox and openoffice. Last time I saw it, firefox needed like 3GB of ram for the linker. You can get a huge SD card and use it as swap space, but thats gonna slow down all those 64 cores. Next up is the disk interface. It has usb2, which is capped at 480MB/s [citation needed]. It doesn't benefit you at all that your cpu can build a bunch of source files at once if it gets bottlenecked at reading those source files from and writing the object files to the hard drive.
I say you probably will be able to get it to build android, but it wont be lightning fast, or really even remarkably fast. By the time you buy that thing for $99, and a keyboard, mouse, usb HDD, SD card, HDMI monitor, and whatever else you need to actually use it, you could have bought a "traditional" computer that has SATA and > 1GB of ram.
noneabove said:
Does anyone know if the computer spoken about here http://www.kickstarter.com/projects...a-supercomputer-for-everyone?ref=home_popular would be able to compile android if it were running linux??
Click to expand...
Click to collapse
No, it will not.
Compiling isn't a task suitable for such a parallel computer. Compiling is mostly I/O intense, not CPU intense, hence you would not gain anything here, even if you'd be able to distribute the compiling task to multiple cores, which is by itself not a trivial task if we are talking about more than a handful of cores.
Also, you don't need a project like this to run a parallel super computer. You can run in parallel on modern graphics cards today. E.g. get a NVIDIA GPU and start using CUDA, and you'll get the idea what it's all about.
Parallel supercomputing is more suitable for specific CPU intense task such as FFT, flow analysis, brute forcing crypto, neural nets and such, where you've got a relative limited amount of data in comparison to the amount CPU needed.
As has been said, much return (financial and performance) and less work to implement with CUDA.
example of the outrageous performance of a system CUDA:
with a password cracking software, with a core i5 was 125 000 operations / s ... to enable support Cuda software, has become more than 8 million / s

Qualcomm hardware cryptographic engine doesn´t work on Z5C?

Hello,
i just got my Z5C yesterday and so far i´m more than happy. But there is one issue:
I use the AOSP Full disk encryption on the phone but it seems like the native Qualcomm hardware cryptographic engine doesn´t work well - i benchmarked the internal storage before and after, here are the results:
Before: read ~ 200 MB/s write: ~ 120 MB/s
After: read ~ 120 MB/s write: ~ 120 MB/s
(Benchmarked by A1 SD Bench)
I´m using a FDE on my windows 10 Notebook with an e-drive resulting in like 5% performance loss. The decrease in read-speed on the Z5C is noticable. What do you think, is there something wrong or is this a normal behaviour?
Cheers
I don't know if this helps, but it seems that the Nexus 5X and 6P won't use hardware encryption according to this:
DB> Encryption is software accelerated. Specifically the ARMv8 as part of 64-bit support has a number of instructions that provides better performance than the AES hardware options on the SoC.
Click to expand...
Click to collapse
Source: The Nexus 5X And 6P Have Software-Accelerated Encryption, But The Nexus Team Says It's Better Than Hardware Encryption
So maybe, Sony is following the same path...
Sadly they don't, it seems like the write-speed decrease is just on the same level as the N6 back then. Let's hope that they include the bibs in the kernel by the marshmellow update.
Why would they use Qualcomms own crappy crypto engine, if the standard Cortex-A57 is really fast with AES thanks to NEON and possibly additional, newer optimizations/instructions? AFAIK the latter are supported in newer Linux kernels per default, so there's no need to use additional libraries to enable support or the Qualcomm crypto stuff.
But it would be nice, if someone with actual insight and detailed knowledge about this could say a few words for clarification.
Neither i got insight nor big knowledge, but i benchmarked the system and like 60% loss in reading speed doesn't feels like a optimized kernel either :/
Qualcomm is a no go. On android plaform, only Exynos 7420(not sure about 5xxx series) real get used h/w encry and decry engine and no speed down.
TheEndHK said:
Qualcomm is a no go. On android plaform, only Exynos 7420(not sure about 5xxx series) real get used h/w encry and decry engine and no speed down.
Click to expand...
Click to collapse
That's not only off topic, it's also wrong. The Exynos SoCs don't have a substantially different crypto engine or "better"/"faster" crypto/hashing acceleration via the ARM cores. If anything, the Samsung guys are smart enough to optimize their software so it makes use of the good hardware. This seems to be missing here, but for no obvious reason.
xaps said:
That's not only off topic, it's also wrong. The Exynos SoCs don't have a substantially different crypto engine or "better"/"faster" crypto/hashing acceleration via the ARM cores. If anything, the Samsung guys are smart enough to optimize their software so it makes use of the good hardware. This seems to be missing here, but for no obvious reason.
Click to expand...
Click to collapse
I agreed all ARMv8-A cpu support hardware AES and SHA. Both Exynos 7420 and S810 should also got that ability but it turns out doesn't work on Z5c now which is a fact. I'm sure S6 got it working but not sure about on other S810 phones or might be Qualcomm missing driver support.
TheEndHK said:
Both Exynos 7420 and S810 should also got that ability but it turns out doesn't work on Z5c now which is a fact.
Click to expand...
Click to collapse
Please show us the kernel source code proving that fact.
What you call "fact" is the result of a simple before and after comparison done with a flash memory benchmark app run by one person on one device. To draw the conclusion that the only reason for the shown result is that the Z5(c) can't do HW acceleration of AES or SHA is a bit far-fetched, don't you think?
xaps said:
Please show us the kernel source code proving that fact.
What you call "fact" is the result of a simple before and after comparison done with a flash memory benchmark app run by one person on one device. To draw the conclusion that the only reason for the shown result is that the Z5(c) can't do HW acceleration of AES or SHA is a bit far-fetched, don't you think?
Click to expand...
Click to collapse
I've got a S6 and no slower after encry/decry and we had a thread discussing about it on S6 board.
I don't own a Z5c now bcoz my living place HK not yet started to sell it(I come to here bcoz considering to sell my S6 and Z1c and swap to Z5c later) so I can't test it but according to OP, there is a substantial slow down.
All ARMv8-A should support hardware AES/SHA, it is not just a cached benchmark result on S6. That's real.
A few things to ponder...
This is confusing. I was always under the impression that decryption (reads) are usually a tad bit faster then encryption writes. This at least seems true for TrueCrypt benchmarks. But that may be comparing apples and oranges.
A few thoughts...
In some other thread it was mentioned that the Z5C optimizes RAM usage by doing internal on the fly compression / decompression to make very efficient usage of the RAM. As cryptotext usually is incompressible could this be a source of the slowdown on flash R/W. Could this be a source of the problem (either by actual slowdown or confusing the measurement of the benchmarking tool?)
These days the SSD flash controllers also do transparent compression of data before writing to reduce wear on the flash. If you send a huge ASCII plaintext file into the write queue the write speed will be ridiculously high, if you send incompressible data like video the write speed rate goes way down. This happens on hardware level, not taking any cryptop/decrypto operations on the OS level into account.
Is there maybe a similar function in todays smartphone flash controllers?
Can I ask the OP, in what situations do you notice the slower read rate on the crypted device? Not so long ago when spinning rust disks were still the norm in desktop and laptop computers read rates of 120 MB were totally out of reach. What kind of usage do you have on your smartphone that you actually notice the lag? Is it when loading huge games or PDF files or something similar?

CPU control under Android lollipop 5.0.2

Hello everyone,
I'm looking for information. I have the current use case:
My smartphone is a Sharp Aquos Zeta SH-03G with lollipop 5.0.2 (I didn't get a choice on the device I could get )
By digging a bit in the system I found out that this smartphone is configured somehow to not use the full CPU capacity. It justs use 5 cores out of 8 of the snapdragon 810 whatever the activity on the phone.
However all the core are seen as possible to use by the kernel with correct frequencies.
Only the core up to 1.5Ghz are use normally. for the core up to 2Ghz, only one is used and not at the top frequency (max 1.4Ghz)
Which make this phone to act as a 5 core up to 1.5Ghz. I'm just curious to understand where I should look like to see where that configuration is done.
Is it in the custom kernel source code? Is it some arguments given at boot time? Is it in some configuration file somewhere on one of the booting partition?
They release the source code of the kernel so I just give at least a quick check in the processor core frequency definition for a snapdragon 810 and it was looking like all is defined approprietly to use all of them. Also the system report that it really see 8 cores and that 8 cores may be use if needed...
Any help appreciated, thanks!

Hi, what processor recommended?

I wanted to make a custom PC build but I wanted to ask you what processor recommended. My search on wallapop is Intel Core i5, but which version recommended? Link to my search
@CzechosDrama,
When looking for anything you want to purchase, build, repair, install, or uninstall. Always do research yourself as that will get you the best results. Luckily, Google has all the information you need for free to do this research, not to mention pricing and availability. Google is your friend.
Thank you!
thisguy12win
Jason Tollakson
If I was to do a PC build though. In regards to a processor I would go with the Intel i7. It's really fast and reliable.
Thank you!
thisguy12win
But you are building a pc for office or a gaming pc? this is very relevant
thisguy12win said:
If I was to do a PC build though. In regards to a processor I would go with the Intel i7. It's really fast and reliable.
Thank you!
thisguy12win
Click to expand...
Click to collapse
Thanks for your recomendation, gotta check on wallapop to see a low cost and good i7 proccesor.
CzechosDrama said:
I wanted to make a custom PC build but I wanted to ask you what processor recommended. My search on wallapop is Intel Core i5, but which version recommended? Link to my search
Click to expand...
Click to collapse
If it's not too late, here's some important things to know:
1. The biggest mistake people make is that they always classify processors by i3, 5, 7 and 9. Don't do this. Each processor is different based on its generation. For example, the 12th gen October 2021) i5-12600K is much faster than the 11th gen i9-11900K (March 2021), even though the number is lower.
2. There are always two types of i5 CPUs in each generation:
- i5-#400
- i5-#600
Where # is the generation number.
i5 600 CPUs are better than i5 400 CPUs but are more expensive.
3. Intel has different letters at the end of some CPUs, the main ones to know are:
K - This means that the chip is unlocked, meaning you can overclock it without voiding warranty. For any processor that is 12th gen or newer, it also means they get extra cores.
F - No integrated graphics. If you get a CPU ending with F (e.g: 12400F, 11600KF), your PC will not work unless you brought a separate graphics card (which you probably will). As a return, F CPUs are cheaper than the non-F versions.
On top of all that, i7 and i9 are still options depending on the generation.
It all depends on your budget and what you need from your PC.
I know that seemed way too complicated, so let me help you pick a CPU. Just tell me your budget and what you want your PC for.
A3RNAV said:
If it's not too late, here's some important things to know:
1. The biggest mistake people make is that they always classify processors by i3, 5, 7 and 9. Don't do this. Each processor is different based on its generation. For example, the 12th gen October 2021) i5-12600K is much faster than the 11th gen i9-11900K (March 2021), even though the number is lower.
2. There are always two types of i5 CPUs in each generation:
- i5-#400
- i5-#600
Where # is the generation number.
i5 600 CPUs are better than i5 400 CPUs but are more expensive.
3. Intel has different letters at the end of some CPUs, the main ones to know are:
K - This means that the chip is unlocked, meaning you can overclock it without voiding warranty. For any processor that is 12th gen or newer, it also means they get extra cores.
F - No integrated graphics. If you get a CPU ending with F (e.g: 12400F, 11600KF), your PC will not work unless you brought a separate graphics card (which you probably will). As a return, F CPUs are cheaper than the non-F versions.
On top of all that, i7 and i9 are still options depending on the generation.
It all depends on your budget and what you need from your PC.
I know that seemed way too complicated, so let me help you pick a CPU. Just tell me your budget and what you want your PC for.
Click to expand...
Click to collapse
My budget is 30€-80€ and I want my pc for gaming, surfing the internet and testing VMs (maybe).
What exactly is your full budget (like for everything)? I would personally recommend spending a bigger part of your budget towards your CPU. Ideally you would want a 6-core CPU, but the best thing I can find under 80 is an Intel i3-10100F from 2019 on sale.
CzechosDrama said:
I wanted to make a custom PC build but I wanted to ask you what processor recommended. My search on wallapop is Intel Core i5, but which version recommended? Link to my search
Click to expand...
Click to collapse
I would go with a AMD Ryzen CPU, they come with built in Vega graphics that perform really well in gaming, meaning, you won't have to buy a graphics card, if you go with an Intel CPU, you will have to buy a graphics card. AMD is a real cost saver because they are cheaper than Intel and come with excellent built in graphics.
That's actually true. The integrated graphics are really good, and you can easily get a 2nd or 3rd gen Ryzen 3 or 5 for a good price now. If you ever need to upgrade your GPU down the line the older RX series is also dropping in price
13th Gen i5 or i7 if you've got a broader budget. i9 isn't worth it the money.
Ryzen are decent, I've got one, but the Intel 13th Gen outperforms them this round.

Categories

Resources