Better HN
topnewbestaskshowjobs
Log inSign up

codys

1,284 karma · joined Oct 6, 2011 (15y ago) · 430 submissions

podcast-again-1k@icloud.com
Submissions

comment 9y ago · link · parent

Summary: HALs in the linux kernel are a not acceptable, even large companies are held to some standards.

Well, at least for the DRM (Direct Rendering Manager) subsystem.

comment 9y ago · link · parent

Any one aware of the technical details of how this was accomplished?

Is listening for other BLE transmissions low power enough that it can be done while keeping the claimed "several years" battery life, or is there something extra going on to limit the power cost of listening?

Is the protocol between the beacons themselves actually BLE in the mesh case? Or do they just expose that to phones?

Are the beacons establishing BLE connections for the mesh, or are they just taking advantage of announcements (which would likely allow avoiding some power consumption as long as the message is small)? A mix?

comment 10y ago · link · parent

I'm surprised they don't list the IBM term: "RA" ("resource action").

comment 10y ago · link · parent

Only parts (non-core) of QT are GPL, most are LGPL

And it's a bit of a misconception that LGPL requires statically linked things to be open sourced: in that area it only requires that the LGPL components be replaceable (and the source for the LGPL components be available). In the context of static linking, that can be done by releasing pre-link binaries (object files) with instructions for linking them.

Of course, that's likely more work than just making the source available under a proprietary license (ie: provide source code so LGPL components can be replaced).

If you're using Qt GPL components, then yes, you'll need to open source your application (or pay for a Qt License)

comment 10y ago · link · parent

Note the use of `packed`. `packed` causes the alignment to be set as small as possible (1 byte). The aligned(2) that follows then increases the alignment from 1 byte to 2 bytes.

comment 10y ago · link · parent

gcc has had PGO and LTO for some time now, I know Firefox uses it. I'm not sure if Chrome does, but I'd be a bit surprised if they didn't

comment 10y ago · link · parent

I presume "the compiler" you're speaking of is some version of MSVC?

I only ask because while this article is about MSVC's pgo, other compilers also have pgo and lto, and may not have the same issues wrt optimizing across compilation units with lto enabled.

comment 10y ago · link · parent

Ah, you're right, it does look like that's the case. It's a shame it's not something better supported (like a cortex variant).

comment 10y ago · link · parent

