Unix Error Messages (joke) - <AUTHOR> https://www.gnu.org/fun/jokes/unix.errors.html <comment><USER2> Not a joke because it is intentional but I always found ssh's answer to an non-existent user hilarious:

        ssh user@host
        You don't exist, go away!

Raw material for further jokes:

        head -c4 AnyJava.class | xxd -p
        cafebabe

The more morbidly inclined AIX user might try this with tail on a coredump and will find deadbeef.

<comment><USER3> >ssh user@host >You don't exist, go away!

I have never seen that. I always get: "Permission denied" of some sort.

</comment></comment><comment><USER4> How to avoid this in your software (applies to CLI but also messaging in GUIs):

\- Always wrap input, code, strings in some delimeters.

\- Always specify the kind of a thing custom name refers to.

\- Follow standard prose writing rules, like ending sentences with a period.

So:

File named "God" does not exist.

Missing `)` character.

While I was writing this mods took the submission down?

</comment><comment><USER5> How many of these actually output what they say they output when run on a modern variant of UNIX?

<comment><USER6> Almost none. Early Unix uses a rather informal style to report errors, like those debug messages written by a casual programmer. Nowadays, at least the GNU toolchain uses a more rigorous style to report errors formally. BSD's messages are more concise, but still have more details.

e.g, compare

        %make love
        Make:  Don't know how to make love.  Stop.

and _(shell doesn 't matter here, GNU make matters)_

        sh-4.4$ make love
        make: *** No rule to make target 'love'.  Stop.

There's still a funny one, though. In the old Unix, we had

        % ar m God
        ar: God does not exist

But now,

        $ ar m God
        ar: creating God

<comment><USER7> This still works:

        # whatis love
        love: nothing appropriate.

</comment></comment></comment><comment><USER8> Reminders of the following joke (the most geekiest joke I ever saw):

chown -R us ./base

</comment><comment> rv-de I accidentally gave

      $ ar m God

a try on bash:

      ar: creating God

That's at least more proactive compared to cshell's:

      ar: God does not exist

<comment><USER9> That's got nothing to do with bash vs csh, just with ancient ar vs. current ar. If you look in the pwd after your ar invocation, you will indeed see a file named God, and you will feel a bit weary as you

      rm God

</comment></comment><comment><USER10> There was a "being silly" package for error messages, I believe, but I can't recall where exactly. While software usually offers a debug feature, I really like the idea that software also can have a silly mode, or similar, like Easter eggs which are triggered by a specific date. It takes away the seriousness of using a computer and lightens up the mood. Also good for motivation and morale.

</comment><comment><USER11> There was an old CD player called workbone that contributed to similar humor</comment>


Windows 8: Beyond the hype - <AUTHOR> http://dendory.net/blog.php?id=5089843a

<comment><USER2> Beware: Ironic title ahead. For something that [poorly] attempts to expose hype, this article creates an equal amount in return. Might be popular with the anti-Windows crowd, but seems to just be a bunch of FUD about how Windows should never change ever again.</comment>


How Environment Can Boost Creativity - <AUTHOR> http://www.theatlantic.com/health/archive/2014/09/how-environment-can-boost-creativity/379486/

<comment><USER2> Dim light, ambient noise, a little wine, and, if it suits you, write by hand. Shuffle around when stuck.

That's the thesis, anyway. FWIW. YMMV.</comment>


The Increased Complexity of Testing in Agile Environments - <AUTHOR> http://blog.smartbear.com/test-automation/the-added-completixy-of-testing-in-agile-environments/

<comment><USER2> Another aspect that I'd like to add is that full cooperation and sync is needed between the Test engineer and the Developer in order to have good testing coverage: 1) It's important that the tester knows which automatic tests are covered by the Developer. 2) The manual tests should have ADDED VALUE to the automatic tests. If the tester performs tests which could have been automatic - that is waste.</comment>


New World tuberculosis came from seals - <AUTHOR> http://johnhawks.net/weblog/reviews/health/pathogens/

<comment><USER2> Hum, my spidey sense is tingling with this... a couple of reasonable doubts and questions here. I don't like the term seals in this context.

Maybe a misidentification?.</comment>


US Startups with Immigrant Founders Wiki - <AUTHOR> http://wiki.nat.org/index.php/American_Startups_with_Immigrant_Founders

