Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting build failures on debian bookworm with gcc 12.2.0 #60

Open
ColinIanKing opened this issue Jul 17, 2023 · 8 comments
Open

getting build failures on debian bookworm with gcc 12.2.0 #60

ColinIanKing opened this issue Jul 17, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@ColinIanKing
Copy link

Hi,

I'm getting some build failures on tip commit 47079e5


gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Debian 12.2.0-14) 
[ 71%] Building C object sources/ippcp/CMakeFiles/ippcp_s_n0.dir/__/__/c_sources/n0/c_intel64/n0_pcpaes_cmacupdate.c.o
In file included from /home/cking/repos/ipp-crypto/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:33:
In function ‘PadBlock’,
    inlined from ‘n0_ippsAES_CMACGetTag’ at /home/cking/repos/ipp-crypto/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:83:10:
/home/cking/repos/ipp-crypto/sources/ippcp/pcptool.h:95:12: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]
   95 |       d[k] = paddingByte;
      |       ~~~~~^~~~~~~~~~~~~
/home/cking/repos/ipp-crypto/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c: In function ‘n0_ippsAES_CMACGetTag’:
/home/cking/repos/ipp-crypto/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:72:13: note: at offset 16 into destination object ‘locBuffer’ of size 16
   72 |       Ipp8u locBuffer[MBS_RIJ128];
      |             ^~~~~~~~~
In function ‘PadBlock’,
    inlined from ‘n0_ippsAES_CMACGetTag’ at /home/cking/repos/ipp-crypto/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:83:10:
/home/cking/repos/ipp-crypto/sources/ippcp/pcptool.h:95:12: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]
   95 |       d[k] = paddingByte;
      |       ~~~~~^~~~~~~~~~~~~
/home/cking/repos/ipp-crypto/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c: In function ‘n0_ippsAES_CMACGetTag’:
/home/cking/repos/ipp-crypto/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:72:13: note: at offset [32, 48] into destination object ‘locBuffer’ of size 16
   72 |       Ipp8u locBuffer[MBS_RIJ128];
      |             ^~~~~~~~~
cc1: all warnings being treated as errors
@andreyfe1
Copy link

Hi @ColinIanKing,
Thank you for reporting this!
Looks like this is the same issue as #47
GCC12 support is coming and it will be added in one of the next releases.

@ElenaTyuleneva ElenaTyuleneva added the enhancement New feature or request label Jul 19, 2023
@dstonecy
Copy link

Also looking for a patch for bookworm

@paveldyakov
Copy link

Hi @ColinIanKing and @dstonecy,

Could you please try to build IPP Crypto sources with GCC 12.2?
N0 was disabled in IPP Crypto in the latest releases. I see no issues on the local machine now.

@ColinIanKing
Copy link
Author

ColinIanKing commented Jan 18, 2024

Hi there,

Thanks for the fix, builds fine with:

gcc-12.2.0 (Debian 12.2.0-14):
[100%] Linking C shared library ../../.build/RELEASE/lib/libippcp.so
/usr/bin/ld: warning: jmp_ippsXMSSVerify_f1be07cf.asm.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
[100%] Built target ippcp_dyn

..and also:
gcc version 13.2.0 (Debian 13.2.0-9)

Note that we're seeing an executable stack warning, this could potentially be an attack vector, perhaps this needs investigating further. ( https://www.redhat.com/en/blog/linkers-warnings-about-executable-stacks-and-segments )

@paveldyakov
Copy link

Hi @ColinIanKing,
Thank you for pointing out. We will take a look

@stanciuadrian
Copy link

Hello @ColinIanKing!
We have prepared a fix for the executable stack issue that will be available with the next public source code release.

@paveldyakov
Copy link

Hi @ColinIanKing,

Would you like to verify that the issue is fixed?

@rcao8
Copy link

rcao8 commented Jan 6, 2025

@ColinIanKing Can you help verify the fixed with the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants