[PATCH 1/4] pcre2: adds pcre2 to base

Dominick Grift dominick.grift at defensec.nl
Fri May 20 02:29:59 PDT 2022


Rui Salvaterra <rsalvaterra at gmail.com> writes:

> On Thu, 19 May 2022 at 18:35, Daniel Golle <daniel at makrotopia.org> wrote:
>>
>> On Thu, May 19, 2022 at 06:37:28PM +0200, Dominick Grift wrote:
>> > libselinux-3.4 requires pcre2
>> >
>> > Signed-off-by: Dominick Grift <dominick.grift at defensec.nl>
>> > ---
>> >  package/libs/pcre2/Config.in | 30 ++++++++++++
>> >  package/libs/pcre2/Makefile  | 92 ++++++++++++++++++++++++++++++++++++
>> >  2 files changed, 122 insertions(+)
>> >  create mode 100644 package/libs/pcre2/Config.in
>> >  create mode 100644 package/libs/pcre2/Makefile
>> >
>> > diff --git a/package/libs/pcre2/Config.in b/package/libs/pcre2/Config.in
>> > new file mode 100644
>> > index 0000000000..8777a4e84c
>> > --- /dev/null
>> > +++ b/package/libs/pcre2/Config.in
>> > @@ -0,0 +1,30 @@
>> > +config PCRE2_JIT_ENABLED
>> > +     bool
>> > + depends on PACKAGE_libpcre2 && (aarch64 || aarch64_be || arm ||
>> > i386 || i686 || x86_64 || mips || mipsel || mips64 || mips64el ||
>> > powerpc || powerpc64 || powerpcle || sparc)
>> > +     default y if (arm || i686 || x86_64)
>>
>> Can you explain the choice of architectures for which you are
>> suggesting to enable JIT by default?
>> Wouldn't e.g. aarch64 benefit just as well?
>
> I'd go even further and set it as default y if !arc (which is already
> "special" enough). I think all of our other targets are supported by
> the JIT. But that would be for a follow-up patch, of course.

I am not a huge fan of JIT in general as I associate it with execution of
anonymous memory and buffer overflows, whether that is justified or not.

Besides this is a "heavyweight" optimization that is not alway's
benificial. It adds 100KiB in size. I doubt that enabling this feature
brings much to the table in OpenWrt (except 100KiB).

I would actually consider taking the opposite route and disable JIT by
default for all architectures.

>
> Cheers,
> Rui
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

-- 
gpg --locate-keys dominick.grift at defensec.nl
Key fingerprint = FCD2 3660 5D6B 9D27 7FC6  E0FF DA7E 521F 10F6 4098
Dominick Grift



More information about the openwrt-devel mailing list