HNHacker News
TopNewBestAskShowJobs

avianes

280 karma · joined November 23, 2018

submissionscomments
avianes··on Hertzbleed Attack
Not a cryptography specialist, but I doubt that all crypto algorithms have the same property of causing 0s (or 1s) to massively appear for some inputs in a way that could lead to a key leakage with this attack.

I believe that SIKE is an extrem case which allows to perform this attack with more ease.

However I suspect that by refining the attack then it could be extended to other algorithms less sensitive to power side-channel.

avianes··on Hertzbleed Attack
SIKE is definitely not the most widely used cryptographic algorithm. And as the paper points out:

> In our attack, we show that, when provided with a specially-crafted input, SIKE’s decapsulation algorithm produces anomalous 0 values that depend on single bits of the key.

It was clearly selected for this property. The attack allows to determines the number of 0s and 1s in words processed by an algorithm, so they chose an algorithm that has specific data outcomes which will produce a measurable power effect.

avianes··on Tachyum’s Prodigy CPU Specs
I see nobody pointing out the relatively low number of integer registers (32 64-bit registers [1]) for a VLIW that is intended to emulate an high-end Out-of-Order machine.

Modern high-end Out-of-Order processors feature over 160 physical integer registers. This number is high because OoO processors use a very large instruction window, and every instruction in this window have to be free from register name false-dependency (Write-after-Read and Write-after-Write dependency). That's the register-renaming job to introduce extra physical register to hide false-dependency. If they really emulate the behavior of an OoO processor we should expect more registers.

The large instruction window form OoO high-end processor provides latency tolerance, with VLIW processors, to increase latency tolerance, we usually increase the register count and employ more aggressive static scheduling techniques.

It is known that register-renaming technique allocates on average more registers than necessary, due to early allocation and late release, so with static scheduling it should be possible to make more efficient allocate/release. But here the register count difference is too large, low register allocation/release efficiency of register-renaming is not enough to explain the difference.

As a comparison, Transmeta VLIW core has 64 integer register and 48 integer shadow-register which is equivalent to the physical register count of OoO processors of its time.

So either they don't really emulate an out of order processor, or they do some magic, or they don't really perform that well.. (or documents that mention 32 integer registers are incorrect)

The most likely hypothesis to me is that their benchmarks numbers are based on a selection of benchmarks that can exploit their vector unit, and other uncompetitive bench results have been left out. Meaning that performance on typical x86 general purpose applications would be extremely low with this processor.

[1] https://www.tachyum.com/media/pdf/tachyum-tries-for-hypersca...

avianes··on MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips
> Nowhere on Earth, will you find an organization that will execute both sides of a conditional process requiring hunans to do the work just to throw away the result. Not taken.

Speculative execution today (within modern high-end processor) does not execute both sides of a conditional branch.

It would indeed be a waste of power and it would be a much more complex micro-architecture.

Modern speculative OoO processors execute a single path and simply relies on the branch predictor accuracy. And they are pretty accurate, on the order of 3 misspredictions every 1000 instructions. The power consumption in unnecessary work due to a missprediction is quite low.

Modern processors consume much of their power in Out-of-Order instruction scheduling.

avianes··on Tachyum’s Prodigy CPU Specs
I'm not sure if this answers your question but VLIW processors feature speculative loads.

"speculative load" can be seen as data prefetch to a register, but with a extra instruction to put before reading/using the register. This instruction check that the memory content has been received, otherwise the instruction stall the pipeline. It allows to reorder a load before a conditional branch.

To determine whether the load has been received, there is an additional structure in the microarchitecture that tracks speculative loads in-flight. When a context switch occurs, this data-structure is overwritten, so there are additional mechanisms to replay the load in such cases.

avianes··on MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips
I do not understand how you want to mitigate this issue by using the "context" given that the attack demonstration is done with a source code that makes use of the "context". The attack is fully context-agnostic since the "PACMAN gadget" in victim's code is injecting the "context" by itself.

The root of the problem is the small hash size and the fact that you can "suppress" failed hash check effects to bruteforce the hash. (it's expected that a failed hash check will cause a crash, which was intended to prevent bruteforcing)

avianes··on Welcome to the M1 Windows project
Pine64 is based on an Allwinner A64 which has a ARM GIC-400. ARM GIC-400 is a standard GIC IP from ARM and compliant with ARM GICv2 specification.

It seems pretty standard to me, not a custom GIC as Apple.

And yes, in u-boot there are plenty of device-trees for each target. What's wrong with that?

The device tree is usually provided by the manufacturer, the compiled device tree is usually very small and allows genericity.

avianes··on Welcome to the M1 Windows project
This is not true.

Most manufacturers take standardized IP and IP-providers provide an appropriate linux drivers. Few manufacturers are willing to develop and maintain their own GIC hardware and GIC driver, most of the time they just take the ARM standard GIC.

The fact that Apple does not provide drivers is a consequence of the Apple business model. And the fact that the ARM ISA does not stipulate a unique GIC is actually a strength. It makes the architecture more versatile and suitable for evolution (maybe Apple found out that the ARM standard GIC is not complete enough for them).

avianes··on Welcome to the M1 Windows project
Are you confusing "amd64" with "Aarch64"? "amd64" has nothing to do with Macs/Apple products.

Anyway, both amd64 and Aarch64 are already being used outside of Macs/Apple products.

avianes··on Apple Unveils M2
ISA does matter in a CPU design and CPU performance:

- Variable instruction sizes make the front-end more complex and limits the decoding width;

- Delayslot makes superscalar front-end more complex;

- Page size limits VIPT L1 cache size;

- Dedicated SIMD/FP architectural registers allow dedicated SIMD/FP physical register files;

...

The choice and design of the ISA is extremely important, it's hard to argue that the ARM ISA has no impact on M1&M2 performance.

But the ISA choice is obviously not enough to explain the whole performance of the M1&M2. Likewise, the manufacturing process cannot fully explain the performance of the M1&M2.

The Apple microarchitecture is by far the most performant and efficient of all high-end superscalar CPU.

But be careful with simplistic explanations, the microarchitecture is always constrained by the ISA/architecture, and the x86 ISA has some flaws that can affect the microarchitecture (least on the power consumption).

avianes··on Ask HN: Is Security Possible?
It all depends on your definition of "secure".

- What kind of attack do we need to prevent?

- What do we need to be protected from?

- What do we not need to be protected from?

All of this (and more) must be defined in your threat model. A threat model precisely defines what "security" means for you in your context. Without that the concept of "security" remains extremely vague and therefore it can always be called imperfect against an incredibly intrusive attack

avianes··on Plundervolt (2019)
> I thought this attack vector was pretty well known

Yes, fault attacks are well known, but this paper is about software-based fault attacks.

And as discussed in section I.A), the various integrity check mechanisms of SGX were believed to be able to protect against this.

avianes··on Faster CRC32 on the Apple M1
While I agree that the RISC-V V extension is questionable, it does not necessarily make decoding into uop more complex. When the vector register is allocated there is a known vector register size, and we have then 3 ways to go:

1) Producing several uops for each cut in the vector register;

2) Producing a single uop with a size field, the vector unit know how to split the operation;

2) Producing a single uop size-agnostic, the vector unit know the size from the vector register metadata.

The worst is probably 1), it will stress the ROB, uop queue and the scheduler, and make the decoding way more complex. But solutions 2) and 3) keep the decoding simple and are much more resource efficient.

An implementation aspect that may be complicated is the vector register allocation depending on the vector-unit microarchitecture (more specifically, depending on the vector register file microarchitecture)

avianes··on India reveals RISC-V CPU roadmap, expects product by 2023
Little addendum:

Macro-op fusion (alone) does not only reduce the number of uop, it could also reduces physical register usage as intermediate results are not stored into physical registers.

For instance, the indexed load pattern (ADD+LOAD) without macro-op fusion needs:

- 2 physical registers in read;

- 2 physical registers in write (one per macro-op), meaning that 2 physical registers will be allocated.

While the macro-op fused version needs:

- 2 physical registers in read;

- 1 physical register in write, meaning that a single physical register will be allocated.

avianes··on India reveals RISC-V CPU roadmap, expects product by 2023
> High end cores want to split everything up (RISC-V comes pre-split)

Yes but a high-end core does not necessarily splits instruction the same way as RISC-V does.

For instance an indexed store:

RISC-V ISA splits it into an ADD+STORE pattern which may be recognized by macro-op fusion, while a high-end core splits it into a store_address uop (that compute the effective address and update the address field into the store-buffer entry) and a store_data uop (that update the data field into the store-buffer entry, and this uop is "address agnostic")

avianes··on India reveals RISC-V CPU roadmap, expects product by 2023
> I think what Jha was questioning was whether catching up to ARM is feasible if your main weapon is macro-op fusion.

I don't think so, there are indeed unrealistic macro-op fusion patterns that can reasonably be described as "unfeasible" or "unrealistic".

But macro-op fusion patterns suggested in the RISC-V spec, papers about macro-op fusion on RISC-V, and the SiFive patent on macro-op fusion are realistic and feasible.

> Bruce Hoult's comment from a few months ago suggests that it wasn't really being tried at SiFive

Commits from SiFive people's in GCC [1] suggest that short-forward-branch macro-op fusion patterns are recognized by SiFive hardware.

I don't know if they recognize other macro-op fusion patterns.

But SiFive has a bunch of stuff to improve before diving into macro-op fusion.

[1]: https://patchwork.ozlabs.org/project/gcc/patch/2019043023474...

avianes··on India reveals RISC-V CPU roadmap, expects product by 2023
I talk about feasibility, not about design win in a high perf. circuit, since there is no real high perf. RISC-V today and since it's the feasibility that is questioned by the parent.

I can't say if the macro-op fusion will be enough to beat ARM & x86, but I can tell it's feasible.

avianes··on India reveals RISC-V CPU roadmap, expects product by 2023
> lot of the design rides on "oh we're just going to combine all the very RISC instructions into macro-ops to catch up to what ARM is doing"