[Edit: see child comments, this isn't right]

Rather than using CCS, one can use gcc or clang targeted to cortex-m3 (gcc target: arm-none-eabi + `-march=cortex-m3`, clang:thumbv7-eabi) to build the code (with the usual caveats that you're targeting a bare metal system).

The PRU is just a cortex-m3 core which is connected in interesting ways to the cortex-a8 on which linux runs. Nothing too exotic.

comment 10y ago · link · parent

The lightning port, mute switch, volume buttons, and power button still exist and are openings in the case edge.

If an opening for a 3.5mm jack was an issue for some future design, so would all of the other holes (esp. the lightning port).

comment 10y ago · link · parent

The power ISA specs tend to omit quite a few details about the hardware itself. I wouldn't be surprised if documentation was internal only and the first time we get any details about it is when IBM patches some open source software to take advantage of it.

comment 10y ago · link · parent

No.

We can look at the example given above and clearly know/prove that the access is out of bounds. ie: a C compiler could emit a diagnostic (or decide it's undefined behavior and treat it as unreachable).

There aren't any bounds checks above to eliminate.

comment 10y ago · link · parent

Title is inaccurate, TP-Link only committed to investigate supporting third party firmware (including open source).

From the FCC announcement (similar language is in the ruling):

> committing to investigate security solutions for certain 5 GHz band routers that would permit the use of third-party firmware

comment 10y ago · link · parent

Specifying license info in every single file is entirely unnecessary and done far too often.

Imagine a book including a copyright notice on very single page. The license was specified in the manner the author chose to specify it, and that is sufficient.

comment 10y ago · link · parent

> accusations of Russian hacking continue to cloud the proceedings

I'm fairly sure the information that was revealed after they were released is the real item doing the "clouding".

comment 10y ago · link · parent

And the author of the article disagrees.

comment 10y ago · link · parent

Well, in this case the DHCP option provides a url for a javascript file with a function to be called for each url accessed. I presume there could be some sandboxing of that function, depending on how it is typically used.

Edit: even with sandboxing, I imagine they could encode the url into a hostname for a proxy and then use the DNS requests for the proxy to exfiltrate the url. Proxy auto-config allows specifying "PROXY my_encoded_url.other_data.example.com:8080; DIRECT" so that it would attempt the DNS lookup, and on it's failure fallback to using a direct connection so there wouldn't be much change visible to the user (just a slight extra delay due to dns lookup).

comment 10y ago · link · parent

Yes, WPAD (web proxy auto discover) is for locating a piece of javascript code specified by Proxy auto-config [1], which consists of a single javascript function that is given the url & the host, and returns a proxy to use.

1: https://en.wikipedia.org/wiki/Proxy_auto-config

Edit: note that in addition to SOCKS proxies, this also allows one to provide HTTP proxies. I'm not familiar with the interaction of https traffic with HTTP proxies, but I'd hope browsers avoid using them? Anyone familiar with this care to comment? (specs are sparse in this area)

comment 10y ago · link · parent

My impression from all of this is simply that the tools (and perhaps the etherium op codes themselves) for writing smart contracts still need work.

When programming for hardware began, it was very easy to shoot yourself in the foot with languages of the time, but over time new languages which made it harder (or eliminated certain foot-guns entirely) appeared.

For Etherium, I'd look at whether the ISA (set of opcodes) is complete enough to allow one to create a contract specification language with enough flexibility to do something while allowing a degree a safety.

Have there been attempts at alternates to Etherium's Solidity which generate smart contracts?

comment 10y ago · link · parent

Indeed. I'd be curious which employees (if any) were included, and why.

comment 10y ago · link · parent

Palantir's official reason of "improving employee moral" doesn't seem to really mesh with the conditions they are imposing on the buy-back:

> [...] employees who sell their shares agree agree that they will not compete with Palantir for 12 months or solicit any Palantir employees during that time [...] [and] agree to a nondisclosure arrangement that forbids them from even talking about the repurchase and waive any claims they might have against the company.

The nyt put forwards a reasonable idea that this is a mechanism to increase their perceived value, and I'm inclined to agree.

EDIT: the buzzfeed article [1] paints an even worse picture:

> If they [employees] get any inquiries about Palantir from reporters, the contract says, they must immediately notify Palantir and then email the company a copy of the inquiry within three business days.

[1]: https://www.buzzfeed.com/williamalden/palantir-seeks-to-muzz...

comment 10y ago · link · parent

A vote to leave EU is hardly a vote to destroy itself. Saying it is is blatant fear-mongering.

comment 10y ago · link · parent

Attestation ("I used it") and "proof" are used separately in the quote from the article, implying that the proof must be more that just attestation.

comment 10y ago · link · parent

> To get the $55, a gamer "must attest under oath to their purchase of the product and installation of Linux, provide proof of their purchase or serial number and PlayStation Network Sign-in ID, and submit some proof of their use of the Other OS functionality." To get the $9, PS3 owners must submit a claim that, at the time they bought their console, they "knew about the Other OS, relied upon the Other OS functionality, and intended to use the Other OS functionality."

I seriously doubt very much money will be payed out to users if this settlement is approved.

I'm sure the lawyers would be happy with it though:

> The deal also provides up to $2.25 million in attorneys' fees for the lawyers who brought suit.

That payout is equal to around ~40909 users who are able to prove they used the Other OS functionality. I'm doubtful that many exist.

comment 10y ago · link · parent

On point 2: indeed, given that they are restricting themselves to bash, I would have expected a note of `set -eu -o pipefail`, at least. `-x` (tracing), isn't appropriate for many scripts, though.

On point 3: `: ${FOO:-some default value}` is the typical pattern for ensuring a default value is set.

comment 10y ago · link · parent

Checks are generally more widely accepted than ACH. Joe Nobody generally isn't able to setup ACH directly.

comment 10y ago · link · parent

DWT for armv7m also uses base+power-of-2-mask. I was in the process of creating some code [1] for calculating the best possible power-of-2-mask (or set of masks + bases) given a limit, but never completed it.

1: https://github.com/jmesmon/ccan/blob/maskn/ccan/maskn/maskn....

comment 10y ago · link · parent

I basically was using the Debug Watchpoint and Trace (DWT) block of the armv7m architecture (the ARMv7-M architecture reference manual specifies it).

DWT includes "comparators" typically used as hardware watch points. My methodology was to use one of the DWT comparators to watch for something reading/writing the last u32 of the current task's stack. Note that this might not be perfect as it could be possible for the stack to somehow skip over the last u32.

Then, install a handler for the Debug Monitor exception (which triggers when a watch point is hit) to disable the DWT comparator, print/store the appropriate info, and finally reset the chip.

Essentially, we're behaving like a simple "debug monitor" which only is capable of setting a single hardware watch point automatically.

Note that DWT is technically an optional component in armv7m, so it may not be functional on every chip. That said, most folks like having debug capabilities (this is the same hardware that jtag debuggers use to set watchpoints), so most seem to include them. On that note: doing this can (to some extent) interfere with external debuggers. To mitigate some of that, I did try to use the last DWT comparator instead of the first, but this will really depend on how your debugger works.

comment 10y ago · link · parent

It's really nice to have these things written out, the interfaces used by gcc options that insert extra code/calls are typically undocumented (except for their source code).

kasan, asan, and ubsan are similarly lacking in docs (but are also composed in much the same way). I imagine some of the profiling hooks are done similarly, but I have not yet looked into how to use them.

It'd be really nice if gcc considered these semi-public interfaces that they should document.

> I plan to add other other debugging features in the following weeks. I have an idea on how to use the MPU to prevent thread stack overflows (different from the buffer stack overflow we explored today).

On that note, one can actually abuse the debug hardware on cortex-m3 chips without an MPU to add stack overflow protection. Simply need some hooks into the scheduler around where it switches tasks (some already poison the top of their stacks & check for the poison on switching, the keep-out can typically be applied very close to these locations).

The debug hardware takes a base+mask, so one can theoretically block access to wider spans of memory that a single u32, but at that point calculating the best way to cover that memory range becomes a bit difficult.

comment 10y ago · link · parent

Or just design the FDE to store more than one copy of the encryption key.

Drives that claim to do encryption themselves have their own issues (like not actually using the user provided key for encryption and other crypto failures from developers & companies not familiar with how crypto is supposed to work).

1
1112131415