5 ms·
I remember Synology ships their NAS with custom vendor syscalls that used unassigned syscall numbers at the time, but those numbers are now clashing with real s
by leohonexus 5y ago
I remember Synology ships their NAS with custom vendor syscalls that used unassigned syscall numbers at the time, but those numbers are now clashing with real syscalls - causing undefined behaviour when running arbitrary code (e.g. Docker)
So TL;DR only implement custom syscalls if you intend to maintain for all of its consequences in the future.
Here's the tweet on Synology - https://twitter.com/RichFelker/status/1357733309737021444 https://twitter.com/RichFelker/status/1357733309737021444
- jart 5y agoFoolish but that's still a much smarter mistake to make than the ones we've seen from Western Digital exposing system calls over the network where some blogger can root your NAS by sending an abc123 cookie XHR to its unsecured PHP CGI script interface. If the guys making my NAS are smart enough to make mistakes hacking the kernel then that's reassuring.
- justinsaccount 5y agoYou are confusing https://man7.org/linux/man-pages/man3/system.3.html https://man7.org/linux/man-pages/man3/system.3.html with https://man7.org/linux/man-pages/man2/syscall.2.html https://man7.org/linux/man-pages/man2/syscall.2.html
- mike256 5y agoSynology is a bad example. Many of their custom syscalls are related to filesystem things like btrfs raid5 self repair and carefully removed from their gpl source code. Ianal but imho this is a gpl violation.
- junon 5y agoHow would modifying code be a violation of the GPL?
- sjburt 5y agoIf the modified code is distributed in binary form but not in source form.
- junon 5y agoIIRC that's not a violation. The source form needs to be available upon request, though I could be wrong.
- hosteur 5y agoThe source to the derived work that you distribute must be available for the user.
- junon 5y agoAvailable, not necessarily proactively published.
- IntelMiner 5y agoIf they remove it from their GPL code release but provide it in the GPL licensed binary then it's violating the GPL
- sigg3 5y agoIs it though? It's misleading, I'll give you that, but let's be pedantic (lawyers are)! They can probably provide the missing bits in dead tree letter format upon written formal request received at their post address.
- R0b0t1 5y agoIt's definitely against the license terms. You're supposed to distribute the code that generated the distributed binaries.
- wizzwizz4 5y agoTechnically, it's not a violation. They're releasing code; just not the code. So long as they (offer to, and then actually) provide the source code on request, licensed under GPLv2, they're allowed to do that. Though it probably is a violation, because they probably don't do that.
- kzrdude 5y agoThere must be a safer way to do this - a kernel module and custom ioctls, or what is it?
- adwn 5y agoYes, create a kernel module which registers a custom device, then change those syscalls to ioctls on that device.
- trissylegs 5y agoCustom device inode with custom ioctls. This is how binder works on Android.
- edderly 5y agoDon't you think the TL;DR is never add your own syscalls when implementing your own character device driver is almost always the better option if you want something to run in the kernel?