[ipxe-devel] Receiving http://ipxe.org/3c00e183 error after upgrade

Dentcho Bankov dbankov at vmware.com
Sat Aug 22 09:06:09 UTC 2020


Hi Michael,

Just sharing my discoveries.

First in my previous e-mail I've made a mistake about the version of the compiler I'm using. And the problem I'm observing is with:
1. gcc-4.5.3
2. binutils-2.17.50.0.15

I confirmed that with gcc-9.3 on Ubuntu 2020 everything works fine.

I did a binary search and surprisingly the change which causes the problem for me appeared to be https://github.com/ipxe/ipxe/commit/bb74f00512995f15bf61517fc039f32713e0af73#diff-25d902c24283ab8cfbac54dfa101ad31

The surprising part is that this change just adds a bunch of "extern" statements in asn1.h which for some reason changes the alignment of the asn1_algorithms link table. Further it seems these are added only to support some test code in rsa_test.c so to resolve my problem I just moved the extern statements from asn1_algorithms to the rsa_test.c.

So I'm writing this e-mail to also ask if it's worth posting the above change (moving the extern statements to rsa_test.c) as a pull request.

Best regards,
Dentcho Bankov

On 20.08.20, 16:55, "Dentcho Bankov" <dbankov at vmware.com> wrote:

    Hi Michael,

    I'm using gcc 4.8 in CentOS 6 and don' have much control of the environment but don't bother investigating I just wanted to make sure this is not a known issue.

    I'm currently trying in a different environment and hopefully will track this down soon.

    I'll post an update if it's worth sharing.

    Best regards,
    Dentcho Bankov

    On 20.08.20, 16:43, "Michael Brown" <mcb30 at ipxe.org> wrote:

        On 20/08/2020 10:54, Dentcho Bankov wrote:
        > I’ve just pulled the latest iPXE code (after more than a couple of 
        > years) and started getting a https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fipxe.org%2F3c00e183&data=02%7C01%7Cdbankov%40vmware.com%7C207e833279e34cae3ea908d8450f0144%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637335278038841839&sdata=enh4%2FCmyIwahgsENsiC7ejMkP99omYHoO4roB%2FztwfE%3D&reserved=0 error when trying 
        > to boot over HTTPS.
        > 
        > Investigating a bit revealed that in my iPXE binary the asn1_algorithms 
        > link table entries are offset by 48 bytes while the size of the asn1 
        > _algorithm struct is 40 bytes so the ‘for_each_table_entry ( algorithm, 
        > ASN1_ALGORITHMS )’ doesn’t cycle over the asn1_algorithms in the link 
        > table correctly.
        > 
        > I tried adding a dummy field of 8 bytes to the asn1_algortihm struct 
        > which resolved the above error but then I started receiving 
        > https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fipxe.org%2F420c6095&data=02%7C01%7Cdbankov%40vmware.com%7C207e833279e34cae3ea908d8450f0144%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637335278038851836&sdata=ZieMYJqb51HLeYJss0vMKRjWftj2%2B%2F8%2B851U4zxjkjI%3D&reserved=0 so I suspect I’m not building iPXE correctly.
        > 
        > Could you please let me know if somebody else had observed a similar 
        > problem lately and what may be causing it (I suspect this may be related 
        > to some alignment/padding misconfiguration but don’t know how this is 
        > controlled).

        Interesting.  Which compiler are you using?

        We've had previous issues with icc adding unexpected packing, but I have 
        not seen this problem with gcc.

        Thanks,

        Michael





More information about the ipxe-devel mailing list