HackerLangs
TopNewTrendsCommentsPastAskShowJobs

Jasper_

no profile record

Submissions

Reverse Engineering Crazy Taxi, Part 1

wretched.computer
6 points·by Jasper_·4 months ago·1 comments

comments

Jasper_
·2 months ago·discuss
Blanket blocking socketcall() caused regressions for all 32-bit applications trying to make sockets. In theory, glibc disables socketcall when running on kernel version >= 4.3. In practice, Debian/Fedora/Ubuntu all set glibc's "expected kernel version" to 3.2, so socketcall() is still used on most 32-bit glibc binaries shipped.

https://salsa.debian.org/glibc-team/glibc/-/blob/sid/debian/...

https://src.fedoraproject.org/rpms/glibc/blob/rawhide/f/glib...
Jasper_
·7 months ago·discuss
I don't make any efforts to make mobile devices work, since usually their GPUs and drivers are not good enough for this, but PRs and patches are welcome. At one point Mobile Safari was working.
Jasper_
·8 months ago·discuss
https://learn.microsoft.com/en-us/windows/win32/api/winuser/...
Jasper_
·8 months ago·discuss
That Wayland keylogger is not the same thing. X11 has several mechanisms (XTest, XRecord, XI raw inputs) to receive a global raw key input stream, accessible to anyone who connects to the X server, without even making a visible window surface. It even bypasses grabs, meaning that your lock screen password entry can be snooped on.

The Wayland keylogger acts like an application; all Wayland compositors will only send key events to the focused surface, so the user has to focus an active surface in order to get key events. Even in the scenario where you've LD_PRELOAD-hooked all applications, you still will never get the lock screen password, as the compositor never sends it out across the wire.

LD_PRELOAD is problematic from a security perspective, but it's not Wayland-specific: the same issue is true for CLI applications and X11 applications, and any attacker with the ability to write files could also just replace your binaries with malicious ones (stuff them somewhere into ~/.hidden, and then add a $PATH entry to the start).
Jasper_
·last year·discuss
Unreal Engine has a C++-based GC.

https://dev.epicgames.com/documentation/en-us/unreal-engine/...
Jasper_
·last year·discuss
Has anybody ever figured out what "invert a binary tree" means? That came from Max Howell, and nobody else seems to have ever received that question.

The best anyone can figure out is that it's reversing the left and right branches, which seems like it's ten lines of code, at most?
Jasper_
·last year·discuss
The ANSI Y14.2 committee has a version of the font available for download here, created by Peter Karnold.

https://cstools.asme.org/csconnect/CommitteePages.cfm?Commit...
Jasper_
·2 years ago·discuss
That is all the protocol is. From https://www.freedesktop.org/software/systemd/man/latest/sd_n...:

> These functions send a single datagram with the state string as payload to the socket referenced in the $NOTIFY_SOCKET environment variable.

The simplest implementation (pseudocode, no error handling, not guaranteed to compile), is something like:

    const char *addrstr = getenv("NOTIFY_SOCKET");
    if (addrstr) {
        int fd = socket(AF_UNIX, SOCK_DGRAM, 0);
        struct sockaddr_un addr = { .sun_family = AF_UNIX };
        strncpy(addr.sun_path, sizeof(addr.sun_path), addrstr);
        connect(fd, (struct sockaddr*) &addr);
        write(fd, "READY=1");
        close(fd);
    }