There are more macro-op fusion suggestions for RISC-V precisely because RV instructions are simple. This gives more opportunity for macro-op fusion.

> so it's not clear if this is even feasible

What macro-op-fusion are you talking about exactly? Most of the macro-op-fusion suggested are quite trivial and have already been implemented

avianes··on Can You Insert Hardware Trojan Spyware IP into an IC at the Fab? Yes
And because we KNOW about the Intel ME many security researchers have been looking for backdoors and vulnerabilities in it, several vulnerabilities have been found but no backdoor.

If Intel wants to put a backdoor ME would probably be a bad choice because it's a too obvious and monitored location

avianes··on VeriGPU: GPU in Verilog loosely based on RISC-V ISA
I'm not really optimistic about the hardware and the tape-out goal. The author seems to have a very basic knowledge about it.

For instance, the int multiplier design is overengineered, very naive and far from state of the art (no pipeline, no adder compressor). I would suggest the author to check wallace tree multiplier.

But at this stage it would be preferable to use the native verilog multiply or a DSP macro to target FPGA for prototyping, and to focus the SIMT architecture and the pipelining. Arithmetic unit design is a science in its own.

However it's a beautiful project!

avianes··on Satellite images show bodies lay in Bucha for weeks, despite Russian claims
Of course things could have moved, the area was active.

You can check out this thread [1] from bellingcat which shows pictures and videos of this place. And you can clearly see that there is more than one corpse.

[1]: https://twitter.com/bellingcat/status/1511284174921076736

avianes··on Satellite images show bodies lay in Bucha for weeks, despite Russian claims
> Building on the left is of another form

You can check with google map for example at "50.54124726729443, 30.228596257255703" (and looking towards south-west). You will see both the satellite view and street-view matches with the pictures.

The match is not perfect because the street-view is from 2015, but it's clearly recognizable

avianes··on Ask HN: How does a CPU communicate with a GPU?
The volatile keyword in C has nothing to do with cache coherence and does not prevent cache coherence issues.

It just forces the compiler to generate all memory accesses on this variable. And if this variable is in a cached memory region, then it opens the door to very usual cache coherency problems

avianes··on LoongArch Port Accepted into GCC
RISC-V is an open and royalty free ISA, it can't really be backdoored. And several Chinese companies are working on RISC-V implementation
avianes··on VRoom A high end RISC-V implementation
I see, there are indeed solutions like regfile duplication to handle large port number but it's expensive when physical regfile becomes large. I still think that the uarch's job is to ensure minimal implementation cost ;).

Thank you for your opinion and thought process, it's very valuable !

avianes··on VRoom A high end RISC-V implementation
Yes, the "dual register file" is probably the most intriguing to me.

This looks like a renaming scheme used in some old micro-architecture (Intel Core 2 maybe) where ROB receives transient results and acts as a physical regfile, at commit reg value are copied to a arch regfile. But in your uarch the physical regfile is decoupled from ROB, which must correspond to your commitQ.

I wonder if this solution is viable for a very large uarch (8 way) because read ports to copy reg value from pysical regfile to arch regfile are additional read ports that can be avoided with other (more complex) renaming scheme. These additional read ports can be expensive on a regfile that already has a bunch of ports.

Any thoughts about this?

But I haven't read much of your code yet, that's just a raw observation

avianes··on VRoom A high end RISC-V implementation
Yes, there is a huge lack of open and approachable information sources in micro-architecture.

Be aware though, the micro-architecture used here is very interesting but differs in many ways from state of the art industrial high-end micro-architectures for superscalar out-of-order speculative processor.

I am quite curious about how the author came up with these choices

avianes··on Addressing Criticism of RISC-V Microprocessors
We don't need indexed loads only for loops. But even within loops, you may need indexed load.

One simple example: when you do loop unrolling, you must access elements n+4, n+8 and n+12 etc.

avianes··on Addressing Criticism of RISC-V Microprocessors
> Go take a look at a lot of C code (hint, look at SPEC benchmarks). They do that.

This does not really justify isolating that snippet if you admit yourself it's a bad one.

> The sins of the original RISC-V was spending too much time looking at RV32 and not realizing how big a problem this is in practice.

But indeed, my previous message shows that even without Zba the problem is erased by a good register allocation and macro-op fusion.

I think you are trying too hard to find special cases that "trick" RISC-V, you didn't even pay attention to the use of unsigned which is non-optimal (unsigned has an undesirable overflow semantic here).

avianes··on Addressing Criticism of RISC-V Microprocessors
> This biggest issue is one instruction spanning two cache lines

Even with fixed (32 bit) instruction lengths aligned on 32 bit, when we have to decode a group of 8 instructions you are facing this kind of issue.

So you either have to cut the instruction group (and thus not take full advantage of the 8 way decoder) or you have to implement a more complex prefetch with a longer pipeline. And these special cases can be handled in these pipeline stages.

> It also means you cannot tell instruction boundaries until you directly fetch instructions

I mean, AMD does that on x86, with 14 instruction lengths.

It can be done for RISC-V, it's much cheaper than x86, and it takes significantly less surface area than a bigger cache to compensate.

← PreviousPage 2 of 6Next →