Re: ioctl number change / backwards compatibility doubt
On Mon, Jan 24, 2022 at 07:20:45AM +0100, Greg KH wrote: > On Mon, Jan 24, 2022 at 05:49:06PM +1300, Paulo Miguel Almeida wrote: > > On Sun, Jan 23, 2022 at 12:04:48PM +0100, Greg KH wrote: > > > > when you told me to look for the userspace tool that interfaced with the > > ioctl, my interpretation was that you were referring to something akin > > to what /usr/bin/uname utility is to the syscall uname. Please correct me > > if I'm wrong. > > > > re: what calls the ioctl created by the driver. > > > > I'm led to believe that users of this driver make ioctl sycall > > invocations directly from their application's source code like this: > > > > #include "pi433_if.h" /* userspace driver header */ > > #include /* ioctl */ > > > > int file_desc = open("/dev/pi433.0", O_RDWR); > > struct pi433_tx_cfg tx_cfg = { > > .frequency = 43300, > > .bit_rate = 4800, > > ... > > }; > > > > int ret_val = ioctl(file_desc, PI433_IOC_WR_TX_CFG, tx_cfg); > > > > Yes, sorry for the confusion, this is what I am referring to. Where is > that userspace code as that is the code you will be needing to change if > you want to change this ioctl interface. > > thanks, > > greg k-h Hi Greg, The original author replied my email with that question. He sent me some the code used to interface with char device, however, the source code he provided me is already incompatible with the current version of the driver: #include "rfxx.h" (file header name has changed) int main(int argc, char *argv[]) { ... struct rfxx_send_config sendConfig; (struct name has changed) ... fd = open("/dev/rf69_0.0", O_RDWR); *(char device name changed)* ... sendConfig.data_mode = packet; *(property doesn't exist)* ... (IOCTL call has a different name) ret = ioctl(fd, RFXX_IOC_WR_SEND_CONFIG, ); if (ret == -1) ... } Assuming that I tweak these tools he provided me with and publish them, will I then be able to tweak the structures passed back and forth via ioctl? (do I need to change ioctl number in this case?) The reason why I'm asking this is because given the fact that other developers could have written similar code for interfacing with the driver (and that we will never know because code is proprietary), I won't be sure that I've changed all occurences at the same time, right? All in all, please correct if there are gaps in this train of thought. - If a change doesn't break *compiled* code (such as struct renaming) then it's 'okay' to make the change ? (this has happened in the this driver before) Best regards, Paulo Almeida ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Does Linux (Torvald's tree) infringe GPLv2 and contain proprietary binary blobs?
> On Mar 10, 2022, at 6:48 PM, FMDF wrote: > > Hi Everyone, > > Let me explain why I'm posting such an unusual question and why I really > _NEED_ reliable answers and (above all) reliable links to official > documents... > > In Wikipedia there is an article called "Linux kernel" at > https://en.wikipedia.org/wiki/Linux_kernel. > > According to XTools I'm the first of more than 1500 editors. I'm the one who > contributed the most. I'm proud of it, despite it still needs lots of > additional relevant information and perhaps it also needs the removal of > other not so relevant and/or redundant info. > > It's a "Class B" article (something that has been peer-reviewed by thousands > of people and considered two grades less than the top Wikipedia's articles). > > Unfortunately, there have been several attempts to state that Linux is _not_ > a free and open source kernel and that it contains proprietary binary blobs. > > I'm asking for help to remove those fake information, mainly sponsored and > backed by the FSF and by the Linux libre project (or something like that). > > Can someone please provide reliable sources that I can use when reverting the > above-mentioned false information? Unfortunately, I cannot simply revert them > by just saying that the Linux Community won't ever accept non GPLv2 complaint > code. > > There is a strict rule that says "No original research": mostly everything > must be supported by links to third party reliable documentation (web, books, > and so on). > > Again, can someone please help? > > Thanks, > > Fabio M. De Francesco All code in the kernel tree is under the GPLv2 or another compatible license. There are, however, non-GPL firmware blobs available that some of the drivers need to load into the hardware they support. Many wifi chipsets for example, require the open source driver to load a non-GPL firmware blob into the wifi chipset for it to work. These firmware blobs are generally distributed separately from the kernel itself as part of linux-firmware: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/ When a driver loads, it can request firmware from userspace, typically from /lib/firmware. If the firmware is present, it will be loaded into the kernel. There are a few firmware blobs in the kernel tree itself as well. Here is one at random: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wan/wanxlfw.inc_shipped The linux-libre project takes the normal Linux kernel, removes the firmware that is in the kernel, and removes the ability for the kernel to load firmware from the file system. You can do the same thing yourself with the normal kernel by disabling the drivers that require firmware. You’ll have to talk with a lawyer if you’re concerned about any of this being an GPL violation. Robert ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: A blog for kernel development
On Fri, 11 Mar 2022, Amit Kumar wrote: > Hi, > Thank you for your replies. I am just laying the foundation. After a > couple of weeks, I will start posing about the Linux kernel on my > blog. I am also planning to give online Linux kernel training after > some time. This might be free. So, keep in touch. > > Regards, > Amit Kumar with all due respect, you've been posting about your promises to start learning linux kernel development and write about it for many months now, and while you've produced nothing in terms of actual blog content, you continue to recommend that people follow you and check out your blog and so on. from back in july of last year (https://www.spinics.net/lists/newbies/msg63239.html), you wrote: "Hi All, I am just here to inform that I am trying to learn Linux kernel development. If someone wants to follow me, so that he may also learn with me." so it's been nine months now, and there is no indication that you have written or learned *anything* about linux kernel programming, yet you continue to encourage members of this list to keep visiting your blog, and you even suggest that you might offer online linux kernel training, despite no indication that you know the slightest thing about it. it's great that someone wants to get into LKP, and that should always be encouraged, but what you're doing seems little more than shameless self-promotion. rday ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Does Linux (Torvald's tree) infringe GPLv2 and contain proprietary binary blobs?
On Fri, Mar 11, 2022 at 03:48:37AM +0100, FMDF wrote: > Unfortunately, there have been several attempts to state that Linux is > _not_ a free and open source kernel and that it contains proprietary binary > blobs. > > I'm asking for help to remove those fake information, mainly sponsored and > backed by the FSF and by the Linux libre project (or something like that). > > Can someone please provide reliable sources that I can use when reverting > the above-mentioned false information? Unfortunately, I cannot simply > revert them by just saying that the Linux Community won't ever accept non > GPLv2 complaint code. > > There is a strict rule that says "No original research": mostly everything > must be supported by links to third party reliable documentation (web, > books, and so on). > > Again, can someone please help? I doubt anyone really cares about the purity of wikipedia articles here. The best I can link you to is this FAQ entry: https://www.kernel.org/faq.html#i-heard-that-linux-ships-with-non-free-blobs -K ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies