Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, Dec 28, 2016 at 08:49:12PM +0100, Marc Balmer wrote: > You can still set INSECURE if you want, on your custom kernel. Depends on how exactly the permissions on the X server are changed. The main point, however, is that this change needs quite a bit of testing accross a variety of hardware. And it needs moving back PCI access to go via /dev/ttyE* instead of /dev/pci. Martin
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
Am 28.12.16 um 20:47 schrieb Michael: Hello, On Wed, 28 Dec 2016 19:04:20 + Taylor R Campbell wrote: Date: Wed, 28 Dec 2016 10:06:00 -0500 From: Michael On Wed, 28 Dec 2016 07:26:26 + co...@sdf.org wrote: > On Wed, Dec 28, 2016 at 02:49:54AM +, David Holland wrote: > NetBSD is just about the only OS still using xorg as setuid root. > Pretty much everyone else did away with it. We only really need it for /dev/pci*, because that lets you mmap() arbitrary PCI space - things like wsfb or sbus graphics work without it. Likewise DRM/KMS. We should disable options INSECURE by default on x86 and make Xorg not be suid root. Obscure systems that still need it -- e.g., VIA, perhaps, which has no KMS driver -- can use custom kernel configs. That would kill almost all X on non-x86 PCI. You can still set INSECURE if you want, on your custom kernel.
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, Dec 28, 2016 at 02:49:19PM -0500, Michael wrote: > We can go back to PCI-access-via-wsdisplay with relatively little pain > though. Yes, please! Martin
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
Hello, On Wed, 28 Dec 2016 20:13:05 +0100 Martin Husemann wrote: > On Wed, Dec 28, 2016 at 07:04:20PM +, Taylor R Campbell wrote: > > Likewise DRM/KMS. We should disable options INSECURE by default on > > x86 and make Xorg not be suid root. Obscure systems that still need > > it -- e.g., VIA, perhaps, which has no KMS driver -- can use custom > > kernel configs. > > Unfortunately it is not that simple. We recently noticed that Xorg on > sparc64 for PCI cards now needs INSECURE, despite proper framebuffer > drivers. At least I'm not the only one who missed the 'on x86' above ;) We can go back to PCI-access-via-wsdisplay with relatively little pain though. have fun Michael
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
Hello, On Wed, 28 Dec 2016 19:04:20 + Taylor R Campbell wrote: >Date: Wed, 28 Dec 2016 10:06:00 -0500 >From: Michael > >On Wed, 28 Dec 2016 07:26:26 + >co...@sdf.org wrote: > >> On Wed, Dec 28, 2016 at 02:49:54AM +, David Holland wrote: >> NetBSD is just about the only OS still using xorg as setuid root. >> Pretty much everyone else did away with it. > >We only really need it for /dev/pci*, because that lets you mmap() >arbitrary PCI space - things like wsfb or sbus graphics work without it. > > Likewise DRM/KMS. We should disable options INSECURE by default on > x86 and make Xorg not be suid root. Obscure systems that still need > it -- e.g., VIA, perhaps, which has no KMS driver -- can use custom > kernel configs. That would kill almost all X on non-x86 PCI. have fun Michael
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, Dec 28, 2016 at 07:04:20PM +, Taylor R Campbell wrote: > Likewise DRM/KMS. We should disable options INSECURE by default on > x86 and make Xorg not be suid root. Obscure systems that still need > it -- e.g., VIA, perhaps, which has no KMS driver -- can use custom > kernel configs. A non-issue for amd64, for which via is disabled by default :-) Go for it!!
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, Dec 28, 2016 at 07:04:20PM +, Taylor R Campbell wrote: > Likewise DRM/KMS. We should disable options INSECURE by default on > x86 and make Xorg not be suid root. Obscure systems that still need > it -- e.g., VIA, perhaps, which has no KMS driver -- can use custom > kernel configs. Unfortunately it is not that simple. We recently noticed that Xorg on sparc64 for PCI cards now needs INSECURE, despite proper framebuffer drivers. Martin
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
Date: Wed, 28 Dec 2016 10:06:00 -0500 From: Michael On Wed, 28 Dec 2016 07:26:26 + co...@sdf.org wrote: > On Wed, Dec 28, 2016 at 02:49:54AM +, David Holland wrote: > NetBSD is just about the only OS still using xorg as setuid root. > Pretty much everyone else did away with it. We only really need it for /dev/pci*, because that lets you mmap() arbitrary PCI space - things like wsfb or sbus graphics work without it. Likewise DRM/KMS. We should disable options INSECURE by default on x86 and make Xorg not be suid root. Obscure systems that still need it -- e.g., VIA, perhaps, which has no KMS driver -- can use custom kernel configs.
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, 28 Dec 2016, Michael wrote: NetBSD is just about the only OS still using xorg as setuid root. Pretty much everyone else did away with it. We only really need it for /dev/pci*, because that lets you mmap() arbitrary PCI space - things like wsfb or sbus graphics work without it. I'm curious. If you have time, can you explain why those work without it? I'm assuming wsfb because it's in the kernel already and sbus because it has some kind of smarter & more magical method versus PCI ? We could easily do away with it by going back to using ttyE*, ttyF* etc. - that would only allow using graphics hardware with kernel drivers though. I did that back in the xf86 days, As a user, I had zero problem with that. that way every graphics device shows up as its own PCI domain, device 0:0:0, complete with its own IO space, which can be quite confusing since it doesn't correspond to the actual bus layout at all. That makese sense. As a developer, I always hate big lookup tables and TLB-like abstractions. They are helpful, but usually a bit obtuse to work with. -Swift
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, 28 Dec 2016, Jonathan A. Kollasch wrote: Is NetBSD going to play with Wayland? 'Cause X.org seems to be in a bit shaky and captured by Linux-droids. What makes you think Wayland isn't also captured by the Penguins? Perhaps I wasn't direct enough. I do think that. I think even worse, actually, it's pretty well taken over by Fedora (Wayland) and Ubuntu (MIR) folks. It looks totally Linuxsy and I was hoping one of the wizards on the lists would come out and say "Oh no Swift, you have it all wrong, let me explain how KMS is wonderful and we have no problems at all with Wayland. There's going to be a new nifty add-on that will do proper remote X. Nothing to worry about. It's just like what we'd have done ourselves." That didn't exactly happen, but it's what I expected anyway. -Swift
Re: Aw: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, 28 Dec 2016, Carsten Kunze wrote: This will be the time to leave NetBSD and go to OpenBSD. I run OpenBSD, and it's nice. No problems there. I run FreeBSD, too. Or to Linux. I work with a lot of Linux machines. No thanks. Why not using the original when NetBSD would try to copy Linux? Well, I can think of several reasons: 1. It's that NetBSD is trying to copy Linux, it's that TNF doesn't have the resources to re-invent X11. So we are stuck with what's available. During this discussion I see nobody jumping up and down saying how great Linux's implementation is - just that it's the only viable option. 2. Linux uses systemd and a bunch of other non-Unix-like software I find repugnant. 3. Then I'd be exposed to too many Linux users. That doesn't end well since most of them run Ubuntu and, uhm, it shows. Will systemd on NetBSD be the next step? Negative. That'd be suicide. The project would implode. I highly doubt that'd ever happen. The brain drain would kill TNF, IMHO. It's hyperbolic anyhow. FreeBSD does already try to copy Linux (+ZFS) just to attract users. Negative. As others have pointed out ZFS comes from Solaris. Also, Linux has pretty terrible implementation of ZFS which is far behind FreeBSD's. The closest facsimile, BTRFS, is still light years behind ZFS in features, performance, and stability. Linux currently has no real answer to ZFS besdies "wait for BTRFS". However, they are making lots of progress in BTRFS and since Ted Tso wrote ext2,3,4 (which is downright horrible) I figure he's got to have learned something by now. It's likely to emerge as something more usable in the next couple of years. Indeed, Slackware is much more UNIX like than FreeBSD. Well since that's totally subjective, I'll just go ahead and completely disagree with you. Linux has essentially zero SysV code. I consider early BSD to be more-unixy-than-att-UNIX and Linux has much less of that, versus FreeBSD. Slackware is cool and all, it's a hold-out from systemd, too. However, it's still running Linux. One of the reasons that users prefer NetBSD might be that it is UNIX and not like modern Linux. Well, being a bit pedantic here, I'll point out that NetBSD doesn't have SysV code in it, either. It all depends on how you define "UNIX". I think of it as a way of doing things according to the Unix philosophy, best defined by Mike Gancarz. Others see "UNIX" as a copyright or trademark. Still other see it as a code-path and pedigree from AT&T. If this will change I'm glad that there is still OpenBSD. You have that right. Personally, I'm glad there's more than just OpenBSD. Otherwise, I'd have to put up with Theo more than I do, and nobody wants that. -Swift
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, 28 Dec 2016, David Holland wrote: On Tue, Dec 27, 2016 at 03:41:44PM -0700, Swift Griggs wrote: > Is NetBSD going to play with Wayland? 'Cause X.org seems to be in a bit > shaky and captured by Linux-droids. I don't know. But all that stuff is shaky and linuxish. Good. I'm glad I'm not the only one who got that impression. ...you use XDMCP? Anyone uses XDMCP, other than to run some vintage X terminals they found in a skip? Or do you mean "remote X display access"? I do not use an X chooser or a display manager (much). I do have a fully functioning SGI box setup to both, but I rarely use it for anything. I set that up years ago for some NCD X terminals and it's still kicking around in my home lab. Maybe my nomenclature is a bit off and I shouldn't refer to remote X-apps that way. However, I do use remote X displays, and that is specifically what will not be supported (I assume along with display managers and choosers, too) with Wayland. KMS is best thought of as "the linux world finally figures out what everyone else knew by around 1990", that is, you should have device drivers for graphics same as for other hardware, and framebuffer devices exposed to userland that don't require reimplementing drivers in every application (read: X server) wanting to use the framebuffer. What you say makes technical sense. However, from a logistics standpoint, doesn't that also mean that the drivers become specific to choices made in kernel-land for whatever OS implements them? I remember the whole Xfree86 -> Xorg transition and the eventual emergence of KMS. My big fear back them was that Linux would just focus on KMS, the X projects would wither, and any OS's that didn't have a million monkeys to work on graphics drivers would be out in the cold. It turned out that I was pretty much right. I used some pretty old hardware until NetBSD 7.x and FreeBSD 10 came out and had updated their KMS implementations with new drivers. Suddenly 80% of my new hardware was viable again. I didn't have to continue to use AGP graphics cards and expensive funny mobos that allowed newer CPUs with an older graphics bus. My point is that, though you are probably much more knowledgeable about what the "right" architecture is, I did see some advantages to centralizing the drivers in "an application" (X) because at least that creates a common fountain for FOSS to cooperate. Maybe my perception of that whole situation was off and Xfree86 just made it harder. I never coded on that project. Except they apparently don't have it right yet, because the drmkms2 Xorg binary is still setuid root. You are probably just making a point about the architecture from earlier. Point taken. However, as an aside, I don't actually care about that particular bit, and I know others who would agree with me (not in the majority, I'm sure). X doesn't listen to TCP by default anymore and even if it did, it's easily firewalled. Most multi-user server systems don't run an X server. So, it doesn't really impact local security that much either. Then again, I'm not a "security guy". If I was, I'd be all high on OpenBSD. More power to those guys, they seem to get a helluva lot done. However, to me, security is like handrails on a long flight of stairs. You absolutely need it, but don't confuse that fact with the point of building the stairs, which was to get to the top. You can also add handrails later. It's not the smartest or safest way to go, but it's possible. IRIX was hella inscure and I still use it all the time in a version-locked environment behind my firewall. It still does things I can't find better anywhere else. I'll probably use them till I'm dead and I have zero fear of 37337 h0x0x0rs coming after me. The point in this context is that I think Unix principles are more important and helpful than security principles. Small is beautiful. Simple programs that interoperate are good. "Modern X" as Mouse put it, doesn't seem hip to any of that, with or without needing SetUID binaries, which is an afterthought (though I think you were probably bringing up the point to illustrate your architectural critique). At least "crufty X" (my term) showed some awareness of that. There were some historical reasons that XFree86 ended up using the MS-DOS model for hardware and drivers, but it was wrong then anyway and there just wasn't a critical mass of people who knew better. Well, having lived through that time, I can tell you that I was a young guy who'd just come from MSDOS to UNIX in about 1992 or so. I think there were a lot of folks like me who, as you put it, were just too inexperienced to get it right. They were my peers. I had tons of respect and admiration for the accomplishments of the Unix folks, but they were "elite" and very few. It took years to get caught up, by then folks from my generation had made a bit of a dog's dinner out of UNIX but also invented some great things. Plus,
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
Hello, On Wed, 28 Dec 2016 07:26:26 + co...@sdf.org wrote: > On Wed, Dec 28, 2016 at 02:49:54AM +, David Holland wrote: > > Except they apparently don't have it right yet, because the drmkms2 > > Xorg binary is still setuid root. > > > > NetBSD is just about the only OS still using xorg as setuid root. > Pretty much everyone else did away with it. We only really need it for /dev/pci*, because that lets you mmap() arbitrary PCI space - things like wsfb or sbus graphics work without it. We could easily do away with it by going back to using ttyE*, ttyF* etc. - that would only allow using graphics hardware with kernel drivers though. I did that back in the xf86 days, that way every graphics device shows up as its own PCI domain, device 0:0:0, complete with its own IO space, which can be quite confusing since it doesn't correspond to the actual bus layout at all. have fun Michael
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Tue, Dec 27, 2016 at 03:41:44PM -0700, Swift Griggs wrote: > > > Is NetBSD going to play with Wayland? 'Cause X.org seems to be in a > bit shaky and captured by Linux-droids. What makes you think Wayland isn't also captured by the Penguins? Jonathan Kollasch
Aw: Re: Aw: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
John Nemeth wrote: > On Dec 28, 6:36am, Carsten Kunze wrote: > } already try to copy Linux (+ZFS) just to attract users. Indeed, > > ZFS comes from Solaris, not Linux. If you're going to talk > smack, at least be accurate. Also, there is nothing wrong with > adopting good things from other sources. If I say "Linux + something" this *maybe* means that this something is not from Linux ;-)
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Wed, Dec 28, 2016 at 02:49:54AM +, David Holland wrote: > Except they apparently don't have it right yet, because the drmkms2 > Xorg binary is still setuid root. > NetBSD is just about the only OS still using xorg as setuid root. Pretty much everyone else did away with it.
Re: Aw: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Dec 28, 6:36am, Carsten Kunze wrote: } } This will be the time to leave NetBSD and go to OpenBSD. Or to } Linux. Why not using the original when NetBSD would try to copy } Linux? Will systemd on NetBSD be the next step? FreeBSD does } already try to copy Linux (+ZFS) just to attract users. Indeed, ZFS comes from Solaris, not Linux. If you're going to talk smack, at least be accurate. Also, there is nothing wrong with adopting good things from other sources. } Slackware is much more UNIX like than FreeBSD. One of the reasons } that users prefer NetBSD might be that it is UNIX and not like } modern Linux. If this will change I'm glad that there is still } OpenBSD. } }-- End of excerpt from Carsten Kunze
Aw: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
This will be the time to leave NetBSD and go to OpenBSD. Or to Linux. Why not using the original when NetBSD would try to copy Linux? Will systemd on NetBSD be the next step? FreeBSD does already try to copy Linux (+ZFS) just to attract users. Indeed, Slackware is much more UNIX like than FreeBSD. One of the reasons that users prefer NetBSD might be that it is UNIX and not like modern Linux. If this will change I'm glad that there is still OpenBSD.
Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?
On Tue, Dec 27, 2016 at 03:41:44PM -0700, Swift Griggs wrote: > Is NetBSD going to play with Wayland? 'Cause X.org seems to be in a bit > shaky and captured by Linux-droids. I don't know. But all that stuff is shaky and linuxish. > XDMCP ...you use XDMCP? Anyone uses XDMCP, other than to run some vintage X terminals they found in a skip? Or do you mean "remote X display access"? > * Is KMS "just a hack" we support or is it a future X11 direction TNF > embraces? KMS is best thought of as "the linux world finally figures out what everyone else knew by around 1990", that is, you should have device drivers for graphics same as for other hardware, and framebuffer devices exposed to userland that don't require reimplementing drivers in every application (read: X server) wanting to use the framebuffer. Except they apparently don't have it right yet, because the drmkms2 Xorg binary is still setuid root. There were some historical reasons that XFree86 ended up using the MS-DOS model for hardware and drivers, but it was wrong then anyway and there just wasn't a critical mass of people who knew better. As I recall the mindset in the Linux world at the time was that the only alternative to putting all the hardware stuff in the XFree86 binary was to put the entire X server in the kernel. The idea of a different lower-level interface in between there was apparently too much to process. :-| > Doesn't Linux do things in kernel-land that we either can't or > won't do in NetBSD? I'm thinking of all the stuff provided by > ./sys/miscfs/procfs/procfs_linux.c and sys/compat/linux*. Doesn't that > mean we are forever going to be worried more about making sure we > properly ape Linux rather than making anything novel ? Maybe. The problem is: if we venture off in a different direction, that's signing up for a hell of a lot of work. It's probably a bad idea unless upstream and linux go off in a completely unacceptable direction. Until then it's probably better to dissuade them from doing so. That is: if we (for whatever "we") acquire enough of a stake in *their* project, then project politics won't let them blow us off. On the flip side I do feel like a lot of what we get for graphics is crap with an extra order of bleck. If we had infinite resources for development we'd probably do well to design our own thing. Same as if we had inifnite resources for development we'd do well to move Gnome and KDE to the bit bucket and do that right as well. Unfortunately, we don't. > * How do weird X11 framebuffer code for off-the-wall platforms get built? > I'm thinking of things like Amiga's with RetinaZ3 boards. How is it that > these wizards-in-caves can be coaxed out for that, but for x86 we have > to beg for a seat at the table with Linux and Microsoft? I'm just > ignorant of these dynamics. I'm assuming it's because those older > framebuffers are more simplistic or better documented. Yes. Also, there aren't as many of those older non-x86 framebuffers. There's a lot of radeon and nvidia models. (And intelgraphics, and other x86 things before them.) -- David A. Holland dholl...@netbsd.org
Xorg vs Wayland (and MIR?) - future for NetBSD X ?
Is NetBSD going to play with Wayland? 'Cause X.org seems to be in a bit shaky and captured by Linux-droids. More questions if anyone feels like answering: * It's obvious we already have KMS. However, is that all we need to support Wayland? * What do the other BSD's do at this point? Is there any cohesion there? * I don't think GTK + Broadway or RDP/VNC is a viable alternative to XDMCP. The Wayland guys really think that's good enough? XDMCP can do things those can't, like display a single application etc... I've never seen a non-hackish way to do that with VNC or RDP and Broadway is GTK3-only. If XDMCP goes... well damn. I like it and use it. I guess I'm screwed because the Wayland guys seem to see XDMCP and drawing operations as "the dumb way" to do things (from reading their interviews). I'd have a lot easier time accepting that if we had a viable XDMCP alternative. That doesn't seem to me to be the case. Since nobody cares what I will "accept" I guess I'll be doomed to old framebuffer hardware like we were before the last KMS update that came with 7.x Then again, I mostly don't care. I'm old and I like old hardware. However, I'd hate to see a systemd-like-event happen to X11. * Anyone remember AtomBIOS? Wasn't stuff like that supposed to solve most of the we'll-never-share-squat-with-anyone problem for the vendors? They could all just make their special-monkey-magic hyperfast graphics calls from BIOS calls (which would suck for non x86 but at least provide some middle ground for development). I guess it never took off? * Is KMS "just a hack" we support or is it a future X11 direction TNF embraces? Doesn't Linux do things in kernel-land that we either can't or won't do in NetBSD? I'm thinking of all the stuff provided by ./sys/miscfs/procfs/procfs_linux.c and sys/compat/linux*. Doesn't that mean we are forever going to be worried more about making sure we properly ape Linux rather than making anything novel ? * How do weird X11 framebuffer code for off-the-wall platforms get built? I'm thinking of things like Amiga's with RetinaZ3 boards. How is it that these wizards-in-caves can be coaxed out for that, but for x86 we have to beg for a seat at the table with Linux and Microsoft? I'm just ignorant of these dynamics. I'm assuming it's because those older framebuffers are more simplistic or better documented. For reference: Xorg seems to be losing momentum (or not) http://www.phoronix.com/scan.php?page=news_item&px=XServer-Git-2016 http://mirror.linux.org.au/linux.conf.au/2013/ogv/The_real_story_behind_Wayland_and_X.ogv http://www.phoronix.com/scan.php?page=news_item&px=X.Org-Foundation-Missteps (I know, I know, two of those are Larabel links - but his facts are correct in this case.) Some of my biases for Linux device drivers on BSD come from this: http://info.iet.unipi.it/~luigi/freebsd/linux_bsd_kld.html My only real technical knowledge of AtomBIOS comes from this post: http://tinyurl.com/j2q87y8 Amigas have cool X11 drivers. So does SH3, MacPPC/68k, and others: http://ftp.netbsd.org/pub/NetBSD-archive/NetBSD-1.4.2/amiga/INSTALL.X11 -Swift