<comment><USER2> Is ZOHO a US startup? AFAIK ZOHO is based out of Chennai.</comment>


GitLab Announcing January 16, 2018 Critical Security Update - <AUTHOR> https://about.gitlab.com/2018/01/12/gitlab-critical-release-preannouncement/ <comment><USER2> One thing I'll say about GitLab (even if I'm not its biggest fan) their packaging/installation/upgrade is absolutely top-notch.

I've never seen anyone do it better and I've definitely never seen anyone do it with anywhere near such a complicated set of interrelated moving parts.

<comment><USER3> Thanks, the Omnibus team has worked incredibly hard over the years to make GitLab easy to install :)

Out of curiosity, is there anything we can do to make you a fan? What are we lacking?

</comment></comment><comment><USER4> Well, that doesn't sound good at all. Think of all those providers (e.g. DigitalOcean) who offer "one-click" installers for applications like GitLab. Now think about the users who never (or rarely, if they're lucky) update those machines. I wouldn't be surprised if there's a lot of compromised VPSes and such running GitLab later this week.

And since one of the big reasons for running your own instance is to protect your private stuff -- things like source code, secrets, credentials, API keys -- it seems to me that this has the potential to be pretty wide-reaching and damaging.

So, who here gets to be one of the lucky ones that get to work late Tuesday? :)

</comment><comment><USER5> Hopefully they backport it to the versions that still have api v3 support. Otherwise the time window for their deprecation of critical functionality and security updates is way too short.

<comment><USER3> API v3 is still supported in the latest GitLab release (and will also be supported in this month's release, as well as probably the next few since we haven't decided the exact date of deprecation yet), have we communicated this incorrectly somewhere?

<comment><USER5> We were under the impression that v10 removes it completely. Perhaps this is only in enterprise or maybe we have it wrong? Or maybe it is still included just deprecated but the release notes don't make that clear and no one in my org has checked an actual install or the source.

<comment><USER3> The current plan is to remove it in 11.0.0, if you know of anywhere this is unclear I can take a look and have it changed.

</comment></comment></comment></comment><comment><USER6> Curious to know if this also affects their SaaS offering or if that is already patched.

<comment><USER2> They commonly patch their SAAS stuff (by hand -- so it doesn't show in public) in advance.</comment></comment>


In the shadow of Uber's rise, taxi driver suicides leave cabbies shaken - <AUTHOR> https://www.nbcnews.com/news/us-news/shadow-uber-s-rise-taxi-driver-suicides-leave-cabbies-shaken-n879281 <comment><USER2> Every bigger change is not good for someone. These people could've started riding with Uber, learned programming, drive with cargo, fly planes (did you know it's easier than driving cars?) and so on. There is no objective reason for suicide, these people still have it better than people during the industrial revolution.

Society should learn how to help people not feel endangered by technology and prevent them feeling like they should kill themselves. Technology helps us and while you might not have job for 10 years, automation might change the world so much that almost no one will have a job in 10 years.</comment>


CSS Reference in a JSON - <AUTHOR> https://github.com/LeCrew/marvelous-css-api <comment><USER2> Congrats. Seem like a good API, I will try to work with it, in my next web project.

<comment><AUTHOR> Thank you rr92 ! We will update it soon for better features :)

Have fun !

</comment></comment><comment><USER3> Perfect :), I'll try to make a plugin for my code editor with that !

<comment><AUTHOR> Thank you _polyporphl ! google chrome plugin sounds like good idea !

Have fun !</comment></comment>


Spotify's CEO lays out his buisness vision - <AUTHOR> http://tech.fortune.cnn.com/2011/07/21/spotify-daniel-ek-brainstorm/

<comment><AUTHOR> >The main reason people want to pay is portability. ... With social, when people interact, the more music they share, the bigger library they build, and the bigger value Spotify becomes. The music service that is the simplest, fastest, and most social -- that's the one that will win.

Although mobile and social are tossed around so much they have almost become buzzwords, this is the most simple and direct explanation I have read that shows how these technologies integrate into a path for profitability.

</comment><comment><USER2> I pay for Spotify, as a US customer, and have gotten huge value out of it. I was a Zune subscriber for 2 years (I think); it was a great, valuable service to me. I eventually cut it off because I lost my Zune and didn't want to buy another. Spotify fills that niche, without tying me to a platform AND $5/mo cheaper. Love Spotify, hope they all become gazillionaires.</comment>


