HNHacker News
TopNewBestAskShowJobs

sleirsgoevy

104 karma · joined March 4, 2024

submissionscomments
sleirsgoevy··on The NX bit is not just about security
Looks like you know some internal details of the A53 cores, can you share the source?
sleirsgoevy··on The NX bit is not just about security
x86_64 seems not to care much. I've had a UART mapped as normal memory, and it somehow still worked.
sleirsgoevy··on The NX bit is not just about security
I don't even have a real heap there, only a primitive 1-page allocator for pagetables.
sleirsgoevy··on The NX bit is not just about security
This just means that Apple is a big enough player for ARM to retroactively amend the standard. Does not mean that what Apple did was not a violation of then-standard tho.
sleirsgoevy··on The NX bit is not just about security
No, that instruction does not read memory. That instruction is itself IN the inaccessible memory.

It does not really matter how execution ended up in the HV in the first place. The misprediction happens due to having a branch-to-register instruction.

sleirsgoevy··on The NX bit is not just about security
Post author here. I wanted the code to be "as generic as possible", so I had to accept the possibility of some useful thing being at address 0.
sleirsgoevy··on A theoretical way to circumvent Android developer verification
What about this idea? Make a movement among the devs who are willing to distribute "legitimately" (via Google Play or "authorized" sideload), to sign their apps with intentionally insecure private key. Then some community will just mine up these certificates in already published apps and publish them somewhere on GitHub.
sleirsgoevy··on A theoretical way to circumvent Android developer verification
Making every user to "verify" themselves with a government ID is a no-go, because government IDs are no more trustworthy than a toilet paper.
sleirsgoevy··on A theoretical way to circumvent Android developer verification
The issue with government IDs is that they are, for all we know, not trustworthy, but everyone treats them like they are. And you know, I am not going to "verify" myself with Google with this kind of toilet paperwork.

If Google decides to pull this off, then I guess reflashing to a custom ROM with this crap patched out will be a very first step I'll be recommending to anyone who cares.

sleirsgoevy··on Detecting if an expression is constant in C
The Linux kernel has even a way to determine whether the expression is compile-time, WITHOUT aborting compilation in either case.

The trick is this (copied vebratim from Linux):

#define __is_constexpr(x) (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

Explanation: if x is a constant expression, then multiplying it by zero yields a constant 0, and casting a constant 0 to void* makes a null pointer constant. And the ternary expression, if one of its sides is a null pointer constant, collapses to the type of the other side (thus the type of the returned pointer will be int*, and the sizeof will match). And if x was not constant, then the lefthand side would not be considered a null pointer constant by type inference, the type of the ternary expression will be void*, and the sizeof check will not match.

With a few more clever tricks, it's even possible to implement a compile-time "type ternary expression", like this: TYPE_IF(2 * 2 == 4, int, long). This is left as an exercise for the reader.

sleirsgoevy··on Adding Systemd to PostmarketOS
Not really, it's garbage to the point that it only runs the X11 session, mutter can't even be compiled with Wayland support because it then tries to include some Linux-only header.
sleirsgoevy··on Yuzu emulator developers settle Nintendo lawsuit, pay $2.4M in damages
``` git clone https://github.com/irfanhakim-as/yuzu-mainline git fetch origin 537296095ab24eddcb196b5ef98004f91de9c8c2 ```

It seems that GitHub still serves the commit history through the existing forks of the repo. According to archive.org, this commit corresponds to the last release of yuzu-mainline before the repo takedown: http://web.archive.org/web/20240304185516/https://github.com...