News for hackers. Stuff that matters.
Re:Writing ARM64 Code for Apple Platforms by adevx on Thursday June 24, 2021 @10:20AM (#27617892)
I'm in the market for a new laptop, but can't get myself to buy an Apple laptop despite some nice innovation on the CPU front. The lock-in, the dragging their feed and outright stalling web innovation with Safari, the “Sideloading in this case is eliminating choice” newspeak. It's just not something I want to support.
Re:Writing ARM64 Code for Apple Platforms by least on Thursday June 24, 2021 @11:14AM (#27618816)
> outright stalling web innovation with Safari

Not adopting technologies at the rate of the market leader who is pushing for more and more control over the web might be "stalling web innovation" but the alternative universe is one where Chrome has no meaningful check against its hegemony of the web and can freely create new technology in support of Google's mission to harvest private information and serve advertisements to its users.

> Sideloading in this case is eliminating choice

There is nothing on MacOS that is preventing installing and running arbitrary code on your machine. Elevation of privileges is required for some of that code, but it is there for those that need or want it and a sane default exists for everyone else. This is the case with every modern operating system, including free ones.

Re:Writing ARM64 Code for Apple Platforms by Jcowell on Thursday June 24, 2021 @12:31PM (#27619966)
> There is nothing on MacOS that is preventing installing and running arbitrary code on your machine. Elevation of privileges is required for some of that code, but it is there for those that need or want it and a sane default exists for everyone else. This is the case with every modern operating system, including free one

Actually, there is but not In the way you expect. When the M1 Mac’s we’re released, you could sideline iOS and iPadOS apps but that was blocked by Apple in a later update. On the surface this is a means of clamping down on app piracy and unauthorized use of an app but also a a blockage all the same.

Re:Writing ARM64 Code for Apple Platforms by djrogers on Thursday June 24, 2021 @12:54PM (#27620367)
Any app creator can release their iOS / iPadOS app for Apple Silicon Macs if they choose to, I'm not sure I'd paint Apple as the bad guy here if a vendor doesn't want their iOS app running on macOS.
Re:Writing ARM64 Code for Apple Platforms by Jcowell on Thursday June 24, 2021 @01:46PM (#27621301)
I’m not taking about Availability of iOS App in the MacOS App Store that devs can opt in and out of. I’m talking explicitly about side loading iOS/iPadOS apps to MacOS. This was possible when M1 apps were released and then explicitly blocked by Apple after an update.
Re:Writing ARM64 Code for Apple Platforms by least on Thursday June 24, 2021 @01:47PM (#27621328)
That's a good point and it's something I did overlook, despite complaining about it when they changed this. I would argue though that this is DRM just like Denuvo is for video games or widevine for a lot of streaming content and wouldn't really consider it the same thing as Apple restricting running arbitrary code in the traditional sense. If something like Gatekeeper made things unsigned by Apple impossible to run rather than simply being annoying (which I mean, is kind of the point of it) then I'd be more inclined to agree with the sentiment.
Re:Writing ARM64 Code for Apple Platforms by Jcowell on Thursday June 24, 2021 @10:12PM (#27626445)
Personally I don’t see the difference between a local MacOS system doing it and a system phoned by MacOS doing it
Re:Writing ARM64 Code for Apple Platforms by least on Friday June 25, 2021 @06:41AM (#27629071)
The difference is that Apple runs the App Store and agreed to allow app developers to opt out of publishing their apps to the Mac App Store. In order to facilitate that they had to implement DRM.

Being able to run arbitrary code doesn't really mean you get to run other people's code without their permission, which is essentially what running those applications on a mac was. You can argue the merits of DRM and copyright of course, but ultimately that's not the same thing as "running arbitrary code." You can run the code and that code includes a check to make sure the platform is one that the developer approved of. If you find a way to remove that check it probably still runs.

Re:Writing ARM64 Code for Apple Platforms by jmull on Thursday June 24, 2021 @12:04PM (#27619585)
> ...dragging their feed and outright stalling web innovation with Safari...

You aren't entirely wrong here, but we are one thin plank from the web being whatever Google says it is.

I know we don't live in an ideal web development world, but we are awfully close to something much worse.

Re:Writing ARM64 Code for Apple Platforms by jamespo on Thursday June 24, 2021 @10:39AM (#27618231)
Why would Apple want to join the Chrome arms race that Google is pushing for their own benefit?
Re:Writing ARM64 Code for Apple Platforms by rickdeckard on Thursday June 24, 2021 @10:29AM (#27618051)
I feel you. I'm at a point where I can't go on and support that ecosystem with my money, as they envision a future of the whole IT/CE industry which I increasingly disagree with.

But it's hard to explain the implications of Apple's business model to someone who is just happy how well his AirPods are integrating with all his other Apple stuff, and offended how other companies simply don't make anything equally well integrated with his iPhone...

Re:Writing ARM64 Code for Apple Platforms by nickpp on Thursday June 24, 2021 @10:33AM (#27618125)
I believe side-loading on Mac OS is not a problem. It is only restricted in iOS.
Re:Writing ARM64 Code for Apple Platforms by gjsman-1000 on Thursday June 24, 2021 @10:35AM (#27618142)
Sideloading on the M1 is fairly easy. @marcan42, who is developing Linux for M1, is very clear that Apple actively went out of their way to make sideloading possible in a secure manner.

Also, for everyone who says Apple is going to lock MacOS down, that's not going to happen with the M1 at least. The ability to run older versions of MacOS, alongside Linux support coming, means it's not happening. Despite what the conspiracy theorists say.

Re:Writing ARM64 Code for Apple Platforms by ericflo on Thursday June 24, 2021 @11:00AM (#27618593)
Linux on M1 and sideloading OSX apps are fairly orthogonal. Bootloader/sideloading term mixup maybe?
Re:Writing ARM64 Code for Apple Platforms by notriddle on Thursday June 24, 2021 @12:23PM (#27619839)
They are not orthogonal. If you can install Linux, then you can sideload apps on macOS. It might involve invasive XNU patching with a hex editor, but it can be done.

It's not that involved, by the way. There's a command that you run to turn off gatekeeper [1].

[1]: https://disable-gatekeeper.github.io/

Re:Writing ARM64 Code for Apple Platforms by Wowfunhappy on Thursday June 24, 2021 @03:17PM (#27622564)
Exactly, and this goes beyond mere self-signed code (Gatekeeper) and into things like SIP and private entitlements. As long as the user controls the bootloader, the user can also patch the OS to do whatever they want.
Re:Writing ARM64 Code for Apple Platforms by chipotle_coyote on Thursday June 24, 2021 @01:23PM (#27620891)
I think the OP is pointing out that installing Mac apps from places other than the App Store is not what most (if any) Mac users would call "sideloading". We just call it "installing." :)
Re:Writing ARM64 Code for Apple Platforms by johnwalkr on Thursday June 24, 2021 @12:21PM (#27619811)
It's 2 separate points, Apple explicitly said they allow sideloading (I wouldn't even call it side loading, it's just "install from outside the app store" and "allow unsigned applications if you want") and booting any other OS is allowed, there is even some amount of Apple documentation on how to do it, and success with both BSD and linux. Drivers are of course an issue.
Re:Writing ARM64 Code for Apple Platforms by criddell on Thursday June 24, 2021 @10:37AM (#27618189)
Have you given much thought to the opposite idea - that web innovation is ultimately bad for users?
Re:Writing ARM64 Code for Apple Platforms by adevx on Thursday June 24, 2021 @11:26AM (#27618992)
I think having an open, equal opportunity platform not policed by any specific vendor is a good thing. It could pave the way for a mobile OS like Mozilla envisioned with the discontinued Firefox OS. There is of course this massive influence of Google which could steer web innovation in the wrong direction.
Re:Writing ARM64 Code for Apple Platforms by criddell on Thursday June 24, 2021 @11:45AM (#27619254)
I've been talking about this a lot lately, so maybe I'm repeating myself, but Ellen Ullman's (very good) book Life in Code she writes about Whitfield Diffie's (of Diffie-Hellman fame) speech at the 2000 Computers, Freedom, and Privacy conference in Toronto.

> "We were slaves to the mainframe! he said. Dumb terminals! That's all we had. We were powerless under the big machine's unyielding central control. Then we escaped to the personal computer, autonomous, powerful. Then networks. The PC was soon rendered to be nothing but a "thin client," just a browser with very little software residing on our personal machines, the code being on network servers, which are under the control of administrators. Now to the web, nothing but a thin, thin browser for us. All the intelligence out there, on the net, our machines having become dumb terminals again."

I think yielding control back to remote administrators is ultimately a mistake if you care about freedom and privacy. It's why I've come to believe the web, as a platform, is in some ways a giant step backwards (and I do realize that's not a popular opinion here).

I like that Apple is slowing things down. Users are better served by well written native apps IMHO. It makes life more difficult for those of us who write software but also for those who want to sell to, spy on, or control users.

Re:Writing ARM64 Code for Apple Platforms by smoldesu on Thursday June 24, 2021 @10:23AM (#27617959)
I'm in a (similar) boat. I'd probably be a lot more interested if Apple gave me more control over the hardware.
Re:Writing ARM64 Code for Apple Platforms by EricE on Thursday June 24, 2021 @11:07AM (#27618701)
What control are you lacking? Are you positive you are lacking control or just espousing a knee jerk opinion?

Indeed, a comment in this thread points out that others have reported Apple went out of their way to allow secure access to the hardware on peer with what apple does with macOS - your generic concerns seem utterly without merit.

Re:Writing ARM64 Code for Apple Platforms by nonameiguess on Thursday June 24, 2021 @05:20PM (#27623935)
I'm mostly a big fan of my Macbook Air, first Mac I've owned in 15 years. But I'd jump for joy if they'd just let me control the auto-open feature of Music.app that forces it to the front every time I take my headphone off and put them back on. I'm in a damn meeting. How on earth did they ever come to the decision that they should assume everyone using headphones is listening to music?

I scoured the Internet and this has apparently been a problem for at least six years, and Apple keeps breaking all the workarounds people find to disable the behavior.

Re:Writing ARM64 Code for Apple Platforms by wayneftw on Thursday June 24, 2021 @12:37PM (#27620062)
Perhaps you're not sure what kinds of controls you're missing because you haven't often left the Apple bubble? Here are the types of control that I enjoy as a Linux/Windows PC user:

- All of my non-Mac PCs have a BIOS interface that lets me control very low level behaviors of my motherboard and CPU. Macs expose just the bare minimum.

- Windows, and to a much greater extent Linux both offer vastly more API hooks to customize things that I want about the OS. Apple does things like making NSScreen.visibleRect readonly so that only their Dock program can change it and nobody else. Meanwhile, on Windows/Linux I can programatically do just about anything I choose to, so I can replace the taskbar (and even app window chrome/menus) with something else if I want.

- Macs have extremely limited GUI configuration options. You can't even change the color of your mouse pointer from black to white if you wish to! You can't have "themes" that change anything significant. You can only put the Dock left/right/bottom. You can't move the menu bar. For a long, long time you could only resize app windows by the lower right corner until they finally implemented that. It's very often Apple's way or the highway - and there's a reason why that phrase is often associated directed towards Apple; because they just don't offer nearly as much control to users...

- Even if you try to customize these things by using third party hacks, there's no guarantee that your hack will continue to work after an update - and that's a loss of control. My Macs have broken many times from updates, way more than any of my real PCs. Even if I do hack Windows to do something that I want, Microsoft bends over backwards to stay compatible. Obviously Linux offers even more control, i.e. you can get right into the source code of almost anything on your desktop.

- I can only run macOS on Apple hardware. This is a severe loss of control for users. If Apple decided to stop making Intel machines tomorrow, I'd be screwed.

- If I'm running a cloud business, I can't even rent out a cloud Mac for an hour at a time. I have to rent it out for 24 hours at a time. That's a loss of control.

I'm sure I missed some things because I wrote this pretty quickly. I thought at some point that I should keep a running list of things that Macs just can't do, but that would be a waste of time - better to just accept things and relegate my Macs for doing iOS/Mac things only. So that's exactly what I did.

Re:Writing ARM64 Code for Apple Platforms by chipotle_coyote on Thursday June 24, 2021 @01:54PM (#27621431)
A whole lot of what you're describing -- not all, obviously, but a good chunk -- have to do with not being able to significantly affect the aesthetics of the operating system, or in some cases, the functionality of the widgets. This is fair, but I think people who haven't really gotten deep into "the Apple bubble" don't really understand how much control Apple does, in fact, give you over the functionality of the operating system, whether through OS-level features or hooks third-party applications can latch onto. When I think of "customizing my environment," I think of running things like Alfred and Keyboard Maestro. I think of using Automator (and soon, Shortcuts) to control applications and create system-wide services like "select any Markdown text in any application and convert it to BBCode, HTML, or Rich Text". I think of editing the default keyboard finding file to add ^W as "select word" in every application that uses standard system input. None of these are "hacks" that are going to go away tomorrow. Personally, I don't care whether I can "move the menu bar" (where the hell would I move it?) or turn window chrome purple, and I don't really care that I can only put the dock in one of three places. :)

As for some of the others, well, again, yes and no. I mean, in the history of computing, "I can only run FooCo's OS on FooCo's hardware" was the norm"; I don't think it's Apple's fault if you can't rent out a cloud Mac for an hour at a time; I think it's debatable whether the lack of fine-grained editing of BIOS settings is a material loss on the Mac platform.

Also,

> If Apple decided to stop making Intel machines tomorrow, I'd be screwed.

I have bad news. :)

Re:Writing ARM64 Code for Apple Platforms by Wowfunhappy on Thursday June 24, 2021 @03:26PM (#27622662)
> Apple does things like making NSScreen.visibleRect readonly so that only their Dock program can change it and nobody else. Meanwhile, on Windows/Linux I can programatically do just about anything I choose to, so I can replace the taskbar (and even app window chrome/menus) with something else if I want.

If you turn SIP off, you should be able to swizzle those methods with your own implementations. I admittedly haven't tried with NSScreen.visibleRect specifically, but I've swizzled plenty of other low-level objective-c stuff. When I need to go even deeper, there's dyld interposing.

You just need to turn off SIP. It's the magic switch that lets you do whatever you want. Some people argue "letting the user do whatever they want" is poor security, and perhaps it is, but you can't have it both ways—either grant yourself control and accept the security consequences, or leave Apple in control and accept the restrictions.