What Spectre and Meltdown Mean for WebKit - <AUTHOR> https://webkit.org/blog/8048/what-spectre-and-meltdown-mean-for-webkit/ <comment><USER2> I wonder if this shouldn't question whether we should still allow all websites to run javascript by default.

There are websites that genuinely need to run some code, like webmails, online trading platforms, online games, etc. But 99% of the websites have no good reason to do so. Javascript is used to make up for the shortcomings of html/css (different rendering for different screen sizes, lack of local validation of forms, etc), for the mere convenience of developers and for user hostile activities (tracking, messing with default behavior of the mouse, keyboard, clipboard, scrolling, etc).

This might be an opportunity for revisiting html and making it better. An ecommerce, a newspaper or a blog should have no reason to execute client side code to render. Once we have a good enough markup alternative, executing javascript can become an optional feature requiring user authorisation like accessing your camera or location.

[edit] also at the very least it should lead us to question the chain of trust of javascript. When I visit abc.com I should only execute javascript from abc.com or a subdomain. No script either hosted on a non abc.com domain or appearing in an iframe should be executed.

<comment><USER3> > I wonder if this shouldn't question whether we should still allow all > websites to run javascript by default.

Plenty of harmful things are done with C and C++ but no one is saying we should deactivate native apps written in unsafe languages, or not allow anyone to program a GUI unless they can justify the use of canvas space. Yet the web, arguably the most successful and free (as in both beer and freedom) and accessible software platform yet devised, is the only one on which people - erstwhile _hackers_ \- say that code should be a considered a privilege and not a right, or that it doesn't really belong on the web at all, despite javascript being on the web for ~20 years now.

What you're describing seems a lot like adding Windows UAC prompts to the web - no one would find that better, particularly given that anyone can simply turn javascript off in their browser already. This isn't even a javascript problem per se - you could erase javascript from the universe and make the web as plain as you like and Spectre and Meltdown would still exist.

> also at the very least it should lead us to question the chain of trust of > javascript. When I visit abc.com I should only execute javascript from > abc.com or a subdomain. No script either hosted on a non abc.com domain or > appearing in an iframe should be executed.

That seems reasonable, and I would be willing to bet, possible to configure with modern tools. But pretending javascript is a second-class citizen on the web isn't the answer.

<comment><USER2> Random, unexpected, untrusted c/c++ written code doesn't execute on my machine every time I browse a website. The only c/c++ code is code I downloaded and installed or that my OS vendor trusted to include in the OS. It's quite different from javascript where the code is literally executing uninvited, often by 3rd or 4th or 5th parties of the website I visit.

<comment><USER3> >Random, unexpected, untrusted c/c++ written code doesn't execute on my machine every time I browse a website.

It does every time you run a native application, for the same values of "random, unexpected and untrusted."

>It's quite different from javascript where the code is literally executing uninvited, often by 3rd or 4th or 5th parties of the website I visit.

Fine. Turn it off then. That's an option you don't really have in any other runtime, so take advantage of it. But just because you don't want javascript on the web doesn't mean it doesn't belong there when authors choose to include it as part of the content they serve.

Also, how exactly does one run "3rd, 4th or 5th party" javascript?

<comment><USER2> > Also, how exactly does one run "3rd, 4th or 5th party" javascript?

You load a page that includes 3rd party scripts/iframes that themselves load 4th party scripts that themselves load 5th party scripts, etc. You often notice that when you start blocking an ad in your browser and suddenly 10 others disappear at the same time.

</comment></comment></comment></comment></comment><comment><USER4> This is a great article on the subject and I like the clear explanation, with code examples on their fixes.

I don't think I will ever forget the line "we cannot trust branches", it's just amazing that such a fundamental part of the CPU was broken here.

<comment><USER5> I've been explaining to friends that Spectre is like discovering that ESP exists.

Not that Spectre attacks are going to be easy to pull off, but it really makes you reconsider everything that you thought you could take for granted.

<comment><USER6> The scary thing is that without mitigations, it is shockingly easy to pull off. WebKit engineers made multiple fully working exploits internally and we would be hard pressed to do that for other kinds of vulnerabilities. Building full exploits out of your run of the mill use-after-free bug is much harder and requires specific expertise.

Fortunately these mitigations make it way harder.

</comment></comment></comment><comment><USER7> I really hate to see this rush to "make sure our code doesn't use branch prediction". It may be the best fix we have available now, but it's going to create a legacy of bizarre inefficient machine code that will last forever.

<comment><USER8> I feel the opposite. I'd like nothing better than this to be the end of branch prediciton. I can think of no other technology that's been so deterimental to high level languages than branch prediction. How many elegant, beutiful algorithms are replaced by bizarre data structures, etc., because avoiding pipeline stalls will trump any other optimization you can make.

For most things the CPU is doing, we can ignore in high level languages because the compiler/optimizer can turn our high level code into the appropriate byte code to take advantage of deep hardwar magic. Not branch prediction, though, no matter how high level my language, I still must consider pipeline size, cache alignment and so on when designing a novel new container or algorithm or risk it being inexplicitly slow.

Branch prediction is, and always was a hack. Let it die.

<comment><USER9> but removing branch prediction would be to restore those stalls and inefficiencies as the way things are when you don't use those strange data structures, right?

The effect of this seems to be "I wish everything was slower and then the naive implementation would be the best implementation".

<comment><USER8> >restore those stalls and inefficiencies as the way things are when you don't use those strange data structures, right

No, a stall is only a thing because branch prediction exists. Get rid of it and I can go back to not caring about the deep underlying architecture of the hardware I may potentially be running on. And _not_ doing branch prediction isn't inefficient... that's a bizare statement. Branch prediction and speculative execution are themselves inefficiencies (i.e. spending power to do things that will turn out to not be needed fairly often).

>the naive implementation would be the best implementation

Not the naive implementation. A well thought out, developed implementation that is defeated by deep hardware details. The promise of high level languages was always to avoid having to know these sorts of details. In designing an algorithm I should be worried about things like how often I access data (e.g. can I cut down on how many accesses with some clever structure?) and the like. Now that's all trumped by deeply knowing the low level implementation.

<comment><USER10> Nothing changes for high level languages. If they are high level enough they can still fix Spectre and abstract away deep hardware details.

<comment><USER8> That's exactly my point: you _cannot_ abstract away details of pipeline size. You must know this to get the best performance out of your structures and algorithms. There is no way for a compiler/optimizer to look at your container implementation and say "oh, this will potentially overflow the pipeline, let's split the data structure into multiple parts and change the code to handle this new access stategy"... that would be creating entirely new code (what would stepping through a debugger look like on such code?).

</comment></comment></comment></comment></comment></comment><comment><USER11> These mitigations feel like a half measure. To quote the Spectre paper:

"Even code that contains no conditional branches can potentially be at risk."

"long-term solutions will require that instruction set architectures be updated to include clear guidance about the security properties of the processor, and CPU implementations will need to be updated to conform."

It seems too early to declare Spectre class attacks mitigated by the mechanisms presented in the OP.

<comment><USER12> Translated this basically means- for real security to exist, the chip has to be open source down to the layout.

This will not happen. So basically, the interest of the one outweighing the interests of the many, results in the many suffering for what exactly?

<comment><USER13> > open source down to the layout.

I don't see what open source has got to do with any of this.

<comment><USER14> More security experts would be encouraged to have a look at the design and to find flaws early on.

Of course, we all know that this doesn't always happen, see OpenSSL. However, once a major incident (Heartbleed) happened, they did: Many more OpenSSL issues were found and fixed, forks with different trade-offs came into place. For example, LibreSSL traded backwards compatibility with ancient systems for a smaller code base and increased security.

Since CPU designs are not Open Source, and on top of that flooded with patents, nothing like that will happen in this space. Intel and AMD are on their own, rather than having their design checked by a motivated international research community.

<comment><USER13> But these attacks (Meltdown/Spectre) are on a fundamental design approach, which was conceived and developed and researched in the open. People in colleges all over the world study about them. Do you really think this would have been caught much sooner is Intel had released all schematics and layouts to the public?

<comment><USER14> I'm just saying that in general, the incentive for a scientist to put work into an open system is orders of magnitude higher than to put work into a closed system.

To provide a similar example:

The crypto experts around Daniel J. Berstein and Tanja Lange stated publicly at 34C3 that they refused to perform crypto analysis on a certain algorithm that was patented. But they (and others) published good crypto analysis results (working attacks!) just a few months after the patent expired.

<comment><USER15> > I'm just saying that in general, the incentive for a scientist to put work > into an open system is orders of magnitude higher than to put work into a > closed system.

They already do that, I'm sure you can find a multitude of papers on branch prediction and speculative execution if you simply took the time to look. Probably even some by the very same people who designed the Intel chips causing all the fuss.

<comment><USER14> Please refrain from strawman arguments.

Nobody said there is no research, just that openness would lead to more research. Even "a multitude of papers" was obviously not enough to catch this earlier.

On top of that, please refrain from personal attacks.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> Mitigations for Spectre and Meltdown are also being added to the JavaScript VMs in Chrome [1], Firefox [2] and IE/Edge [3].