Reading an iOS Stack Trace - <AUTHOR> https://www.apteligent.com/developer-resources/reading-an-ios-stack-trace/ <comment><USER2> Nice ad.</comment>


Amazon warehouse workers are walking out and Whole Foods workers are striking - <AUTHOR> https://techcrunch.com/2020/03/30/amazon-warehouse-whole-foods-workers-strike/ <comment><USER2> Tells you a lot about why "the market" won't always give you the outcome you're looking for. People value delivery more than ever right now. It's literally saving lives. However that value does not result in the people taking risk to provide the delivery getting any more money.

As others have mentioned these workers have so little leverage right now because of the massive unemployment. So even if Amazon was to charge customers more, they could totally just pocket the money and the warehouse/delivery/grocery people would have no position.

It's so completely unfair. Everyone risking their lives to feed us right now should probably be making 2-3x normal pay (and we should be paying a lot more for their services).

<comment><USER3> I think what you're asking is more unfair.

Amazon should do what's good for the most amount of people which is keeping prices down. There are plenty of people willing to take these jobs, we have record unemployment. Raising wage 2-3x the normal pay is unfair given how many people would take these jobs today.

I think it's way to easy for us with nice paying jobs, and secure employment to say that we'd pay more for goods and services. There are so many unemployed people that aren't going to be doing good in a month. These people will want any job and will need cheap goods.

If we're going to do some sort of hero compensation for all of our essential works, which I'm in favor of, it should be through the government. Private sector should continue to be fair and act rationally.

<comment><USER4> _" Amazon should do what's good for the most amount of people which is keeping prices down."_

Amazon could do this by reducing the amount of profit it pockets and giving that share to its employees.

Jeff Bezos is the richest man on Earth. He can afford it.

In fact, I'd like to see Bezos risk his life commuting to work on unsafe public transit, working in some of Amazon's warehouses where he'd be exposed to other workers who might be sick, handling hundreds of potentially infected packages, and doing deliveries... all this with crappy if any health insurance and virtually no safety net.

There's been a long-standing argument that founders deservedly reap great rewards because they are the ones in a company who shoulder the great majority of the risk.

Now that's been shown to be an utter and complete lie by this epidemic, hasn't it?

Bezos is sitting nice and safe in his mansion, pocketing billions while it's the desperate people who work for him who risk their life for peanuts.

<comment><USER5> > I'd like to see Bezos risk his life commuting to work on unsafe public > transit, working in some of Amazon's warehouses where he'd be exposed to > other workers who might be sick, handling hundreds of potentially infected > packages, and doing deliveries... all this with crappy if any health > insurance and virtually no safety net.

Amazon operates within an existing system, defined by government regulation, and competes within that system exceedingly well. If you're upset with the outcomes, blame the real culprit: utterly ineffective government policies. Corporations are by definition not altruistic entities. They're not supposed to be, and it's the job of government policy to tame the negative possibilities of their profit-driven pursuits.

Why can't corporations seek profit and altruism at the same time? Because you can model your business as a function that optimizes for profit, which is easily quantifiable. I've never seen any way to optimize for altruism.

Say you wanted to optimize for altruism and profit: how would that work? Is 3x wages really enough if employees still have shitty health insurance? Should Amazon provide its own medical services in warehouses so they don't depend on bad private insurance? How many doctors should they hire? Should they treat non-workplace health issues? What if they find someone has cancer? You get into fuzzy, grey territory very quickly with this line of thinking. Profit is always a number and it's better when it's higher. How do you measure altruistic behavior?

If you're upset with the outcomes, change the system that's incentivizing that behavior. Don't penalize the players for succeeding. This is the role that government is supposed to play.

<comment><USER4> _" If you're upset with the outcomes, change the system that's incentivizing that behavior. Don't penalize the players for succeeding. This is the role that government is supposed to play."_

Great idea, except that the government has been effectively coopted by the very corporate and wealthy interests they are tasked with regulating.

Government officials regularly come from high executive posts in industry, and when they retire from government work are hired in to cushy, well-paid jobs at the very corporations they had regulated and assigned government contracts to while they were in office.

The "pro-business" faction has been busy deregulating as much as they can and selling off government assets to private corporations. Anti-trust enforcement has been a joke for decades. As we speak environmental regulations are being rolled back with the excuse of making life easier for polluting corporations in the wake of the cornavirus crisis. With the successful capture of the Supreme and lower courts by conservatives we can expect to see even more corporate and wealth dominance.

