[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DSO-style FFI
From: |
Stefan Monnier |
Subject: |
Re: DSO-style FFI |
Date: |
Sat, 12 Oct 2013 14:55:26 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> It seems to me that writing libffi support to Emacs isn't that difficult
> in and of itself. I have no doubt that I could hack in something
> low-level without too much difficulty.
Could be. I haven't seen anything concrete (and of course, providing
access to libffi is only one half of the problem, the other half is to
write the binding to lib<foo>, and my impression is that more
people would know how to do that if that part were written in C).
> The problems I see are A) that it would be trivial to use such an
> interface to crash or subvert emacs from elisp,
This is a fundamental property of anything that lets gives access to
"any" library. DSO or FFI is in the same boat. IOW, if we really
consider it as too dangerous, then we can't provide anything related to
an FFI or dynamic loading of code.
> and B) that such a binding will allow people to write non-free
> extensions to Emacs in just the way that RMS has specifically stated
> that he would like to avoid.
Presumably we can prevent it by checking (before loading the library)
that the library is compatible with the GPL (following the scheme
designed originally for gcc).
> This isn't to say that something that is not libffi itself could use
> libffi to create something safer.
Don't worry: as long as you want to be able to link libraries written in
languages like C, you can't make it safer.
Stefan
- Re: DSO-style FFI, (continued)
- Re: DSO-style FFI, Andreas Schwab, 2013/10/10
- Re: DSO-style FFI, Davis Herring, 2013/10/08
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style FFI, Davis Herring, 2013/10/09
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style DSOs (this is NOT an FFI!), Stephen J. Turnbull, 2013/10/10
- Re: DSO-style FFI, Stephen J. Turnbull, 2013/10/08
- Re: DSO-style FFI, Stefan Monnier, 2013/10/08
- Re: DSO-style FFI, Michael Welsh Duggan, 2013/10/12
- Re: DSO-style FFI, Stephen J. Turnbull, 2013/10/12
- Re: DSO-style FFI,
Stefan Monnier <=
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/18
- Re: DSO-style FFI, Stefan Monnier, 2013/10/19
- Re: DSO-style FFI, Stefan Monnier, 2013/10/19
- Re: DSO-style FFI, Andy Moreton, 2013/10/19
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/19
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/08