Jasper_
·3 years ago·discuss
Companies have successfully forced people to go through arbitration through terms of service, with courts agreeing. ToSes, as a whole, are enforceable, though several lines in them might not be, just like contract law.
Jasper_
·4 years ago·discuss
Some compilers have a dynamic dispatch for this; you run the "cpuinfo" instruction and check for capability bits, and then dispatch to the version you can support. Some dynamic linkers can even link different versions of a function depending on the CPU capabilities -- gcc has a special __attribute__((__target__()) pragma for this.
Jasper_
·4 years ago·discuss
Don't limit yourself to technology and computers. These systems are political in nature; that is, they concern the basic fabric of how society is structured. One of the biggest tricks any new field has is thinking we're way different, won't repeat the mistakes of others. Both of these make it hard for me to recommend anything good here without getting myself into an internet argument I don't want at this point in time, but at least start reading some history of labor, of capitalism, and of corporations. A People's History of the United States is widely recommended as an intro to these things, and I might as well give it a namedrop here.
Jasper_
·4 years ago·discuss
Stallman rightly predicted that corporations want to amass power and control over you, and that counter-culture technologies like the computer and the Internet would slowly revert to mainstream, corporate-friendly and capitalism-friendly ideals as they become wider spread. This is hardly a fringe position.

But whereas a lot of others think the problems are structural to how society operates, and that fixing it would require rebuilding under a new economic framework, Stallman's only insight is that software you can't modify is the devil. DRM is bad not because it upholds a capitalist supply-and-demand system by restricting theoretically infinite supply, but because you can't modify the .c files yourself or send them to a friend.

It's an extremely limited way of thinking that ignores any external structural or economic motivations, and focuses on an unreasonably small niche subset with a black-and-white moral answer. It sometimes makes good points, mostly accidentally, but it still has a lot of misses, e.g. the religious persistence on "software" leads to programs like the FSF's Respect Your Freedoms with incoherent policies around hardware, firmware, and ROMs, mostly from a place of ignorance.

The free software movement was quickly co-opted by corporations as the "open-source movement" by executives looking to offload their labor costs onto unpaid workers, leading to a lot of under-funded core software infrastructure as corporations rank in the cash. Stallman's "Open Source Misses the Point" essay doesn't talk at all about this, it doesn't talk about the ways that open-source is about externalizing costs, nor about the way that it's leading to maintainer burn-out, it just points out that it's kinda bad that they're releasing stuff under the MIT license instead of the GPL, and would really much prefer if people didn't do that, while not realizing that was the goal all along.

The FSF has very little force in accomplishing their goals; it's a wet paper towel tossed vaguely in the direction of actual change.
Jasper_
·6 years ago·discuss
When I say "run", I mean "runs at target performance". Yes, sure, Turing completeness technically means that software raytracing "runs" on the Switch, we all know that, but it's not a viable solution for a shipping product.

This is not a biproduct of consoles being closed platforms, multimedia is a challenge everywhere; cross-platform, usable multimedia playback lacks a high quality product even on open PC platforms.
Jasper_
·6 years ago·discuss
I can't go into more detail because these platforms do not have any public documentation, but this is not true, you cannot use NVDEC. And it doesn't cover audio or synchronization.
Jasper_
·6 years ago·discuss
Bink isn't the codec, though that's good too, it's the software stack. How do you render AV1 on a PS4 or a Nintendo Switch, synchronize it with the audio stream? No, seriously, tell me.

GStreamer with its ridiculous threading architecture and lock-heavy approach? You think that's going to run on a console CPU? ffmpeg / libavcodec? Yes, we can hook that up, have it crank out YUV buffers and display those on the GPU, or we can just use Bink. Yes, it costs a ton of money, but based on when I evaluated it last, it was almost twice as fast as libvpx on our target platforms, it was well-suited for games (worked well with custom allocation strategies, didn't start a bunch of threads by itself, integrated well into our renderer), was easy to integrate, the toolchain was lovely, and when we needed help with a bug, we got an email back the same day from Jeff. RAD's support is top-notch.

Multimedia is not too big of a problem that a company like Epic can probably spend a few days integrating libvpx and opus to make a custom video solution, but big enough that most smaller studios with custom engines don't have time to spend on that, and those are the sort of problems that RAD likes to tackle.
Jasper_
·8 years ago·discuss
Wayland indeed closes a lot of these huge holes. It's one of the core reasons for its introduction.

Flatpak has no X11 sandbox. Others, like Firejail, have attempted to create X11 sandboxes, but they've had holes (last I tested they had the X RECORD extension enabled, which has no use except being a keylogger), or broke valid applications / accessibility tools.