At this point in history I don't have much hope in the government reigning in corporations or the wealthy. The trend towards ever more wealth concentration and ever greater inequality in the US is crystal clear.

<comment><USER5> > At this point in history I don't have much hope in the government reigning > in corporations or the wealthy

I would agree with that. But I still think it's probably easier to fight that fight than to try to shame corporations into achieving unquantifiable, often mutually exclusive goals to everyone's satisfaction. I'm not hopeful government will change any time soon, I just want to make sure we're directing the resentment to the right place.

</comment></comment></comment></comment></comment></comment><comment><USER6> The crisis has provided a lot of leverage for these workers, but large-scale unemployment has also made replacing them easier than ever before. Will be interesting to see what happens here.

<comment><USER7> Lets hope "the right thing" and the companies start treating their employers better.

Otherwise, the onus is on the rest of us to remember how these companies value human life.

<comment><USER8> No one cares that their products are made possible by literal slave labor. Most people care so little, they aren't even aware which of their belongings are made possible through slave labor. You really think anyone is really concerned with how companies treat human life? Concerned enough to sacrifice their own benefits instead of just parting with pretty words? I don't think so.

<comment><USER9> People care.

It's just that things break down in hyperefficient settings (factories, warehouses etc) when unpredictable events hit them. These environments aren't great at adapting quickly to things they haven't faced before.

Before anyone with decision making power or imagination, can be pulled in to deal with some issue, (that no one has training or experience to handle on the front lines), it's already all over social media and the news. That's just how things work currently.

Give it a few days before reacting to whatevers on the net or on the news.

<comment><USER10> > People care.

They really don't. If people cared, Nike wouldn't use child slave labor.

<comment><USER7> Some people can afford to care and don't.

Most people just can't afford to demonstrate they care. If you're part of an exploited underclass, feeding your family has to be more important.

<comment><USER8> That's just an excuse to shift responsibility. In a kill or be killed situation, you could always choose to be killed instead of killing, you'd just have to sacrifice your life. It's just that people don't actually care enough to give up their life or any of their benefits.

It always comes down to the fact that people will not give up their own benefits for someone else. If you want people to do something you have to appeal to their self-interest, not their morality.

</comment></comment></comment></comment></comment></comment></comment><comment><USER11> Right now public sentiment is highly favorable to the people left enabling online shopping, groceries, and prescriptions.

Workers are easily replaceable at the moment, but companies should tread carefully in treating workers as expendable.

In a time of crisis legislation, investigations, and executive orders have a way of happening a little faster than normal.

</comment><comment><USER12> What are the chances that these strikes can lead to a union? I imagine a grocery store workers union could do a lot for the health of its workers now.

</comment><comment><USER13> This is a company that pays almost no Federal taxes, whose employees are forced to seek aid from the Federal govt. The least they could do is offer paid sick leave for those affected. Hardcore capitalism is doing as much harm to the US during this crisis as the virus itself.

<comment> barry-cotter > This is a company that pays almost no Federal taxes

Indeed, if you reinvest almost all your profits in the business instead of taking them as earnings you pay very little in taxes. Taxing investment would be a very stupid thing to do since it would discourage what makes society richer in the long run.

<comment><USER14> If the issue was that simple ans black&white then bezos would not have his fortune. Amazon has gamed the system.

<comment><USER15> Do you think Bezos did not pay taxes on his earnings? His "fortune" is majority equity in Amazon, not cash sitting in a bank account. Any income he received was taxed

<comment><USER16> He paid a very small rate of long capital gains for everything he didn't funnel through a tax shelter.

</comment></comment></comment></comment></comment><comment><USER17> There is a "Fight club" feel to this crisis. All the "key worker", necessary job that need to be done regardless the catastrophe society is facing are literally the least desirable job on the market and often the least paid too.

Hopefully there is going to be wake up call in society. Surely a large scale demonstration like this would convince people that your "free market capitalistic assigned worth, i.e. your salary" is not a sufficient measure of your value in society and external adjustment (eg: government regulation or welfare or ...) is actually quite reasonable.

<comment><USER8> Why would it be reasonable? If you're not willing to perform a job at the current pay grade, just quit your job. Either you get replaced immediately or you've got yourself a chip in your salary negotiation.

