Mailing List Archive

[Bug 2671] Consider integration of localscan_dlopen patch
https://bugs.exim.org/show_bug.cgi?id=2671

--- Comment #1 from Jeremy Harris <jgh146exb@wizmail.org> ---
There's several issues with the patch as presented:

- The -fvisibility compile flag. Other compilers?
- It uses GCC-specific pragmas. Do other compilers that people use work?
- It removes mention of the traditional local_scan build method from the
makefile.
If the intent is to remove support for that, I don't think it acceptable.
- The conflict with dlopened lookup modules. Possibly manageable via makefile
warning commentary and build-time checks.
- There's at least one global option, local_scan_timeout, which was a safety
feature guarding the traditional local_scan, not longer supported (but with
code still lying around in the source).
- Potential expansion of the test-configurations matrix. Actually, we probably
don't have the manpower, and probably things just won't get tested.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2671] Consider integration of localscan_dlopen patch [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2671

--- Comment #2 from Jeremy Harris <jgh146exb@wizmail.org> ---
I had some hope that dlmopen() might help with the lookup-modules conflict.
But I still can't see a way of getting the combination
- dl{,m}open()'d local_scan code can only see the defined local_scan API
symbols of the main exim program, enforced by the linker
- dl{,m}open()'d lookup modules can see the larger range of (non-C-static)
symbols, ditto

The discussions I find around these features seem to be only in terms of
protecting the DSO symbols from the calling program, so as to enforce the API
of the DSO. Our problem is the opposite, and we have two classes of API -
with one being a subset of the other.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: [Bug 2671] Consider integration of localscan_dlopen patch [ In reply to ]
On Fri, 6 Nov 2020, admin--- via Exim-dev wrote:

> https://bugs.exim.org/show_bug.cgi?id=2671
>
> --- Comment #2 from Jeremy Harris <jgh146exb@wizmail.org> ---
> I had some hope that dlmopen() might help with the lookup-modules conflict.
> But I still can't see a way of getting the combination
> - dl{,m}open()'d local_scan code can only see the defined local_scan API
> symbols of the main exim program, enforced by the linker
> - dl{,m}open()'d lookup modules can see the larger range of (non-C-static)
> symbols, ditto
>
> The discussions I find around these features seem to be only in terms of
> protecting the DSO symbols from the calling program, so as to enforce the API
> of the DSO. Our problem is the opposite, and we have two classes of API -
> with one being a subset of the other.

Could exim provide two libraries, one for each type of module and
have all interface between exim and the module code via the libraries ?

If the lookup library doesn't have an local_scan interface, then
someone writing a local_scan library would not need or want to link
against the lookup library.

(Yes it is open source so they can do whatever they want,
but we have already established that they do not wish to
relink exim to include their module.)

----

Twenty years ago the XFree86 project (and possibly the Xorg project today)
had operating system independent hardware driver modules
(I built a driver on linux and someone else used it on an OS/2 machine).

To do that we wrapped *every* system and (IIRC) library call that the
drivers were allowed to use.
However, IIRC, we did *not* use dlopen.

--
Andrew C. Aitchison Kendal, UK
andrew@aitchison.me.uk

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: [Bug 2671] Consider integration of localscan_dlopen patch [ In reply to ]
On 07/11/2020 21:57, Andrew C Aitchison via Exim-dev wrote:
> Could exim provide two libraries, one for each type of module and
> have all interface between exim and the module code via the libraries ?

I don't see how, without radically changing what both types of module
(I assume you're talking about module type A, the local_scan, and type
B, the lookups) are permitted to do. But perhaps you've thought of
something I have not.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##