> > Eli Zaretskii writes: > > > > >> On the topic of what would be acceptable for an FFI, wouldn't something > > >> akin to what's done for modules be sufficient ? I.e., have the users of > > >> the interface explicitly state that they are compliant. > > >> > > >> It would scale better than an allow-list. IIUC, Arthur mentioned this > > >> in another thread. If this wouldn't be sufficient for an FFI, could you > > >> please elaborate on why that's the case ? > > > > > > What exactly are you suggesting? IOW, please describe what you have > > > in mind in more detail, because I don't think I understand it. > > > > Specifically, modify the `define-ffi-library' macro that emacs-ffi > > provides. > > > > Presently, it takes two arguments: a SYMBOL and a NAME. I am proposing > > that it be updated to take three arguments: a SYMBOL, a NAME and a > > GPL-COMPATIBLE-P token. A value of `t' would be necessary for creating > > a reference to the library. > > And if the value is not t, then the load will fail? If so, then this > additional argument makes very little sense: you could instead say It makes as much sense as it makes in C library. The token is basically an agreement between Emacs developers and the user not to load (link) closed source libraries into Emacs. > that just by loading the library, the Lisp program which uses > emacs-ffi "declares" the loaded library to be GPL-compatible. And we > are back where we began. Yes, you could. It would just completely remove the barrier. However, the token is an explicit acknowledgment of Emacs policy and license terms, by the person who loads the library into Emacs. > The way we do it when loading modules requires the _loaded_ library to > declare itself compatible, by exporting a symbol of a certain name. > That is an action by the library we load, not by the Lisp program > which loads it. True. But as you said yourself, a malicious user can easily cicrumvent it, even in C and there is nothing we can do to prevent them other than possibly taking legal actions against them. If some company or a state would use Emacs or any other GNU program, as a front-end to closed-source software, there is very little one can do technically. It is only the license and the agreement that actually protects it. ________________________________ Från: Eli Zaretskii Skickat: den 14 augusti 2024 17:31 Till: Suhail Singh Kopia: gerd.moellmann@gmail.com ; nicolas@n16f.net ; arthur.miller@live.com ; emacs-devel@gnu.org Ämne: Re: as for Calc and the math library > From: Suhail Singh > Cc: Suhail Singh , gerd.moellmann@gmail.com, > nicolas@n16f.net, arthur.miller@live.com, emacs-devel@gnu.org > Date: Wed, 14 Aug 2024 11:08:02 -0400 > > Eli Zaretskii writes: > > >> On the topic of what would be acceptable for an FFI, wouldn't something > >> akin to what's done for modules be sufficient ? I.e., have the users of > >> the interface explicitly state that they are compliant. > >> > >> It would scale better than an allow-list. IIUC, Arthur mentioned this > >> in another thread. If this wouldn't be sufficient for an FFI, could you > >> please elaborate on why that's the case ? > > > > What exactly are you suggesting? IOW, please describe what you have > > in mind in more detail, because I don't think I understand it. > > Specifically, modify the `define-ffi-library' macro that emacs-ffi > provides. > > Presently, it takes two arguments: a SYMBOL and a NAME. I am proposing > that it be updated to take three arguments: a SYMBOL, a NAME and a > GPL-COMPATIBLE-P token. A value of `t' would be necessary for creating > a reference to the library. And if the value is not t, then the load will fail? If so, then this additional argument makes very little sense: you could instead say that just by loading the library, the Lisp program which uses emacs-ffi "declares" the loaded library to be GPL-compatible. And we are back where we began. The way we do it when loading modules requires the _loaded_ library to declare itself compatible, by exporting a symbol of a certain name. That is an action by the library we load, not by the Lisp program which loads it.