Date: Thu, 14 Nov 2024 11:30:43 +0000
On Fri, Nov 8, 2024 at 4:20 PM Thiago Macieira wrote:
>
> On Friday 8 November 2024 03:56:43 Frederick Virchanza Gotham wrote:
> > I will build the plugin as a shared library file, and then I'll append
> > a known UUID to the file contents, something like
> >
> > echo "8749cd5638ddd35726a524567dc9e63e" >> libplugin.so
> >
> > After the UUID, I'll append any info I need, such as strings and
> > translations, version numbers, etc.
>
> Bad idea. How do you know that the file formats don't require some parsing-
> from-the-end too, for a signature verification?
<snip>
> But then we found out that the section table on ELF is not mandatory for
> execution and loading. There are tools like sstrip that can remove it. So in
> Qt 6.2 I moved from an ELF section to an ELF note.
This kind of problem isn't new and isn't just in computer programming.
Three hundred years ago we could have chatted as follows:
Thomas: I shall plant carrots in the field yonder behind the
old graveyard.
Thiago: But what if someone else wants to plant something else
in that field?
So originally I said I'd append the extra info to the end of the file,
and then you said you'd put it in an ELF note, but no matter where we
put it, someone else might want to do something else there.
I'm happy enough to append the info to the file following a known
UUID. I'll tell people to build their shared library, finalise it
(including things like stripping it), and then lastly append the extra
info to the end of it. If I get a few emails in the future about
people complaining that their plugin doesn't work after stripping it
then I'll tell them that that's because they stripped it after
appending the extra info (maybe I'll even make it a FAQ).
>
> On Friday 8 November 2024 03:56:43 Frederick Virchanza Gotham wrote:
> > I will build the plugin as a shared library file, and then I'll append
> > a known UUID to the file contents, something like
> >
> > echo "8749cd5638ddd35726a524567dc9e63e" >> libplugin.so
> >
> > After the UUID, I'll append any info I need, such as strings and
> > translations, version numbers, etc.
>
> Bad idea. How do you know that the file formats don't require some parsing-
> from-the-end too, for a signature verification?
<snip>
> But then we found out that the section table on ELF is not mandatory for
> execution and loading. There are tools like sstrip that can remove it. So in
> Qt 6.2 I moved from an ELF section to an ELF note.
This kind of problem isn't new and isn't just in computer programming.
Three hundred years ago we could have chatted as follows:
Thomas: I shall plant carrots in the field yonder behind the
old graveyard.
Thiago: But what if someone else wants to plant something else
in that field?
So originally I said I'd append the extra info to the end of the file,
and then you said you'd put it in an ELF note, but no matter where we
put it, someone else might want to do something else there.
I'm happy enough to append the info to the file following a known
UUID. I'll tell people to build their shared library, finalise it
(including things like stripping it), and then lastly append the extra
info to the end of it. If I get a few emails in the future about
people complaining that their plugin doesn't work after stripping it
then I'll tell them that that's because they stripped it after
appending the extra info (maybe I'll even make it a FAQ).
Received on 2024-11-14 11:31:01