127 karma · joined Jun 8, 2020 (6y ago) · 99 submissions
comment 1w ago · link · parent
It used to be relatively easy, not so much any more: https://github.com/zenfyrdev/bootloader-unlock-wall-of-shame...
It's really sad to see the number of vendors friendly to bootloader unlocks dwindling over time.
comment 4w ago · link · parent
Mobile gacha/micro-transaction games often encourage frequent/repetitive play (e.g. via dailies, limited time quests etc). Would someone engaging in this likely consider the game to be a hobby?
comment 4w ago · link · parent
I thought that basically fits the definition of "gamer" so I'm clearly mistaken. How do you define "gamer"? Someone who "always" plays games? (for some definition of "always"?)
Regardless, non "gamer" game players can still benefit from higher refresh rate screens, and they're not insignificant in number.
comment 1mo ago · link · parent
I don't know how "mobile" gamers are using iPads (or tablets), but considering the size of the market, I doubt it's particularly niche.
comment 1y ago · link · parent
A VBMI2 example implementation can be found in the function named divide_with_lookup_16b: https://godbolt.org/z/xdE1dx5Pj
comment 2y ago · link · parent
PMULLD is probably just doing 2x PMULUDQ and discarding the high bits.
(I tried commenting on his blog but it's awaiting moderation - I don't know if that's ever checked, or just sits in the queue forever)
comment 2y ago · link · parent
const tryNew = (f, ...a) => {
try {
return new f(...a);
} catch(x) {
return undefined;
}
};
const myUrl = tryNew(URL, 'http://example.com/');I don't get why JS devs like to whinge about the smallest things. And we get stuff like leftPad because of huge aversion to writing utility functions.
comment 2y ago · link · parent
Since users could be trying to compile it on GCC 9.4.0, and as the functionality dependent on the header isn't critical to the application, if the build detects the header is broken, it just disables the functionality and emits a warning.
Back to xz: If security isn't your top priority, it seems reasonable to just ignore the failure of an optional feature and just move along. Of course, in hindsight, it's easy to point fingers, but without that, it doesn't sound completely unreasonable to me.
comment 2y ago · link · parent
If I were trying to phish someone, I wouldn't attack the public key crypto part, so how domains come into play during authentication doesn't matter. I'd just grab the "unencrypted" session token at the end of the exchange.
Even if you somehow protected the session token (sounds dubious), there's still plenty a phisher could do, since it has full MITM capability.
comment 2y ago · link · parent
There's also the issue of how many sites actually use it, as well as how it handles the loss of or inability to access private keys etc. I generally see stuff like 'recovery keys' being a solution, but now you're just back to a password, just with extra steps.
comment 2y ago · link · parent
Except that phishing doesn't require the private key - it just needs to echo back the generated token. And even if that isn't possible, what stops it obtaining the session token that's sent back?
comment 2y ago · link · parent
For a typical person, maybe, but for a tech-minded individual who understands security, data entropy and what /dev/random is?
And I don't see how MFA stops phishing - it can get you to enter a token like it can get you to enter a password.
I'm also looking at this from the perspective of an individual, not a service provider, so the activities of the greater percentage of users is of little interest to me.
comment 2y ago · link · parent
> There are plenty of scenarios where MFA is more secure than just a strong password.
And how realistic are they? Or are they just highly specific scenarios where all the stars must align, and are almost never going to happen?
comment 2y ago · link · parent
Assuming n is an integer:
* 5n bytes received = 4n bytes data
* 5n+1 bytes received is [invalid]
* 5n+2 bytes received = 4n+1 bytes data
* 5n+3 bytes received = 4n+2 bytes data
* 5n+4 bytes received = 4n+3 bytes data
This is like modified Base64, which doesn't need any padding.comment 2y ago · link · parent
Unfortunately for Z85, they made the highly questionable decision to use big-endian, which means it can't take base64's route. You could probably define an incomplete group at the end to be right-aligned or similar, but you may as well be sensible and just go little-endian.
comment 2y ago · link · parent
Why oh why??!
If it were little endian, you could probably skip the "must be multiple of 5 chars/4 bytes" requirement, not to mention that 99.9999% of processors out there are running in little-endian mode.
There is nothing "envious" about network byte order.
comment 2y ago · link · parent
PMULUDQ is in SSE2, though I haven't checked if that's usable for the problem here. There's also PMULLD in SSE4.1 if you only need a 32-bit result. But for summing digits, perhaps SSE2's PMADDWD could be sufficient?
comment 2y ago · link · parent
I'm doubtful of this in general. Some older processors did have a very slow BSF/BSR implementation, so it may be the case there, but I wouldn't generally stick with that assumption these days. (and it's most certainly not the case on AMD Zen, given all its ALUs can do these bit ops)
AVX doesn't have lzcnt prior to AVX-512 CD, so it could make more sense there, though I'd imagine that abusing float conversion (convert to float, extract exponent) would still be faster.
comment 2y ago · link · parent
I don't know much about the space you're working in, but some things I'd point out:
* 32b and 64b SIMD multiplication have very high latency on Intel CPUs (actually, expect multiplication to have high latency in general on any CPU). If you're not using multiple independent chains of zmm registers, performance will suck
* _mm512_set_epi64 with memory sources likely performs poorly. See if you can do full vector loads and swizzle the data into position (i.e. unpack/shuffle operations)
* do you really need to split the string into 4 parts? Can you just use the same "part", but offset each lane by a byte?
* what about CRC64? Like 32/64b multiplication, CLMUL/PMULL instructions tend to have high latency, so might not help on that front, but there may be other benefits
comment 2y ago · link · parent
I don't know about FLAC, but from my knowledge of compression, this result seems sensible to me.
Smaller file = less bits to process = faster. FLAC level 5 is expected to give a smaller file than level 0, so it makes sense that decoding it will be faster. Of course, it's possible that some codecs enable more codec features at higher compression levels, which makes decoding slower, so it's not always a given, but higher compression giving faster decode doesn't seem unreasonable.
comment 2y ago · link · parent
In such a case, you could also skip the PNG filtering as well (whilst for my case, you wouldn't want to).
I think it'd make more sense to go with BMP for a 'simple as possible' image format, that has wide support, than with PNG. PNG is definitely more geared towards a compressed image (as well as all sorts of other features you may not care about).