[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DSO-style FFI
From: |
Michael Welsh Duggan |
Subject: |
Re: DSO-style FFI |
Date: |
Sat, 12 Oct 2013 11:34:26 -0400 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> This approach seems very weird to me.
>
> Yup.
>
>> I don't understand why it is preferable to a libffi-based FFI.
>
> I don't claim it's a better solution, really. I just don't see anny
> movement towards providing libffi support (other than people saying we
> should do it).
>
> I think the reason is that I don't know anyone who's willing/able to add
> libffi support to Emacs and write the corresponding code to link to
> (say) libgnutls.
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. The problems I see are A) that
it would be trivial to use such an interface to crash or subvert emacs
from elisp, 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.
As an example, it would be possible to use a raw libffi binding to call
memset with appropriate arguments to tromp right over any memory that
emacs has access to.
This isn't to say that something that is not libffi itself could use
libffi to create something safer. Though I don't know what that would
be.
--
Michael Welsh Duggan
(address@hidden)
- Re: DSO-style FFI, (continued)
- 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 <=
- Re: DSO-style FFI, Stephen J. Turnbull, 2013/10/12
- Re: DSO-style FFI, Stefan Monnier, 2013/10/14
- 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