On Mon, 06 Jul 2020 09:32:09 +0100 Diego Elio Pettenò <flameeyes@xxxxxxxxxxxxx> wrote: > Most applications rely on one or another kernel header — this has been > the norm for Linux kernel interface users for many years. Fine, I never said what you're proposing is without precedent. > > As for the "duplication", I do not see it as harmful in any way. > > And they do not re-declare, they declare. You're trying to create a > > centralized language definition that did not exist previously. > > It is harmful, because these structures *need* to be exactly > synchronised or the calls will fail. Or the data will be garbage. They are already synchronized today. No calls are failing and data isn't garbage. So you're not proving anything here. > Either the structure definition is not covered by the syscall exception, > or it isn't. > If it is, then we have a bit of an issue, as libpcap is not considering > itself a derived work of Linux and contains a copy of the same structures. > [...] You obviously mised "not", but hey. The important part is, do not see Paolo doing anything wrong. He has his own definitions, and if he chose to use the same field names, it's complately fine by me, as a copyright holder. Your attempts to drag libpcap into this are laughable. > You _also_ need the structure definition, or at least its size, > for the _IO macro to be usable. The question of _IO is a fine point. However, since the handcrafted application level structs are guaranteed to be the same size, it seems moot to me. > Now that does mean that mon_bin_hdr doesn't strictly need to be > there…. but what's the point of not defining the structure that > you _need_ to have to be able to read the data you're requesting? The point is to avoid licensing complications. Usbmon is much older than "syscall exception". > So in short as for "Why all this?" > > Because without this change, making a new userspace implementation > of usbmon requires straight-out copying code from the kernel in > not-quite-clearcut licensing environment. False. Making a new application for usbmon requires reading the documentation. It does not requires copying any code from the kernel. It is your choice to copy that code. I see that you got Greg to agree to your change in principle, so I am okay with providing a fixed binary struct for your convenience. Post a patch that satisfies him and I'll ack it. But please leave the falsehoods about structs being necessary out of it. Just don't put them into comments or the commit message. Can you do at least that much? -- Pete