Better HN
topnewbestaskshowjobs
Log inSign up

kees99

1,025 karma · joined Jul 3, 2016 (10y ago) · 522 submissions

Submissions

comment 6y ago · link · parent

PDP-11 architechture [1] has a "jmp" that is a variant of "mov". And "push", "pop", and even "ret" are too. Also this beauty:

  MOV -(PC), -(PC)
This is a 1-word self-replicating program that (when run from the topmost RAM address) will clobber entire RAM by copying itself all over it.

[1] https://en.wikipedia.org/wiki/PDP-11_architecture#Addressing...

comment 6y ago · link · parent

Why not 111? That would have been even easier to manually-pulse dial.

comment 6y ago · link · parent

Indeed. Those two lines in the test-case are particularly excellent:

  /* 64 processes */
  fork(); fork(); fork(); fork(); fork(); fork();
I can totally see most people, myself included, writing a dozen of lines instead, with a for loop, checking for parent/child/error return code, etc. Which might be preferable for some code somewhere deep inside the app logic that will potentially run on a resource-constrained machine. But for the explanation code to be read by a human, this one-liner is such a good choice!

comment 6y ago · link · parent

8086 has 256 IO addresses, and hardware of that era had fairly simple initialization, so completely naive way to find peripheral X was to 'probe' each and every possible IO address with something like:

  for i in range(256):
    poke(i,magic1)
    if peek(i) == magic2:
      found!
256 probes in all is not that bad, and real-world probing would only try a handful of commonly used addresses, making it even faster.

Phone SoCs on the other hand have many peripherals memory-mapped, (meaning there are millions/billions addresses to 'probe'), plus there are things like power sequencing, GPIO enable lines that need to be asserted, and clock-sources configured before peripheral would even respond at all. Oh, and that GPIO, or power controller, or clock source themselves might be accessible via an i2c chip speaking its own protocol, so you need to initialize those first, etc, etc.

All of this complexity could be described via linux "devicetree" subsystem, and devicetrees are in a usable state for some hardware (although DT itself is often a labyrinth to navigate). Thing is - factory software for most phones have been extremely slow to adopt DT, and even some that do use DT, don't do it in a particularly portable way.

comment 6y ago · link · parent

My understanding is that each android phone model is unique and requires unique OS update (unlike, say, BIOS- or UEFI-based x86 PCs, where exact same Windows/Linux/BSD/... image can be installed on any of them).

Having a "standard" OS interface for the phone, where there is just one OS image for a given OS version, and that image could be installed on any phone - now that would be the true alternative, which I would be delighted to vote for with my wallet.

comment 6y ago · link · parent

You have a point there, but it's far, far from being so clear-cut.

Privileged ports is a measure to guarantee that daemon listening there was started with root privileges. Which is a useful guarantee on a shared server, less so on a single-purpose or personal server.

Plus, if you have an sshd started at boot, and already listening on a pre-defined high port, there is very little chance another program could bind to the same port, save crashing and racing the daemon.

Finally, in ssh protocol, server authenticates itself to the client, so even if by some trickery a bogus ssh server would bind to the same port, it will either need to access /etc/ssh/ssh_host_*_key, which are enforced to be root-readable only, or risk being trivially detected by a client comparing presented public key to that saved from last login in the ~/.ssh/known_hosts.

There are also some DPI firewalls, or just port-based firewall that can block ssh traffic on a non-standard port, but assuming we are talking about your own server, that should be easy to rectify too.

comment 6y ago · link · parent

No idea why you are being downvoted, this is a solid advice. Masscan [1] claims to scan whole IPv4 Internet for a single port in 5 minutes. Moving to a random high port would increase scan time 64000-fold, to 7 months.

You'd still be advised to disable password-based auth and/or configure fail2ban, though.

[1] https://github.com/robertdavidgraham/masscan

comment 6y ago · link · parent

@1hakr: Your no-javascript shame-screen is very funny and well-made, thumbs up. Too bad I can't see anything else on that site.

comment 7y ago · link · parent

> Most donated phones have an iCloud lock with no way to contact the previous owner to request an unlock

To be fair, newer Android phones have Factory Reset Protection[1], which is pretty much 1-to-1 clone of iCloud lock.

[1] https://support.google.com/nexus/answer/6172890

comment 7y ago · link · parent

In a DNS-amplified DDoS attack, target (CF for example) would be on the receiving end (right-hand side of [1]), and blocking, while necessary, would not be terribly efficient there.

On the other hand, deprecating "ANY" requests as standard, once percolated into BIND and other resolvers, would cut the attack[2] on the amplification stage (middle of the picture of [1]).

[1] https://www.cloudflare.com/img/learning/ddos/dns-amplificati...

[2] or at least significantly decrease choice and depth of large amplification factor requests available to the attacker.

comment 7y ago · link · parent

Cloudflare killed "ANY?" because it was a significant vector in DNS amplification attacks.

Ironically enough, avoiding the "expensive" query type resulted in potentially doubling the amount of DNS traffic from a typical dual-stack client ("A?" + "AAAA?" instead of single "ANY?")

EDIT: ...or warranted adding laggy heuristics that eventually settles into either, as Avamander points out below.

comment 7y ago · link · parent

  [R]ecent update to the Raspberry Pi 4 bootloader
  (...) enables data over the USB-C port
Am I reading this right that RPi4 has five usable USB ports, i.e. unlike earlier models, port on bottom left of the board can carry data along with power? This is awesome!

comment 7y ago · link · parent

Indeed, "browser.urlbar.autoFill" option (enabled by default) would do that in Firefox.

There should be no forced https redirection if you fill in http:// prefix by hand though. At least for now, until example.com adds HSTS headers.

comment 7y ago · link · parent

Some captive portals do TCP redirection, but no DNS redirection.

And for good reason. Once user has finished jumping through whatever hoops captive portal want them to jump, a new connection to the same server is likely to be attempted, and having a fake DNS response cached somewhere in libresolv or browser in the client is not the least bit conductive to that.

comment 7y ago · link · parent

This, exactly.

I've spent way more time troubleshooting various obscure network problems that ended up being a typo in IP address/port number, than I'd be proud to admit.

comment 7y ago · link · parent

Same here, except it's comparing fly's flight trajectory to that of a banana is new to me.

comment 7y ago · link · parent

Red embers (~1000K eigen radiation) are hot, blue(-ish) ice (lit by 5500K daylight) is cold.

..go figure!

1
131415
18