<comment><USER2> Switching jobs right now would cost you: a) Income you need to provide yourself food and shelter in a time of insecurity. b) Healthcare loss during one of the worst global health crises ever.

The switching cost is near infinite and not reflected in the pay.

</comment></comment></comment><comment><USER18> Good for them. I guess I won't hold my breath for AWS SREs to go on strike in solidarity, but if there were ever a time it would be now.

Edit: No strike threat, but there's a petition here [https://actionnetwork.org/petitions/amazon-must-protect- work...](https://actionnetwork.org/petitions/amazon-must-protect-workers-and- community-from-covid-19)

Better than nothing!

<comment><USER19> This is why we need a tech workers union

<comment><USER20> So those whose views are different from union leadership can nevertheless be compelled to lend weight to those views? No thanks.

<comment><USER19> It's called solidarity. You acknowledge that more vulnerable people can benefit from your support, such as the fulfillment centre workers being supported by the SREs in this case. But if you only care about yourself and never worry that you might need support from others some day, then yes, I suppose it's not really for you.

</comment></comment></comment></comment><comment><USER20> Amazon has already increased both normal and overtime pay for these workers, and instituted lots of reasonable changes in their stores and fulfillment centers. See [https://blog.aboutamazon.com/company-news/amazons-actions- to...](https://blog.aboutamazon.com/company-news/amazons-actions-to-help- employees-communities-and-customers-affected-by-covid-19)

These strikes just seems opportunist. For those saying "workers should get PPEs" - how? There's a shortage and medical workers are a higher priority since they're more likely to be infected. And clearly, online shopping is popular these days and important to keep operating while there are shelter in place orders. Grocery stores are also important to keep operating.

These workers are free to forego their jobs and go home. Amazon should just replace them and move on. There will be many others who are willing to work.</comment>


Gingerbread successor, Honeycomb is coming with Tablet friendly features. - <AUTHOR> http://www.geekword.net/honeycomb-release-date-features/

<comment><USER2> Promises to bring new and interesting things</comment>


Ever volunteered to help a tech startup? - <AUTHOR> http://furloughed.life/ <comment><USER2> I have no clue why would anyone give out their spare time for free to a company without getting any returns. It's not that it's charity so one could feel better about the world, it's just another tech startup. This is nuts.

<comment><AUTHOR> There are many benefits including trying out something new without jeopardising your career.

Life is not just about making money. Some wants to get involved in exciting things. See where it might leads to.

</comment></comment><comment><AUTHOR> What started as a project to rescue our tech startups when Covid 19 hit, we are looking at creating a Volunteer Market Place for tech startups.

Everyone's familiar with UpWork, Fiverr and Freelancer. Their business model is proven.

But what about a similar place where people give their time to help a bootstrapped tech startup?

Do you think this has legs?

We trialled with 20 tech startups and 100 volunteers. All startups are from the UK right now. 90% of volunteers are from UK as well, but there are few from the USA, Sri Lanka and Australia.

Keen to understand whether it's possible to build tech companies, especially pre-investment with employees, contractors and volunteers.

Thanks, Manoj

<comment><USER3> > We trialled with 20 tech startups and 100 volunteers. All startups are from > the UK right now. 90% of volunteers are from UK as well

I don't quite understand how this is legal. UK has national minimum wage. If people are working they need to be paid. People can volunteer if the company is a charity or community service company or non-profit, but otherwise they're workers and need to get at least minimum wage.

<comment><AUTHOR> These are not jobs. Have you never given your time free?

Do you know volunteers help many commercial organisations, from marshalling Formula 1 races to help in running exhibitions, etc?</comment></comment></comment>


Bruce Lee's Mission Statement - <AUTHOR> http://www.lettersofnote.com/2011/03/my-definite-chief-aim.html

<comment><USER2> Completely self-aware, beautiful, honest and bold. It would've been interesting to hear his reflections on this mission statement after he was a little older and had achieved all those things many times over.</comment>


Ask HN: (yet again): What is the best affordable programmable drone? - <AUTHOR> As the field seems to move quick, let's ask this again.
Previous threads:
- 2015: https://news.ycombinator.com/item?id=8989411
- 2016: https://news.ycombinator.com/item?id=10872233
- 2017: https://news.ycombinator.com/item?id=14201207
I wouldn't focus solely on the lowest cost range, as the other threads did. What are the best programmable drones, let's say, <$250, <$500 or <$1000? <comment><USER2> I've had my eye on the Erle-copter ([https://erlerobotics.com/blog/erle- copter/](https://erlerobotics.com/blog/erle-copter/)) for a while, but have held off due to price and the fact that I'll likely crash/lose the thing playing around with autopilot. I'd be interested to see if anyone knows any very affordable options

</comment><comment><USER3> If anyone has recommendations, please consider fixed wing as well. There are practical applications that are overlooked that are ideal for non-rotor craft. (Land survey being primary).</comment>


W^X now mandatory in OpenBSD - <AUTHOR> http://undeadly.org/cgi?action=article&sid=20160527203200 <comment><USER2> I've always been in favor of all OpenBSD security enhancements I've seen, but I have to say, and please hear me out, this is an objectively terrible idea.

Yes, most programs should disallow W|X by default. But trying to banish the entire practice with a mount flag, knowing full well few people will go that far to run a W|X application, is bad practice. I'd rather see this as another specialty chmod flag ala SUID, SGID, etc. Or something along those lines. One shouldn't have to enable filesystem-wide W|X just to run one application.

The thing is, when you actually _do_ need W|X, there is no simple workaround. Many emulators and JITs _need_ to be able to dynamically recompile instructions to native machine code to achieve acceptable performance (emulating a 3GHz processor is just not going to happen with an interpreter.) For a particularly busy dynamic recompiler, having to constantly call mprotect to toggle the page flags between W!X and X!W will impact performance too greatly, since that is a syscall requiring a kernel-level transition.

We also have app stores banning the use of this technique as well. This is a very troubling trend lately; it is throwing the baby out with the bathwater.

EDIT: tj responded to me on Twitter: "the per-mountpoint idea is just an initial method; it'll be refined as time goes on. i think per-binary w^x is in the pipeline." \-- that will not only resolve my concerns, but in fact would be my ideal design to balance security and performance.

<comment><USER3> > One shouldn't have to enable filesystem-wide W|X just to run one application

This is a very good point, and it seems like enabling it more granularly would be worth it.

But, for your second point, I have trouble believing that switching between W!X and X!W is going to happen frequently enough to be substantial for performance. (It was very small in Firefox's JavaScript JIT, causing something like a 1%-4% performance hit depending on system).

<comment><USER2> An emulator is a very different use case than Firefox's JIT.

Take Dolphin (the Gamecube / Wii emulator) for example: you have a 4GiB DVD, it has a massive 80-hour game's entire code engine on there. You cannot recompile the entire disc at startup. Even if you could (you really can't), these games tend to push code into RAM to execute, which a static recompiler cannot handle.

The way dynamic recompilers handle the tremendous burden is to recompile small blocks at a time, and track which ones are hot and cold. When the buffers fill up, they start dropping old, stale code.

It's hard to say exactly what the performance impact would be, and it'd probably vary per game title. But it'd be a lot worse than a web browser recompiling jQuery plus another 200KiB of custom Javascript once on page load.

Plus, I am sure there are many more uses cases for W|X than just emulators and JITs. It would be a shame to try and eradicate them all from existence.

<comment><USER4> Map page two times at separate addresses: for executing and for writing. See [http://nullprogram.com/blog/2016/04/10/](http://nullprogram.com/blog/2016/04/10/) for details.

<comment><USER3> Extremely clever. Wouldn't this still violate W^X though? I would have thought the OS would see through a trick like this.

<comment><USER5> It doesn't violate W^X, because the same virtual memory address isn't writable and executable at the same time.

</comment></comment></comment></comment></comment></comment><comment><USER6> For those heading into the comments to know what this is about: W^X is a protection policy on memory with the effect that every page in memory can either be written or executed but not both simultaneously (Write XOR eXecute). It can prevent, for example, some buffer overflow attacks.

<comment><USER7> I guess I've never understood this. The W^X is a response to one of the classic Multics paper attacks, but doesn't actually work well in a world where JavaScript, JVM byte code, and other non-native code is "sort-of executable". Why not put the effort into a great MMU so that every allocation is its own "page" for the purpose of triggering page faults on overruns?

<comment><USER8> > Why not put the effort into a great MMU so that every allocation is its own > "page" for the purpose of triggering page faults on overruns?

We used to have that, they're called segments.

<comment><USER9> Only one processor did it like it really meant it:

[https://en.wikipedia.org/wiki/Intel_iAPX_432#Object- oriented...](https://en.wikipedia.org/wiki/Intel_iAPX_432#Object- oriented_memory_and_capabilities)

<comment><USER10> Look up i960. Had most key parts with otherwise normal RISC.

<comment><USER9> It seems to have been the i960MX and i960MC which had the funky object- oriented memory; they have long since been discontinued, and i can't find any documentation about them online, sadly.

EDIT: There's a passing mention in a book [1]

> The Intel i960 extended architecture processor used a tagged architecture > with a bit on each memory word that marked the word as a "capability", not > as an ordinary location for data or instructions. A capability controlled > access to a variable-sized memory block or segment. The large number of > possible tag values supported memory segments that ranged in size from 64 to > 4 billion bytes, with a potential 2^256 different protection domains.

[1] [https://books.google.co.uk/books?id=O3VB- zspJo4C&pg=PA189#v=...](https://books.google.co.uk/books?id=O3VB- zspJo4C&pg=PA189#v=onepage&q&f=false)

<comment><USER10> Type i960 wikipedia into Google. It has a description plus a link to ISA datasheet in references section. About enough info to recreate it.

EDIT: Now that I'm on a PC I've added the link here for you. Copy and paste of PDF's is a b __ __on my mobile. ;)

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

[http://bitsavers.org/pdf/biin/BiiN_CPU_Architecture_Referenc...](http://bitsavers.org/pdf/biin/BiiN_CPU_Architecture_Reference_Man_Jul88.pdf)

<comment><USER9> Oh, brilliant, thanks. I suspect this evaded my searches because it doesn't say '960mx' in any machine-readable way!

There's some fascinating stuff in here. For example:

> 8.4 Object Lifetime

> To support the implicit deallocation of certain objects while preventing > dangling references, the object lifetime concept is supported. The lifetime > of an object can be local or global. "Local" objects have a lifetime that is > tied to a particular program execution environment [...]. "Global" objects > are not associated with a particular execution environment.

> Each job has a distinct set of local objects. No two jobs can have ADs > [access descriptors] that reference the same local object. The processor > does not allow an AD for a local object to be stored in a global object. > Thus, when a job terminates, all the local objects associated with a job can > be safely deallocated, and there cannot be any dangling pointers.

The machine was designed, to run Ada programs. Does this line up with how memory management works in Ada? It certainly resembles how it works in Rust!

<comment><USER10> Ada was designed for environments where dynamic allocation wasn't allowed. So, it doesn't have safe scheme for that. It offers regions, GC, or fast/unsafe deallocation. This is one area where Rust has dramatic improvement. I agree i960 is reminiscent of schemes like Rust. Very forward thinkjng.

Btw, since Im on mobile w/out links, type these into Google: capability computer systems book Levy; Army Secure Operatimg System ASOS. First is great book with many capability architectures like i432. Second is another HW and OS combo designed as secure foundation for embedded, Ada apps. It was interesting.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> This paper's thesis is that W^X does not work, and not because of any of the reasons presented in this thread: [https://cseweb.ucsd.edu/~hovav/dist/geometry.pdf](https://cseweb.ucsd.edu/~hovav/dist/geometry.pdf)

The paper says that to bypass W^X protection, you can simply scan an executable for "the instruction you want to use, followed by a RET". The paper calls these "gadgets."

You can write any function you want by using these gadgets: simply call them. When you call a gadget, it executes the corresponding instruction, then returns. This allows you to write arbitrary functions, since real-world programs are large enough that they have a massive number of gadgets for you to choose from.

Can someone provide a counterargument?

<comment><USER12> How do you scan the executable when the memory layout is randomised?

EDIT: [https://news.ycombinator.com/item?id=11789653](https://news.ycombinator.com/item?id=11789653)

<comment><USER13> With any program behavior or bug that leaks memory layout. They're common.

</comment></comment></comment><comment><USER14> Does this mean to successfully exploit a program I need to write to an area in memory that the program will later turn the page in memory to "Execute"?

<comment><USER15> Yep! That's the idea here: it makes it less likely to accidentally treat data as instructions. If you can figure out some bug in a JIT compiler to get it to write your payload to a page that will get turned executable, then you still have an exploit, but the attack surface is smaller.

You _can_ try return-oriented programming, but OpenBSD makes that hard: the stack is never executable, everything is position independent, objects get shuffled around inside libraries and executables¹, maybe more.

¹ At least this was proposed, and I _think_ it landed in one of the newer releases, but I can't seem to find it for sure.

<comment><USER16> Yep: [http://marc.info/?l=openbsd- cvs&m=146168291000757&w=2](http://marc.info/?l=openbsd- cvs&m=146168291000757&w=2)

<comment><USER15> Thanks, that's exactly what I was thinking of. Does it re-link only libc on startup, or other libraries as well?

Found the slide that I remembered: [https://twitter.com/justincormack/status/577005049374601217](https://twitter.com/justincormack/status/577005049374601217)

Do you know if any of the rest of that is in-progress or complete?

<comment><USER16> My observations..

* binutils 2.17 (last GPLv2) - complete.

* all archs transitioned to pie - complete as of 5.7.

* /sbin/init static pie - complete.

* ROP gadgets are being hunted down systematically, many nop sleds changed to int3/illegal instr.

* BROP - many base daemons now fork + exec, not all.

* SROP - mitigation committed - complete?

* shuffle - libc objects get shuffled at boot by rc(8), stack object order shuffling as a gcc extension.

..

Progress continues.

</comment></comment></comment></comment></comment><comment><USER17> What about JIT compilation and other forms of code generation?

<comment><USER18> Firefox works fine with it: [http://jandemooij.nl/blog/2015/12/29/wx-jit-code- enabled-in-...](http://jandemooij.nl/blog/2015/12/29/wx-jit-code-enabled-in- firefox/)

 _After that, the performance overhead was pretty small on all benchmarks and websites I tested: Kraken and Octane are less than 1% slower with W^X enabled. On (ancient) SunSpider the overhead is bigger, because most tests finish in a few milliseconds, so any compile-time overhead is measurable. Still, it 's less than 3% on Windows and Linux. On OS X it's less than 4% because mprotect is slower there._

</comment></comment><comment><USER19> NetBSD is going through some similar security moves currently (extending PaX[0]), and iiuc, there are special considerations required for Java/jvm, because of the bytecoding process. Does anybody know if my understanding is correct (that a page will have to be both writable and executable) and if so, what are OpenBSDs considerations for this ?

[0] [http://mail-index.netbsd.org/current- users/2016/05/15/msg029...](http://mail-index.netbsd.org/current- users/2016/05/15/msg029374.html)

<comment><USER20> Allocate the page write-only. Write write write. Change the page to executable-only. Run.

Firefox already got this treatment for its JavaScript compiler.

</comment></comment><comment><USER21> I dunno why, but this quote from Benjamin Fraklin came to m mind - "Those who surrender freedom for security will not have, nor do they deserve, either one."

i'm just kiddin ;)

</comment><comment><USER22> Can someone provide an introduction for dummies like me?

<comment><USER23> I am not an expert on the field. But | means or and ^ means execute.

In the traditional W(rite)|(or)E(xecute) model, the processes can both write and execute instructions in their address space in memory. I might be wrong but I think this could result in security leaks, because you cannot determine what the code evolves into at execution time.

W(rite)^(xor)E(xecute) model doesn't allow the processes to write AND execute instructions at the same time.

The wikipedia page states:

      W^X requires using the CS code segment limit as a "line in the sand",
      a point in the address space above which execution is not permitted and data is located,
      and below which it is allowed and executable pages are placed.

This means using W^X is an improvement for security, but it's hard to adapt to from a technical viewpoint and limits your computer's ability in meta- programming.

For further information:

[https://en.wikipedia.org/wiki/W%5EX](https://en.wikipedia.org/wiki/W%5EX)

[http://marc.info/?l=openbsd- misc&m=105056000801065](http://marc.info/?l=openbsd-misc&m=105056000801065)

Disclaimer: I myself am a beginner in the field. Apologies for oversimplification and possible faulty assessments.

</comment></comment><comment><USER24> Anyone know if Erlang is good?

<comment><USER25> I haven't tried it on -current yet, but I don't recall ever hearing about BEAM (Erlang's VM) being affected by this.

It probably helps that BEAM inherits a lot of Erlang semantics like immutability and process isolation; I reckon this eliminates a lot of the need for a given portion of memory to be both writable and executable at the same time.</comment></comment>