Are similar mitigations also needed in the VMs for other dynamic languages, such as CPython/PyPy, Ruby MRI and Lua/LuaJIT? What about the JVM and Microsoft's CLR?

Or are these other VMs not susceptible to this form of attack?

[1] [https://www.chromium.org/Home/chromium- security/ssca](https://www.chromium.org/Home/chromium-security/ssca)

[2] [https://blog.mozilla.org/security/2018/01/03/mitigations- lan...](https://blog.mozilla.org/security/2018/01/03/mitigations-landing-new- class-timing-attack/)

[3] [https://blogs.windows.com/msedgedev/2018/01/03/speculative-e...](https://blogs.windows.com/msedgedev/2018/01/03/speculative- execution-mitigations-microsoft-edge-internet-explorer/)

<comment><AUTHOR> > Are similar mitigations also needed in the VMs for other dynamic languages, > such as CPython/PyPy, Ruby MRI and Lua/LuaJIT?

Yes.

> What about the JVM and Microsoft's CLR?

Yes.

<comment><USER16> Thanks. I suspected as much for LuaJIT because, like a JavaScript engine, it supports JIT compilation of untrusted code. It's interesting to hear that PUC Lua also needs these mitigations even though it's only an interpreter.

As for implementations of Python and Ruby, they might not worry about these attacks - because AFAIK they do not try to support secure execution of untrusted code.

</comment></comment></comment><comment><USER17> I see how this addresses some examples of Spectre, and it's clever (hi Filip!) and probably worth doing. However, not all possible Spectre-related vulnerabilities involve type confusion.

E.g. imagine if we had JS code that does

      let x = bigArray[iframeElem.contentWindow.someProperty];

Conceivably that could get compiled to some mix of JIT code and C++ that does

      if (iframeElemOrigin == selfDocumentOrigin) {
        index = ... get someProperty ...
        x = bigArray[index];
      } else {
        ... error ...
      }

and speculative execution could let the property value leak into the cache.

So I'm not optimistic about the prospects for fully automating defenses against Spectre without hardware fixes :-(.

<comment><USER6> We assume no if statements that implement a security check are safe without something. It's not just bounds checks and type checks.

Origin checks are a special case worth considering. I am not sure what you describe would be exploitable in practice (reasons too long to fit in this margin) but worth looking into.

</comment></comment><comment><USER18> Restricting performance.now()'s resolution to 1ms is really bad news :( Once the other mitigations are in place, will the webkit team consider increasing the resolution again? Can we get a Developer menu or Web Inspector option to temporarily enable the old resolution again?

<comment><USER19> 1ms is absolutely overkill IMHO and will require rewriting a lot of code which measures frametime this way. This is not an issue for the precision reductions in the other browsers (Chrome's 100us is just about what's still tolerable, Firefox's 20us is fine). It's probably better to round the measured frametime to the next 'vsync frametime' like 16.667ms or 33.333ms anyway, but I expect a lot of WebGL demos and games to break :/

<comment><USER20> What's an example scenario where you need an ultra-high-resolution timer?

For WebGL, don't you just rely on requestAnimationFrame to call you at the right times, and draw your frame as quickly as possible? What's the benefit of being able to measure the frame time to the nearest microsecond, rather than the nearest millisecond?

<comment><USER21> Timing behavior in literally any game.

<comment><USER20> Does the timer need to be much higher resolution than the frame rate? If so, why?

Maybe you want to measure the frame rate precisely? That is certainly something you can do, but not usually something you need to do.

</comment></comment></comment></comment></comment><comment><USER22> > WebKit is affected because in order to render modern web sites, any web > JavaScript engine must allow untrusted JavaScript code to run on the user's > processor... WebKit is affected by both issues because WebKit allows > untrusted code to run on users' processors.

There's the elephant in the room, though this article doesn't go far enough. Trust isn't binary. It's not that the code isn't formally verified, or doesn't type check. It's that the people running it don't consciously install it, the people distributing it don't know or care what it is, and the people writing it are often adversaries far more sophisticated than the people running it.

<comment><USER23> Unfortunately the genie is out of the bottle already. The web by and large requires javascript, and it's not likely to change anytime soon. So we are stuck with the situation where the defenders (the hardware and software designers) have to be correct 100% of the time on a platform that is constantly changing. The attackers only need to be right once. Maybe someday everything will just be streaming video or something, but that is a long way off.

As for relying on users ability to determine what code is safe to download... It's not like users can be relied on to do the right thing all the time even without javascript. People respond to phishing attacks, download executables sent to their email, reuse passwords... I think a sandbox is a better solution than relying on users to understand what code is trustworthy and what isn't.

<comment><USER22> > The web by and large requires javascript, and it's not likely to change.

While I am mostly a pessimist, this is one place where I harbor a tiny sliver of optimism. Once users recognize that something is awful, and have the means to get rid of it, they eventually do so. Client side Java and Flash are dead, because everyday users figured out that they sucked, and were given the option not to use them. We're getting close to a situation where average people recognize that millisecond auctions to run arbitrary code on their machines are a bad idea, and those people also have the tools to say "no." Hope springs internal...

<comment><USER24> > Client side Java and Flash are dead

Not paying attention to the news? Just wait until WebAssembly gets more mature.

<comment><USER23> I don't think WebAssembly is going to bring back Flash or Java Applets in any meaningful way. Maybe someone will hack something together and use it for niche old Flash game sites, but it's hard to see a reason for widespread adoption of anything new. People have moved on.

Flash and Java Applets may not be "dead" forever, but they also are not likely to ever be more than undead zombies.

<comment><USER24> Again, not paying attention to the news.

[http://teavm.org/](http://teavm.org/)

[https://forums.adobe.com/thread/2432179](https://forums.adobe.com/thread/2432179)

[http://www.mono-project.com/news/2017/08/09/hello- webassembl...](http://www.mono-project.com/news/2017/08/09/hello-webassembly/)

[https://www.hanselman.com/blog/NETAndWebAssemblyIsThisTheFut...](https://www.hanselman.com/blog/NETAndWebAssemblyIsThisTheFutureOfTheFrontend.aspx)

[https://github.com/Microsoft/xaml- standard/issues/197](https://github.com/Microsoft/xaml-standard/issues/197)

<comment><USER23> I think we are talking about different things. Half your links have nothing to do with Flash or Java Applets (.net, XAML?).

You seem to be talking about new platforms that may derive some part from the old. I'm not saying WebAssembly won't be used for new platforms as that's sort of the whole point of it.

What I'm saying is that WebAssembly won't bring back people making Flash .swfs or writing classes derived from java.applet.Applet in any mainstream way. In that sense Flash and Java Applets are dead. Maybe someone will hack something together that allows you to run them, but that won't bring the developers back to the old platforms.

If Oracle or Adobe announce something, maybe the industry will jump on board, but currently I don't see anything in your list that makes me change my mind about Flash and Java Applets being dead and not coming back.

<comment><USER24> TeaVM allows any Java application to be ported into WebAssembly, be it an applet or not.

As3-WebAssembly is a compiler for porting Action Script 3, Flash's programming language, into WebAssembly. Already integrated into Flash Develop.

Microsoft and Xamarin efforts to port Mono into WebAssembly, will allow making Silverlight apps again.

You are free to believe this won't turn out into anything, I rather think we will end up in WebAssembly + Canvas/WebGL in a couple of years.

<comment><USER23> As I said, we are talking about different things. I am talking about running binary executables from old platforms and people making new binaries in the old way again, you seem to be talking about porting old source code to new platforms.

The new platforms may use the old languages, but the runtime libraries are not the same. The new platforms have different APIs and functionalities (no threads in TeaVM for instance).

To simplify my point. ActionScript is just a language. Adobe Flash was much more than that. Maybe companies really will find some compelling reason to start using ActionScript again... but Adobe Flash and it's SWFs will still be dead.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25> One of the most brilliant features in the latest versions of Safari are per- website settings for ad blockers, notifications, location, etc. Between those two vulnerabilities and the general obnoxious useage of JS on websites, I'd love to see the addition of a per-website setting for JS. I would personally turn it off by default and only whitelist a handful of websites.

<comment><USER26> This is what I already get with FF + NoScript.

And yes, I am bored by sites that I visit for the first time that will not show me any meaningful content until I enable layer upon layer of JS. Just not necessary, nor is it safe.

<comment><USER27> Sometimes you can open the developer tools and hack the CSS, because some of those sites hide content with a display: none unless some JavaScript removes it. If it's a site you often navigate to, there are addons like Stylus that can make those changes permanent.

</comment></comment></comment><comment><USER28> I'm really curious how SharedArrayBuffer can be used to create high-precision timers. I'm also wondering what's now broken due to SharedArrayBuffer being removed.

<comment><USER29> From page 10-11 of [1]:

> A shared resource provides a way to build a real counting thread with a > negligible overhead compared to a message passing approach. This already > raised concerns with respect to the creation of a high-resolution clock > [19]. In this method, one worker continuously increments the value of the > buffer without checking for any events on the event queue. The main thread > simply reads the current value from the shared buffer and uses it as a high- > resolution timestamp.

[1] [https://gruss.cc/files/fantastictimers.pdf](https://gruss.cc/files/fantastictimers.pdf)

</comment></comment><comment><USER30> Good work WebKit team in putting this together, it's just as good as Raspberry Pi's note on why it isn't affected by Spectre & Meltdown - [https://www.raspberrypi.org/blog/why-raspberry-pi-isnt- vulne...](https://www.raspberrypi.org/blog/why-raspberry-pi-isnt-vulnerable- to-spectre-or-meltdown/)

Of-course here, the mitigation are being detailed as well.

</comment><comment><USER31> I'm starting to think naming multiple similar vulnerabilities by different names was a mistake. Every article I read I have to go back and remind myself while one was which.

<comment><USER32> Giving them similar names certainly wouldn't make it any easier to remember which one is which.

</comment></comment><comment><USER33> With current CPU design there is only so much that can be done, but the architectural fix seems obvious to me, one that doesn't give up the performance benefits of speculative execution and branch prediction.

The data in caches, the TLB, and the state tracked by branch prediction must be segregated by the protected mode bit. That isn't sufficient so solve all the problems, but seems like it solves a number of them.

<comment><AUTHOR> The problem that JSC is dealing with is that Spectre allows untrusted JS code to read things from the memory of the process that runs it. We don't want to allow that, but I don't think your proposed solution would fix it.

<comment><USER34> If browsers are careful not to put any sensitive information in the same process that is executing JS code, sandboxing could work.

This seems a sensible thing anyway as it would mitigate other attacks as well. Allocating one process for JS-using webpage is expensive though.

<comment><USER6> Chrome is working towards something like this with Site Isolation, and it's a good idea. Unfortunately it's not a complete defense.

First, web pages can load cross origin resources, and that may be enough to get data or a cookie into the attacker's web process. Second, some risks of this attack (e.g. ASLR bypass) don't require any data from another origin to be in process to be dangerous.

<comment><USER34> > web pages can load cross origin resources

I know nothing about web technologies, but maybe this is something we should stop doing, at least for any executable resource? This would prevent JS ads I guess, so win/win?

> Second, some risks of this attack (e.g. ASLR bypass) don't require any data > from another origin to be in process to be dangerous.

yes, ASLR seems to be busted.

<comment><USER6> > > web pages can load cross origin resources > I know nothing about web > technologies, but maybe this is something we should stop doing, at least for > any executable resource? This would prevent JS ads I guess, so win/win?

It's arguably a flaw in the design of the web that loading cross-origin resources is allowed by default. Unfortunately, there isn't a great path to changing this. We may be able to allow websites to opt out of having their resources loaded cross-origin, maybe (similar to X-Frame-Options but for resource types other than frames).

</comment></comment></comment></comment></comment></comment><comment><USER35> Isn't Intel and AMD shipping new fence instructions that prevent speculative execution from progressing beyond a certain point? Why doesn't Webkit use those?

<comment><USER6> The fence instruction that Intel recommends (lfence) is way slower than the techniques described here. We measured a 5x slowdown on Web Assembly trying to use it.

Also we have been working on these mitigations since well before Intel made their suggestion.

<comment><USER36> Have you considered arr[max(i, arr.len)] instead of AND?

<comment><USER37> Max() is not a CPU instruction. It's an abstraction, a function that could be implemented either using a branch (which defeats the whole purpose) or, on some architectures, with something like cmovXX.

Perhaps they wanted a solution that works on Arm, which I think doesn't have cmovXX. Or maybe Intel does speculation with cmovXX used on array index.

<comment><USER38> Cmov can speculate as well (it makes sense from a performance standpoint but that isn't the same as secure ;) )

<comment><USER6> On some CPUs, cmov is known not to speculate, but in those cases it is apparently super slow.

</comment></comment></comment></comment></comment></comment><comment><USER39> I don't understand why they say Spectre can control branching in WebKit. Spectre is an information leak attack, it doesn't allow to modify memory. I could allow to find x in `is x == valueToCheck`. But if this is possible, even before Spectre it's a security issue, it's only harder to guess, and Javascript code should not be allowed to control `x`.

<comment><USER39> I think this part is misleading =>

"Spectre means that an attacker can control branches, so branches alone are no longer adequate for enforcing security properties."

I think they meant "Spectre means an that attacker can ABUSE branches", and in that they are right.

<comment><AUTHOR> This is clarified later: "Spectre means that branches are no longer sufficient for enforcing the security properties of read operations in WebKit."

It's totally true that Spectre allows attackers to control reads, but when they do this, they enter a non-destructive execution mode. They can read but anything they write is thrown away. (To our knowledge, lol.)

<comment><USER39> Thank you for clarifying, that what I thought. Still I find that the article is not clear enough on this point, I fell that some people will read this as "OMG they can control execution remotely, this the apocalypse". I mean to an extent yes, but the results are dropped like you said and the main execution path shouldn't be affected. It only facilitate information leaks AFAIK.

</comment></comment></comment></comment><comment><USER40> What is the reasoning behind reusing version numbers?

<comment><USER41> Apple does this sometimes for macOS. It's probably because it's an application update, not an OS update (so OS patch version does not change), and doesn't require a reboot.

<comment><USER42> This doesn't explain why they kept Safari at the same version number.

<comment><USER41> Oh you're right. Specifically, they kept the CFBundleShortVersionString the same, but updated the CFBundleVersion. My guess is that updating CFBundleShortVersionString is a marketing decision. Maybe Apple is waiting till all the WebKit fixes related to Spectre/Meltdown are available before updating it?

<comment><USER43> Also various Apple systems define CFBundleShortVersionString to be of the format A.B.C, no fourth element allowed. macOS versioning is still stuck with 10 as the A, B identifies the major release and C is the point release that is effectively also marketing driven. With iOS the first number is used for the major releases so C is available for bug fixes.

</comment></comment></comment></comment></comment><comment><USER44> From the patches it seems that the write operation to the array is also protected with masking. What is the reason for it? If due to a bug unrelated to Spectre a JS code could trigger a write beyond the allocated memory, restricting writes to the next power of two just slightly complicates the attacks. This is very different from the reading situation.

<comment><USER38> The masking is done in addition to bounds checks, not instead of, so no it isn't adding a mechanism to write out of bounds - the masking is purely to limit the upper bounds of speculative load distance.

As far as the attack: writing to memory pulls the effected page into the cache just as a read does

</comment></comment><comment><USER44> It is not clear from the article how WebKit avoids changing semantics with array index masking. In JS out-of-bounds access should return undefined, not a random element of the array. To preserve that a branch still has to be made.

<comment><USER45> If you combine index masking with a branch that should still be Ok. For example, if you do `if(idx > arrayLength) return undefined else array[idx & mask]` then the CPU can only predict "return undefined" or "array[idx & mask]", none of which can cause any harm.

<comment><USER44> Does that imply that WebKit always allocate by power of two and a script cannot read the memory for unrelated allocation between the array length and the nearest 2 __n?

<comment><USER20> No, it means attacks are still possible in the memory region just after the buffer, when it's smaller than the next power of two. Not ideal but it's better than nothing.

</comment></comment></comment></comment><comment><USER46> > All type checks are also vulnerable. For example, if some type contains an > integer at offset 8 while another type contains a pointer at offset 8, then > an attacker could use Spectre to bypass the type check that is supposed to > ensure that you can't use the integer to craft an arbitrary pointer.

So, even if WebKit were entirely written in Rust, we'd still be fucked. I'm really starting to think it's about time for me to get out of this business.

<comment><USER47> Something I keep coming back to in all this is that maybe we should be surprised that it's even _possible_ to share a CPU between mutually untrusted programs, let alone do it in so many contexts.

How do we stop his entire class of bugs? What is the Rust for CPU design?

<comment><USER48> CPUs tend to have multiple cores these days, would it be possible to assign (in software) all kernal space work to one or more dedicated cores to mitigate some of the risks?

<comment><USER49> Yes, well, close.

> Since the 2010 Westmere microarchitecture Intel 64 processors also support > 12-bit "process-context identifiers" (PCIDs), which allow retaining TLB > entries for multiple linear-address spaces, with only those that match the > current PCID being used for address translation.[19][20]

[https://en.wikipedia.org/wiki/Translation_lookaside_buffer#P...](https://en.wikipedia.org/wiki/Translation_lookaside_buffer#PCID)

HN discussion: [https://news.ycombinator.com/item?id=16094349](https://news.ycombinator.com/item?id=16094349)

<comment><USER50> That's just Meltdown workaround.

Spectre was more relevant to context.

</comment></comment></comment></comment></comment><comment><USER51> A lot of game-related media has reported that a lot of games are largely unaffected by Spectre and Meltdown. My impression is that the most common result is "about 3%." (With some notable exceptions, however.)

Does this bode well for Apple code, which seems to tend to pull in innovations from games into the general UI?

<comment><USER52> The performance issues come from security mitigations when entering/exiting the kernel during syscalls. So I/O heavy workloads such as databases will suffer, whereas heavy compute-oriented tasks such as games should be mostly OK. This is expected. There is nothing any company can do to "take advantage" of the fact that games are cpu/gpu bound in order to mitigate new performance issues in e.g. databases.

<comment><USER53> Exactly. Though it may encourage different performance best practices now that syscalls are considered more expensive.</comment></comment></comment>


How to start believing in God? - <AUTHOR> I'm atheist. But I did not want to be an atheist. I think life would be easier, happier, if you believe in something divine.
It can be a theistic religion, reincarnation, etc.
Is there a way for an atheist to be a believer?
I know the process can be long. But I think it has to be this way. <comment><USER2> I somewhat understand your situation: I often thought that it would simply be easier to believe in God. I tried really hard growing up (parents both being religious). I thought there was something wrong with me for a while. My sister goes to church, my brother actually believes and goes. And it was in the culture after all.

But nevertheless, I'm still an athiest. And weirdly, an occultist. The viewpoint I have is that it is all a mental construct - something that goes between you and your mind. So when I do "religion", in my world known greater as Chaos magick, I really only have to believe in the moment, and then get back to the real world where I don't. In a way, it is like having a backup for all the things you can't quite explain, and gives a way to focus your thoughts towards goals or having meaning behind it all and so on. Perhaps it is applied psychology. It doesn't require me to believe in dieties, but it is an option if I would choose it (I personally don't).

But I only really got here by reading about a lot of different religions and things like that, along with a long period of self-realization. And that is where I think you should start. If you are under 25, I'd suggest waiting until later to make a choice, mostly because the brain is different at that time.

It might not matter if you actually believe in the god, so long as the basic construct of the religion has a positive impact on your life. Maybe the community does it: maybe it yields to scientific explanation first, and so on.

Much luck to you.

</comment><comment><USER3> My two cents...

Why not start by investigating some religions first, in order to find those whose values, dogmas, rules, etc., align with your own set of values? I guess that it can be easier to make the "switch" if there are something to adopt as own, or to feel identified.

As example, I could use myself: I'm also an atheist, but, some years ago I was very interested in the mythology of the Scandinavian region (as, you know, there are some "revival movement" around the Heathen/Odinist religion — I can be wrong in the "labels", sorry in advance for that) and somehow I got into a group of people who were trying to follow those "religious beliefs", more important, I felt identified with most of the ideas of those beliefs... So, in resume, thanks for that feeling, I almost start to believe on such divinities (albeit not in the same sense of the Abrahamic religions)... But I guess that my lack of conviction on believe in such things is so hardwired that eventually I left that path and continued my life as an atheist.

</comment><comment><USER4> "I want to believe something I don't believe."

...

A puzzling request. I'd suggest doing some comparative religion research and finding something that resonates and start from there.

That said: you don't believe in something divine for a _reason_. You're basically asking for a way to brainwash yourself.

So. What makes you think life would be "easier and happier" if you believed in something "divine"? What is your definition of "divine", something super- natural?

For me (militant agnostic, atheist for all practical purposes) the sheer magnitude and mystery of the universe-as-we-know-it is more than enough to believe in. I haven't found it necessary to resort to a "God of the gaps". Instead I'm just fine not knowing everything and not needing a reason for things to be the way they are.

I'm also a Buddhist of the variety that doesn't believe in super-natural "beings", divine intervention, etc. I'm not unhappy because I believe we're "just" here for no readily-apparent reason other than that's just the way things worked out. Might I be wrong? Yup. Do I have any _reason_ to believe I'm wrong? So far, no. It doesn't make me sad, it doesn't make me happy, it just _is_.

What makes me happy or sad is the human condition, how we treat each other, how we treat ourselves and our environs, etc. Believing in something "divine" would not change that. If anything it'd piss me off to believe there were interventionist god/ddess/s that don't bother to, or care enough to, prod us in the right direction. All evidence leads me to believe we're on our own regardless of the root cause of our existence, and I don't need any more than that.

</comment><comment><USER5> How about the simulationist argument?

Atheist:

1) There is no god.

2) That means no supernatural woo, ghosts spirits, souls etc.

3) So everything you are comes from natural process happing in your brain.

4) This means that there is probably no fundamental reason the same processes couldn't be run in a computer. It might even be easy since it takes only a few watts in a few cubic inches and is duplicated billions of times by nature.

5) If it can be done it probably will be given time.

6) There can only be one "real" reality but an unlimited number of potential simulated realities.

7) So the overwhelming likelihood is that this reality is one of those simulations. A created thing. By something/someone greater.

Theist:

<comment><USER4> Big freakin' leap between 1-6 and 7. Nothing at all suggests it's an "overwhelming likelihood", and it begs the question of our creator's creation.

Occam's razor: it's not simpler to believe we're a simulation created by something else who's asking the same question.

<comment><USER5> Oh I definitely agree it's not very satisfying from the "why is there something and not nothing" perspective.

But the creator's creator is irrelevant at the first layer. There would be no way at all to reach or experience the "god" at the next layer up. Op wanted someone in the office of "god". Simulationism gives you one without too much existential overhead.

<comment><USER4> I don't see the "simulation" argument as anything else than a "god of the gaps" substitution at this point.

The "creator's creator" may be "irrelevant" at the first layer, but again, it just begs the question. Let's say we discover that we _are_ in a simulation. Now we have to ask who made the simulation (our creator(s)), and we're right back where we started from again.

It's just another layer over the exact same question.

<comment><USER5> I fully concede this point until I creat a sim of my own and look in to find my creatures having the same argument.

Then I'll try to stop thinking so much!

<comment><USER4> HOW DO WE KNOW YOU DIDN'T CREATE THIS ONE

<comment><USER5> :)

It was homework in cosmology class. Given one Davelnewton, create a minimum viable universe around him. You figured it out already!? Looks like I'm gettin another D-.

Sheesh. At this rate I'm never gonna graduate and get my G.O.D.

<comment><USER4> If this is viable I'd hate to see a crappy one. Clearly you were running on fumes when you created my friend NPCs.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> Seems to me like it would require a complete leap of pure faith great enough for you to be able to believe in almost anything you choose, regardless of whether it was actually divine or not.

Beliefs worthy of being faithful to can often be traditional, other times realistic, sometimes both.

Given a choice, choose carefully what to believe and have faith in.

Most religious people are not given a true choice, on the one hand many of them might have been born with something you were not, on the other hand you might have been born with something out-of-reach for them.

Happy Holidays in all their forms.

</comment><comment><AUTHOR> All excellent answers.

Thank you very much.

On second thought, I think my problem is different.

What bothers me, is something else.

I asked another question: [https://news.ycombinator.com/item?id=13046232](https://news.ycombinator.com/item?id=13046232).

</comment><comment><USER7> I think what you are asking for is impossible. Sounds like you are saying that you want the easy way out but not to feel bad you took the easy way out.

Don't mean to sound harsh, but that is what I read.

</comment><comment><USER8> Just stop thinking critically, and you'll be there in a week or two

</comment><comment><USER9> Get a King James Bible and start reading.

</comment><comment><USER10> Think about what you are. Your world is basically the state of your brain at this moment in time. A moment later, it will have changed. It's not the same brain anymore, ever so slightly. Yet, you perceive yourself as continuing.

When you lose consciousness or sleep, you seemingly skip over some parts of time. To you it seems continuous, you're okay with the lost time. Things are continuous from your point of view, even when not in sync with real time.

Suppose a very talented doctor could disassemble your brain into 5 pieces, keeps them alive in a vat for an hour and reattaches them such that no harm was done. Supposedly even then you would perceive things as continuous. Next he does it again, except this time into 50 pieces. You are still "yourself". Then little by little increasing this into 1000 pieces, a million pieces, all the way to individual atoms and back. Here it might be a bit of a personal choice, but I would say that even then I'm still me and things seem continuous from my perspective (although probably pretty weird experience).

Now let's say that after he cuts your brain to individual atoms, just as a joke he then stores them for a week before putting them back together again just to see your reaction when you realize a whole month has gone by unnoticeably to you.

He tries to do this joke again, except this time for a month, but unfortunately he gets hit by a bus before he has the chance to put you back together. Now quadrillions of years pass, human civilization no longer exists, and your atoms are flying around in space, occasionally recombining as parts of planets or stars, which then are destroyed and scatter and again become something else.

All kinds of crazy civilizations come and go, but one day a particularly bizarre religion emerges on an alien world. They have determined that for the rest of eternity, their task is to collect atoms from all around the universe and then recombine them in every possible way. Sometimes while doing this their own world is destroyed, but another civilization later on has a similar religion that tries a similar thing, and after endless cycles of this one day one of them happens to put together the combination that happens to be exactly you at the instant the doctor disassembled you.

So you wake up, seemingly no time has passed for you, but here you are again feeling great. You never do find out what happens to the doctor and you live many happy years among the hospitable aliens. You become famous on the planet after you reveal your backstory, and the local scientists decide to replicate his experiment on you. They disassemble you to pieces, but unluckily right then a terrorist attack destroys the facility and they don't have the opportunity to put you back together.

Now insane amounts of time pass again. The universe undergoes the big crunch, but it turns out that every gnab gib is followed by another big bang, except each iteration has a slight random element. Unimaginably many such cycles come and go, and eventually one emerges that is exactly like the one where you got taken apart, except this time there is no terrorist attack. You don't notice at all, but huge amounts of time actually have passed and you are in a new universe.

Every time something destroys you, there will be another point in time where it didn't. So now you have immortality. That's a good start for a religion, but let's go further.

Suppose one time you get destroyed, but it happens that your exact configuration happened to be one that the crazy alien permutation religion tried in the recent past. You wake up, but now you're in the past. But from your point it's continuous, you pick up exactly where you were. Hey it's not just the pattern that is the same, but they even happen to be the same atoms.

Now you continue living your life, but to fit in better in the alien world, you decide to undergo some plastic surgery to look more like the locals. The local doctors helpfully even take out a brain tumor they happen to find. Now your body and mind are a bit different from before, but it still feels continuous to you. You take a vacation to another planet, which just happens to be the one where you were living the last time you got destroyed. There you happen to walk past your past self on the street, but don't even notice yourself. The other you does notice you however, since you're a tourist from another planet.

This way during your endless existence, the pattern of your atoms sometimes changes, but it still feels continuous to you. One day you go wild and decide to recreate the movie Benjamin Button just for fun. The local doctors go through successive iterations to make you younger and younger. It's a fun experiment. However just as they've gotten to the baby stage, unfortunately a gamma-ray burst wipes out their world and your baby version gets destroyed.

But luckily after several cycles into the future, a world emerges where a woman happens to give birth to a baby which is just as you were, and even the atoms again happen to be the same (that took a few googol cycles to occur, but it was worth the wait). You are born to the world as this baby, and shrug off your hazy memories of a life before that as just childish fantasies.

In this way as the cycles go on and on, your pattern takes on many forms. Sometimes jumping forwards, sometimes backwards. Sometimes you are a baby, sometimes an alien, sometimes a man dying of old age. Everyone you encounter is actually you. So neat, now our religion has not only eternal life, but rebirth as well. Have those TODOs crossed out.

But it's not really a proper religion without a god, is it? OK, actually unbeknownst to you, in one cycle the universe had turned out such that there is an alien superpower remotely monitoring all life on your planet. They call themselves the Universe Knowers, or U.K. for short. The U.K. monitors everything you do. If they like what you did, if you lived a good life, if you get destroyed they recreate your pattern in hell or heaven, custom-made just for your beliefs (or your money back).

Most of the cycles you happen to be born into a universe with no U.K. in it, but sometimes there is one. The criteria they use to determine your fate depends on the cycle you happen to be in. So there you have it: eternal life, reincarnation and not just one god but every god ever.

<comment><USER11> There is an overwhelming amount of physical and documented evidence of the old testament and new testament folks. Here is the last (2) paradoxes that remain. Babel is where political correctness, the bane to truth, began. We as believers have not atoned for nor corrected the hubris in our rational(logic) beliefs that man is superior to god. Service to those in need will clear this up for you, on a person basis.

The second paradox that must be "atoned for" is the fact that nowhere in the new or old testament does the scriptures authorize "Christians" to stop celebrating all of those old testament (Jewish?) feast days. It's an insult of the law and god is not pleased with Christians that abandoned those days of celebration. Religious celebration is how we show God we love and honor what he has does for us.

IT was and continues to be a 'business' decision by the Catholic Church and most modern day (Christian) religions. Besides, If Christians returned to honoring the law (the OT) then Jews would be much more amicable to embracing their brothers of the law.

Like it or not, the past is a problem; but both Jews and Christian anxiously away Messiah and an emphasis on the OT does not marginalize the gift of Jesus Christ; never has and never will. How and when Jews embrace Jesus, is between then and god. Besides there are probable more messianic Jews than Torah Jews that truly believe. Most are secretive about it.

A simple 1 week trip to Israel and Jerusalem will fix your doubts, brah.</comment></comment>


Researchers Discover Rootkit Exploit in Intel Processors That Dates Back to 1997 - <AUTHOR> http://hothardware.com/news/researchers-discover-rootkit-exploit-in-intel-processors-that-dates-back-to-1997

<comment><USER2> Discussed 2 days ago: [https://news.ycombinator.com/item?id=10020134](https://news.ycombinator.com/item?id=10020134)

</comment><comment><AUTHOR> The actual white paper: [https://www.blackhat.com/docs/us-15/materials/us-15-Domas- Th...](https://www.blackhat.com/docs/us-15/materials/us-15-Domas-The-Memory- Sinkhole-Unleashing-An-x86-Design-Flaw-Allowing-Universal-Privilege- Escalation-wp.pdf)

</comment><comment><USER3> No, they don't. In order to "exploit" this "bug" you need to be in ring 0. And if you are in ring 0 you own everything anyway. This is clickbait.

<comment><USER4> Why did you feel the need to put exploit and bug in quotes? No, ring 0 doesn't own everything, and I suggest reading the paper[1] or the presentation[2] before armchair judging.

1\. [https://www.blackhat.com/docs/us-15/materials/us-15-Domas- Th...](https://www.blackhat.com/docs/us-15/materials/us-15-Domas-The-Memory- Sinkhole-Unleashing-An-x86-Design-Flaw-Allowing-Universal-Privilege- Escalation-wp.pdf)

2\. [https://github.com/xoreaxeaxeax/sinkhole/raw/master/us-15-Do...](https://github.com/xoreaxeaxeax/sinkhole/raw/master/us-15-Domas- TheMemorySinkhole.pdf)</comment></comment>


Poll Finds 70% of Bitcoin Users Prefer Segwit for Scaling - <AUTHOR> https://coinjournal.net/scaling-bitcoin-survey/ <comment><USER2> Warning for those who are not following this debate closely: This is an incredibly polarizing discussion. Approach all comments and articles posted about this subject carefully.

Though I'd like to try and provide a summary for people who don't know what's going on.

Bitcoin desperately needs to scale to handle higher transaction demand. It can take multiple hours for transactions to be confirmed, and due to the demand, fees are high ($2-3 per transaction for fast confirmation.) A technical approach (SegWit) was proposed and implemented by the Bitcoin developers in order to improve transaction capacity a couple years ago. This also brings along a number of innovations which can help implement what is termed 'Layer 2' solutions to happen inside Bitcoin, instead of using an altcoin like Litecoin or Ethereum. Think of this enabling a Visa-like entity to provide instant settlement services denominated in BTC, and secured by the Bitcoin blockchain.

However, this upgrade is very contentious with the miners who are entrusted with securing the blockchain against attackers. Bitcoin mining now is a professional enterprise where major players need to be located in places with cheap ASIC production and cheap electricity to have any hope of making a profit. In some cases, they see these new layer 2 solutions as reducing their transaction fees, which are becoming a large percentage of their profits. Instead, they have been proposing just a larger base block size limit, which will solve the transaction backlog and send the fees to the miners, but then not make progress moving forward with what users and developers want, which is increased innovation. In addition, the larger block size is seen as increasing centralization of mining since only larger providers will be able to deal with the extra data rates (since there is an advantage to having quick transfers of newly created blocks when mining.)

Since Bitcoin is decentralized, anyone can run any software. There are mechanisms in place for miners to 'vote' with their hashpower/mining rate to agree on software changes, then after enough support, the mechanism activates. This is the easiest way to make sure global upgrades happen smoothly and in a coordinated fashion. However, users are becoming desperate and are looking for other ways to make these innovations happen without needing support from the miners.

Unfortunately the Internet and echo chambers have destroyed the hope of meaningful discussion about this topic. Please, HN commenters, do not bring in Reddit-level comments here... Provide sources and a balanced view, and please be respectful.

<comment><USER3> An additional wrench thrown into the mix is the fact that the Ethereum and Ripple developers/owners have a lot to gain by trying to make sure Bitcoin is unable to scale. It doesn't take much effort (since the miners are already hesitant about agreeing to some update) to sabotage the whole situation.

It's quite possible that they're funding both sides of the debate to make sure none of them generates a super-majority.

It's also quite possible that Bitcoin developers who were once heavily invested in Bitcoin have already switched to Ethereum, and now are actively sabotaging it.

<comment><USER4> See, these are exactly the kind of poisonous claims that make this an impossible debate.

In short: extraordinary claims require extraordinary evidence.

If you want to claim an altcoin conspiracy to destroy Bitcoin, prove it. Otherwise take your baseless gossip elsewhere, please.

<comment><USER5> Perceived 'crypto economic incentives' will taint any controversial decision in most public chains. Those incentives must be tested to prove that they work. If they fail, we rebuild chains with better incentives; this is how bitcoin became anti-fragile.

</comment></comment></comment></comment><comment><USER6> Actually 30%, see [https://coin.dance/blocks](https://coin.dance/blocks)

And 40% for Bitcoin Unlimited (Emergent Consensus)

<comment><USER7> Miner signalling != user preference

<comment><USER8> bitcoin users != coinjournal.net readers

</comment></comment></comment><comment><USER9> Oh boy another incoming Bitcoin proposal civil war in the comments section. I can't wait until nullc gets here. Why is it so hard to have a non-censored, rational discussion about this topic without it becoming some ridiculous flame war every time?

<comment><USER10> > Why is it so hard to have a non-censored, rational discussion about this > topic without it becoming some ridiculous flame war every time?

Because each side thinks they are acting selflessly in the best interests of Bitcoin with sound technical reasoning, while the other side has sinister ulterior motives. Bitcoin scaling debates (like most political debates) are riddled with assumptions of bad faith.

What _really_ makes it complicated is that, to some extent, both sides are right: there really are people on each side who stand to profit greatly from their proposal winning and thus have their finger on the scale. Of course, each side only notices these people when they belong to the other camp.

</comment></comment><comment><USER10> To people entering this comment section: if you're not totally caught up on this debate and only have a passing interest in Bitcoin-- leave now, there's nothing for you here. This thread is going to be a lot of sound and fury from the two sides of the civil war, and little else.

<comment><USER11> I occasionally dip in to r/bitcoin and am repeatedly baffled by the whole debate; both in its inscrutability and the level of (let's say) "passion" exhibited. Still I have no real clue of the issues.

<comment><USER12> I'm guessing that many of the people who participate in these communities have a significant number of bitcoins to their names. Given the current trading price of BTCs many of them are probably virtual millionaires. All that could go poof if the coin were to collapse. Not really surprising that they would be very passionate about these issues.

<comment><USER11> That may be part of it, but if it were purely about wealth they could surely just sell some of those holdings right now and become actual millionaires.

</comment></comment></comment></comment><comment><USER13> I have no horse in this race. I don't own any BTC. What I find fascinating about Bitcoin is how completely unapproachable it is. All of this technical bullshit is too much for a layperson, let alone an uninterested developer. If you want normal people to use this as a meaningful currency, the currency has to just work.

So far Bitcoin has proven to me over and over again that it just doesn't work.

What the fuck is "Emergent Consensus" or "Segregated Witness" or any of this? From the perspective of a regular person, I just don't care. I don't see why anyone else should, either. Why is one Bitcoin worth more than thousands of units of the strongest currencies in the world?

<comment><USER5> As a lay person they shouldn't care unless it solves a problem they have. It is only too much for a layperson until bitcoin is a good answer for the problem they have. From women in Saudi Arabia who cannot own bank accounts, to the people of Argentina and Venezuela who are desperate to move their wealth into another asset, bitcoin still offers them an answer despite its great volatility.

One bitcoin is worth more than the current world reserve currency because the market demands it. Even if it is mostly speculators with cheap money that flows from all of the central banks printing it and offering negative interest rates.

</comment></comment><comment><USER14> Not completely on topic but...what would happen if one of these new features came out and somebody found a security flaw in it? For example a buffer overflow that you could use to crash miners? If all the clients are running the same client software and crashing them all can have serious financial implications I can't help but feel it's only a matter of time unless I'm missing something about how miners work.

<comment><USER15> This is why it's important that it's well tested. Segwit is activated on multiple coins already and is being tested in the real world as we speak.

Alternative options such as EC (which uses Xthin blocks) have already proven to have multiple vulnerabilities and there are many instances of large scale crashing of nodes. Of course the miners that are signaling for this option aren't actually using the software (it's not at all stable, they don't actually want EC and are just using it to stall for higher fees) so they were not affected by the crash, if they were 40% of the hashpower would have gone offline which is a pretty big deal.

</comment></comment><comment><USER16> Where do I sign up for the fight club?

<comment><USER2> Pick your side:

[http://www.reddit.com/r/bitcoin](http://www.reddit.com/r/bitcoin) [http://www.reddit.com/r/btc](http://www.reddit.com/r/btc)

</comment></comment><comment><USER17> What's a typical btc txn fee nowadays?

<comment><USER18> About $2.32 according to [http://www.bitcoinrollercoaster.com/](http://www.bitcoinrollercoaster.com/)

<comment><USER17> Wow. I managed to send some coin: $5 for 17c fee recently.</comment></comment></comment>


Heart disease contagious?: non-communicable diseases may spread via gut bacteria - <AUTHOR> https://www.healthing.ca/diseases-and-conditions/heart-conditions/heart-disease-contagious-study-suggests-non-communicable-diseases-might-be-spread-through-gut-bacteria <comment><AUTHOR> Link to the study: [https://science.sciencemag.org/content/367/6475/250.summary](https://science.sciencemag.org/content/367/6475/250.summary)</comment>


23 million users. Story of an online paper doll site. - <AUTHOR> http://www.nnsense.com/2008/11/story-of-stardollcom-co-founders-story.html

<comment><AUTHOR> It's a fascinating story: the original founder of StarDoll.com is a 50+ year old woman.</comment>


Ask HN: What's the worst possible outcome for Uber in the Waymo vs. Uber case? - <AUTHOR> Can someone break down what's the worst possible consequence for Uber if the judge found them guilty criminally? <comment><USER3> You probably just expressed that imprecisely, but companies can not be found to have acted criminally. Crimes can only be committed by bodies that can be put in prison.

What they can do is assert that some critical part of technology that uber has access to originated at waymo and was brought to uber by whoever brought it there - in an illegal way.

If that's the case, they can be both forced to pay damages and be forced to turn over (essentially delete) the things they are in possession of that are not "theirs". In that case, anything that uber has developed "on top of" what had been stolen, could be assigned to waymo as well. Practically, this is just all settled with money. they won't run back and forth with data and software. Waymo gets however much they are assigned in damages and Uber will be told to not use these things anymore.

That can easily shut the whole Uber self driving car operation down - <USER2> cripple it so much that continuing won't be feasible because they would run out of money first/be unfundable.

The guy who actually stole things from Waymo is obviously going to have a bad time because he did (allegedly) commit a crime. In the "innocent until proven guilty" way. I don't know what he has or has not don, but if he did take trade secrets with him, thats going to be a problem.

<comment><USER4> Actually, a corporation can be found to have committed a crime. It can't go to prison, but there are other possible penalties. In some states, the corporation could even be dissolved if convicted of felonies.

It can't happen in this particular lawsuit because it's a civil lawsuit. The government would have to bring criminal charges in a separate legal proceeding.

In this civil case, yes, the court can award damages and enjoin Uber from using anything it allegedly stole from Waymo. that could, as you say, cripple their entire self-driving car operation.

</comment></comment><comment><USER5> The judge could decide that there is enough evidence that Uber is benefiting from technology stolen from Waymo, that the judge requires Uber to halt part or all of its self-driving car program until the trial is decided.

The trial is currently scheduled for October. But that doesn't mean it will happen then. There are a lot of things that can delay a trial. Waymo could even deliberately help some of them to happen. So the Uber program could be delayed by anything from five months to a few years. If Uber thinks that the battle will be won or lost within five years, that delay would be pretty catastrophic.</comment>


The history of management consulting : The New Yorker - <AUTHOR> http://www.newyorker.com/arts/critics/atlarge/2009/10/12/091012crat_atlarge_lepore?printable=true <comment><USER2> This was really good and surprising. I did not knew much about Taylor and Taylorism, except the vague stereotype that he and his acolytes were nothing more than scientific slavedrivers. Finding out that some were labour advocates is at least surprising.

</comment><comment><USER3> It isn't so much a history of management consulting as it is a history of the advent of business as a science.

Interesting that Conde Nast, The New Yorker's parent company, has recently been a high profile client of McKinsey.

</comment><comment><USER4> Talk about an incoherent article.</comment>


Why People Block Ads, and What It Means for Marketers and Advertisers - <AUTHOR> https://research.hubspot.com/reports/why-people-block-ads-and-what-it-means-for-marketers-and-advertisers <comment><USER2> Clicked through and got the answer within a second.

[http://i.imgur.com/4hjX71d.png](http://i.imgur.com/4hjX71d.png)

What a succinct way to demonstrate why people use Ad/Script Blockers.

HubSpot is geared towards marketers, so I can understand why they push the limits in terms of seeing what they can get away with. But, when you run a content site and you want to send anonymous users Desktop Notifications, you have to ask yourself: "is this really a sustainable way to use desktop notifications, or am I just ruining it for everyone?"

The "fake notification" at the bottom too... How is that any better than those banner ads that pretend to be OS dialog boxes?

<comment><USER3> Interesting, I didn't get that when I went to the site, wonder if it's being A-B tested or something.

<comment> w-ll Disable your ad blocker.

</comment></comment></comment><comment><USER4> Yes, ads are annoying, a security risk, and obstruct content, but: they also are a deliberate attempt to subconsciously influence my decision making. Saying, "here is this product you may not have known about, here is what it does" is one thing. Showing me pictures of attractive people to trick me into associating <brand> with <good feels> is malicious.

Why would I agree to that?

<comment><USER5> If you watch TV/look at billboards, you are already being tricked everyday. Why advts online are so malicious?

Edit: This was a genuine question and I don't understand the down votes :|

<comment><USER4> I subscribe to Netflix for that reason.

Online ads are not uniquely malicious, although they are more pervasive (even reading a magazine, the page I am actively reading will not have an ad in between paragraphs, though the next page might). I do think modern marketing firms (and often therefore web) have developed more effective -- and therefore bad -- techniques to have the effect they are paid for.

PS. I upvoted you because I don't think it was a bad question. If I had to guess, it may be misconstrued as a [bad] rhetorical question arguing that "you already have to put up with X, so it's pointless/inconsistent/illogical to reduce your exposure to X".

<comment><USER5> True! Guess a couple of banner advts on the side of the page wouldn't bother anyone, the intrusive one's definitely are the reason most hate advts.

</comment></comment></comment></comment><comment><USER6> Ads break several basic rules of social interaction, namely "Don't offer unsolicited advice to random strangers." It's simply very rude. If I haven't asked you for advice, then you shouldn't be giving any to me. End of story.

<comment><USER7> Ok, so no ads at all. Are you ok with no free news websites, only premium TV channels, etc?

<comment><USER8> Yes. The BBC seems to be doing quite well in the UK with no ads.

<comment><USER9> Ah, but those BBC guys collect a licensing tax on everyone in the UK. They're like a state sponsored premium channel.

[https://en.wikipedia.org/wiki/Television_licensing_in_the_Un...](https://en.wikipedia.org/wiki/Television_licensing_in_the_United_Kingdom)

<comment><USER8> Yep. Just one of many business models that don't involve hocking malware to your users.

</comment></comment></comment></comment></comment><comment><AUTHOR> The survey confirms that the number one reason people block adverts is because they are annoying. There's also genuine privacy and security concerns.

Surely advertisers don't need surveys to point this out to them. And if this is common knowledge then why is nobody doing anything about it?

Why are ads still slowing down loading the actual content or taking over control of the web page? How hard is it to get this right?

</comment><comment><USER10> Honestly I was very fine with just ignoring ads on web pages like I did for a long time, but it's gotten so out of hand in so many ways: \- Risk of downloading malware \- Having to download an additional several megabytes of content I don't even want, but must pay for \- Dark pattern UI to get me to click things I'm not interested in \- Reverse, poorly made UI that's difficult to get rid of (stupid subscription things)

You can argue the ethics of this all day with me but in the end I just don't care. I'm paying for the data pipeline, I'm paying for and maintaining the device that can be infected, and your business model isn't my problem. If you want me to look at ads, make it happen in such a way where it doesn't degrade the rest of the experience. Several websites have done it just fine.

<comment><USER11> Why not just stay away from those sites completely?

<comment><USER12> Why not punish those sites economically by draining their resources while providing no new ad revenue? That might actually incentivise them to come up with a better model going forward rather than letting the web slowly degrade into a malicious cesspool that no one reads.

<comment><USER11> Why would you punish someone for making an offer you don't like and that other people are fine with accepting?

<comment><USER12> Why do you imagine the web works on offers and not requests?

</comment></comment></comment></comment></comment><comment><USER13> Here's the important part:

"The effect ad blockers have had on publishers has been tremendous, with advertising organizations estimating that by 2020, $35 billion dollars per year will be lost as a result of blocked ads"

I prefer to consider the amazing things that will be done in 2020 instead of pissing away $35 billion on nothing.

<comment><USER14> $35 billion! We're winning.

For every site that has an ad-blocker, there's usually another one with comparable content that doesn't.

<comment><USER13> Yes - we're definitely winning :-)

Did you mean "ad-blocker-blocker", or maybe "ad-blocker-blocker-blocker- blocker" ?

<comment><USER15> As long as you have more blocking tech than the non-tech-savvy public, you should be fine. Those people now know about ad blocking (they're a little late to the party), so things like ad block killer lists and extra extensions to block blockers should work for another 15 years or so before it becomes enough of a problem that it's worth it for ad companies to respond.

</comment></comment></comment></comment><comment><USER16> I would like to take the opportunity to plug for my favorite adblocker, Ublock Origin. It doesn't have a whitelist like ABP, and has a very good picker to remove ads in case some sneak through.

</comment><comment><USER17> Where is the "Because I want to limit what can be shown to my kids " option? Seriously, I run an ad blocker at home strictly because I want to control what advertisers are broadcasting to my children.

</comment><comment><USER18> I thought this was an excellent discussion (and yes I told the page that it could not send me notifications :-)) I particularly liked that they asked some proactive questions about whether or not people would pay for content. I'm on record as saying that I think this Ad/Adblock war ends with the destruction of free content on the web. Basically the only "free/ad supported" stuff will be stuff that was cribbed by a wage slave in a mechanical turk like situation from other (nominally "pirated" sources). And there will be the 'pay' web which will have some way of distributing money to the decent journalism. I like the Blendle approach so far I hope it can hold up.

I also think the ads the survive are going to be product placement (for brand awareness) that will be ads intermingled with the content, whether it is a billboard being photoshopped into a music video or all the characters in the content using microsoft products, but basically blended into the story. And the other ads will switch to pay per action (CPA) rather than simply clicking.

Could be totally wrong too, we could just end up in click-counter-click hell but I just can't see that as sustainable.

<comment><USER15> Re: sustainable, it certainly was before everyone was trying to get rich from the Internet, and IMO the content was typically much better back then, since it was published not to make money but to further humanity and spread knowledge. That's the Internet I wish we could go back to, not some free- market micropayment dystopia.

</comment></comment><comment><USER7> My problem with online ads are that they are too cheap. The company behind the ad I am seeing may have only spent a couple of bucks to get it viewed by a few thousand people.

With ads so cheap, there is no way to distinguish between legit companies and scams/crappy products. With TV ads on popular programs, I know the company at least is good enough to afford the ad.

<comment><USER19> > good enough to afford the ad

"Wealthy" or "big" neither equals nor implies "good". The only thing that's certain is that when you buy an advertised product, you're paying a premium to fund their marketing.

<comment><USER7> I think it is kinda like the handicap principle in biology. The fact that they can afford to waste money on advertising shows that they are 'fit'. I am not saying it is a perfect mechanism, but it does show SOMETHING.

<comment><USER15> Since it's so cheap, the thing they're good at may very well just be making an ad to get clicks to sell a junk product or service. This also scales very well. Consider Coke; bad for your teeth and causes diabetes. Expensive for what it is and made with junk ingredients. Huge hit with consumers. Advertises like crazy.

</comment></comment></comment></comment><comment><USER20> Aaaaand ScamSpot wants to put notifications in my browser.

<comment><USER10> Oh God, whose brilliant idea was that anyway. I noticed that start to pop up awhile ago. Browsers do not need notifications...

<comment><USER8> Websites are slowly, poorly, and individually re-inventing the desktop GUIs we had 20 years ago. Welcome to the future.

</comment></comment></comment><comment><USER21> People block malware, ads are often hosted on the same domains or networks.

<comment><USER22> One of 4 top responses. Here's the actual breakdown from the article:

> 1\. Ads are annoying and intrusive (64%) 2\. Ads are disruptive (54%) 3\. > Ads create security concerns (39%) 4\. Ads affect load time and bandwidth > usage (36%)

<comment> nikki-9696 Thanks for posting that. I didn't read the article, because as soon as I clicked through, I got a notification about notifications and a banner ad. Closed the tab.

</comment></comment></comment><comment><USER23> It's funny how different the reaction is on HN from the users they surveyed. Most of the ad blocker users they cited seemed like they would be happy if websites would clean up their ads and make them less prominent or annoying, while a minority would be willing to pay for the content on the site instead. Very few of the ads-are-murder zealots that we usually get around here :).

</comment><comment><USER19> I'm positively surprised by the rather large mindshare for security concerns among adblock users. I've seen some anti-adblocking campaigns in the past (most recently the ridiculous BlockXIT bullshit from stern.de) and when they try to explain away the reasons for adblocking, they always omit the security concerns. Probably because they are the hardest to invalidate.

</comment><comment><USER24> I thought this was going to go in a different direction based on HubSpot's ads they run in the "Embedded" podcast: in those, they say they want to get back to the story, too, and that's the extent of the messaging. I appreciate it, and it obviously worked fine for brand recognition, even if I couldn't have told you what they do for a living.

</comment><comment><USER25> Now, if only Hubspot took their own advice... They say the reason people block ads is because they are annoying, and yet Hubspot has one of the most annoying marketing teams I've encountered. They probably think deluging my inbox with emails is effective, but the truth is, it's annoying to the point that I'm actively turned off.

</comment><comment><USER26> >"A majority of our respondents also agree that most online ads today don't look professional and are insulting to their intelligence (63% and 56%, respectively). Ouch. This is practical and addressable feedback: ads should look like some thought was put behind them."

What a lazy conclusion. Can't take this article seriously.

</comment><comment><USER27> I think they should have spent more time discussing the privacy and security issues.</comment>


World losing area of forest the size of the UK each year, report finds - <AUTHOR> https://www.theguardian.com/environment/2019/sep/12/deforestation-world-losing-area-forest-size-of-uk-each-year-report-finds <comment><USER2> Probably written just before Ethiopia planted those 350m trees.</comment>


Paid protesters supporting Meng Wanzhou at her extradition hearing - <AUTHOR> https://www.cbc.ca/news/canada/british-columbia/the-strange-tale-of-the-paid-protesters-supporting-meng-wanzhou-at-her-extradition-hearing-1.5434613 <comment><USER2> Am I being overly cynical or is this only noteworthy because of how blatant and incompetent the execution is? I figured every major figure on trial does the whole fake protest thing anyway. Not that that makes it right or proper.

<comment><USER3> In _my_ similarly massively distorted worldview, major figures currently don't do the fake protest thing at their trials - that's too easily proved to be fake in a country like Canada with feral journalists and an unrestricted internet. They're got much better things to spend their money on in order to get the result they want.

I wonder, though, if this tactic is much more effective in China; if so, is this actually a far more interesting case of cultural clash, in which someone used to doing this in China (be it with signs, or simply being able to turn out crowds of loyal employees / local cadre / etc ) has brought the same tactics to a different game?

<comment><USER4> In China, you see foreign people on billboards and TV ads all the time, especially ads of luxury products. Chinese people, deep down, don't really trust Chinese.

Having foreign people to side with Ms. Meng is a tactic to buy credibility to make her look innocent and just. The nature is no different than other white monkey jobs (I don't have any racist intention) in China.

<comment><USER3> Ah, so is the target audience in this case not Canada; not the Canadian justice system; but Chinese people in China who will see this on the news?

<comment> blaser-waffle For sure, but also keep in mind there is a huge Chinese ex-pat community in Vancouver and Toronto. Richmond, BC isn't a Chinatown, it's basically a China- city. Fun place, actually -- the Aberdeen Mall is great.

Point is, selling it hard internationally is a thing, but there are local demographics that this will play to as well.

</comment></comment></comment></comment></comment><comment><USER5> $150 to hold up a sign for a few hours? At least there are no unfair labour practices being performed...</comment>


Screencast - CRUD Angular demo with CORS and REST - <AUTHOR> http://www.youtube.com/watch?v=2e2nDn0h9OE

<comment><AUTHOR> Plunker here [http://plnkr.co/edit/KmbWXuRV27HhqWbUvUrl](http://plnkr.co/edit/KmbWXuRV27HhqWbUvUrl)</comment>


AquaTop display - <AUTHOR> http://www.youtube.com/watch?v=fYJneaa2O8I

<comment><USER2> This is amazing! Just wondering if there can be any real world applications apart from gaming? Very cool though.

Anything open sourced?</comment>


The sad state of language translation in Firefox - <AUTHOR> https://www.jeremiahlee.com/posts/page-translator-is-dead/ <comment><USER2> The problematic aspect of this story is that users cannot add their private extensions to the release version of Firefox, without having to hand over the source code to Mozilla for signing.

Now we see that an unlisted extension created for personal use is also at risk of being remotely blocked, Mozilla effectively ruling over what users are allowed to run in their own browsers.

It would be reasonable to offer an official way to allow installing local, unsigned extensions in the release version of Firefox, and make the option configurable only by elevating to administrative rights, while also showing appropiate warnings about the potential risks of installing unsigned extensions.

We must consider introducing sensible default options in Firefox, while also educating users and allowing them to override certain features, instead of placing marginal security benefits above user liberties and free choice.

<comment><USER3> This all think kinda reminds me of similar practices by Apple on iOS (not enabling any app installation outside of their App store), by Google on Android (actively scanning even side loaded applications by default) or even Amazon on Kindle (remotely deleting books people bought).

One would hope Mozilla would not start playing such lowly tricks as well...

In any case there should have been a clear statement why this has happened which as far as I can tell has not been officially published by Mozilla anywhere.</comment></comment>


Effective Header Management in C++ - <AUTHOR> https://pspdfkit.com/blog/2020/effective-header-management-in-cpp/ <comment><USER2> A much better and more comprehensive read on this topic would be the book "Large-Scale C++ Software Design" by John Lakos.</comment>


Zuckerberg 'tours' flooded Puerto Rico in bizarre virtual reality promo - <AUTHOR> https://www.theguardian.com/technology/2017/oct/09/mark-zuckerberg-facebook-puerto-rico-virtual-reality <comment><USER2> At first, I was repulsed by the lack of empathy from Mark Zuckerberg. But now I wonder if it would have been better for him to put on an act of feigned sorrow and solidarity, or if that would have made it even more disgusting.

<comment><USER3> I do agree, as I think in his own way, he generally cares about people and has grandiose visions about what would solve the social ills of the world. That being said, he's also not perfect, and generally puts business before a lot of things, but I think for him he justifies it as a means to an end.

Seriously though, he should hire a real person that can tap him on the shoulder before he does stuff like this and tell him "hey, you're probably going to get a little flack for that." Like you said though, at least he didn't go down and throw really good, soft paper towels at people.</comment></comment>


Phoenix Framework dockerfile - <AUTHOR> https://github.com/indatawetrust/phoenix-docker <comment><USER2> Dockerfiles for phoenix kind of miss the point of the erlang ecosystem. Erlang already has its own 'docker' . Erlang can be packaged up as "releases" that have no dependencies whatsoever. It's like fat java jars, including the VM itself. They ship with the Erlang VM and they allow zero-downtime upgrades. [http://erlang.org/doc/man/relup.html](http://erlang.org/doc/man/relup.html)

<comment><USER3> I don't think it misses the point of Erlang/Elixir at all.

1) Docker is a popular project for running applications in containers. This is a familiar deployment pattern for many devs(ops) people, so it's yet another option someone has.

2) Most people using Phoenix are probably not using bare-metal, which is the only real scenario I can think of that lets you _easily_ say "we don't need anything except for Erlang's hot code reloading".

All cloud-y offerings will be potentially transient, hell, so will bare-metal. Most people will have infrastructure/tooling to provision new capacity easily, and to handle capacity being lost to failure. They almost certainly have, already, patterns for replacing containers in and out of their load balancers, etc, to avoid the need for hot code reload. I think Erlang's system for doing it can be great, but if you already have a system to run a single command that replaces your app/web/whatever fleet with a new code version, then you're not inherently ignoring the benefits/features of Erlang/Elixir, you're just doing something else you're already comfortable with.

Erlang has its own "docker", but Erlang runs on an OS, not the bare-metal host, so you still have to deal with getting it there and running it.

<comment><USER4> I believe what the person you're replying to is trying to say is: there is no need to build a Dockerfile for Erlang when using releases. Create a release for the target OS and simply start it from ebin. It comes with a VM packaged and can be run with zero dependencies.

You can easily run it in a vanilla ubuntu image on k8s or mesos. No problem whatsoever running it directly on mesos without Docker overhead.

</comment></comment></comment><comment><AUTHOR> this was my first attempt dockerfile. thank you for your interest :)

<comment><USER5> Nice first pass!

I haven't looked at the final image size, but I suspect that starting with ubuntu:latest means that you'll have a pretty large resulting image with a bunch of unnecessary software installed. For your next attempt, you might want to look into creating a more slim image that contains only the required dependencies.

I guess an alternate version of this would be one which has the core Phoenix dependencies but none of the asset management / Node.js stuff. I have a Phoenix API w/ no assets that could use such an image :)

<comment><USER6> Even just switching Ubuntu out for Debian can shave off ~50MB and rarely requires additional modfications IME (unless using something Ubuntu specific).

</comment></comment></comment><comment><USER7> This has inspired me to quickly knock up a Dockerfile for fans of Alpine based containers, if anyone is interested.

[https://github.com/hazbo/phoenix-docker- alpine](https://github.com/hazbo/phoenix-docker-alpine)

<comment><USER8> My take on the same topic: [https://github.com/codequest-eu/phoenix- alpine](https://github.com/codequest-eu/phoenix-alpine)

I found out that the `update-ca-certificates` step is required if you have GitHub dependencies.

</comment></comment><comment><USER9> Why is this even on the first page? This is a Dockerfile. How is this supposed to be of general interest and generate good conversation?

Hope this is not a signal of the future of HackerNews.

<comment><USER10> This is worthy of my up vote because I've tried setting up phoenix framework on fresh Ubuntu and it's a pain in the ass

<comment><USER11> It is?

Most of my problem was with Node.js and not with Erlang or Elixir.

<comment><USER12> What's your problem with node? I do a lot of Node with Docker so I might be able to help.

<comment><USER8> The problem is that Phoenix requires Node 5 and the current stable (which is what vanilla apt-get will install) is 4. Which is indeed a bit confusing.

<comment><USER13> Phoenix needs NodeJS for the asset pipeline of the frontend.

<comment><USER11> Yep. Which if we were just creating something without a front-end, then we can ditch the whole node ecosystem.</comment></comment></comment></comment></comment></comment></comment>


Ubuntu tablet rumored for early 2011 launch  - <AUTHOR> http://www.theregister.co.uk/2010/12/28/rumored_ubuntu_tablet/ <comment><USER2> The interesting thing in this article isn't the "Ubuntu tablet", but how quickly misinformation spreads.

The original, non-media-spammed article (the one linked in the Register piece), was actually posted on HN a few days ago.

Quite quickly, people realized that the button on the tablet had a Windows icon, which means that this tablet, while probably _running_ Ubuntu, is almost certainly not an "Ubuntu tablet."</comment>