intel / intel-ipsec-mb

Intel(R) Multi-Buffer Crypto for IPSec
BSD 3-Clause "New" or "Revised" License
288 stars 88 forks source link

Kernel 6 and gcc 12 #118

Closed spyroot closed 1 year ago

spyroot commented 1 year ago

Hi Folks,

The build process looks for specific macros that are not in the latest Linux. Where do you define IMB_KEY_SIZE_BYTES

Because it looks like an unknown symbol.

gcm_ctr_vectors_test.h:47:9: error: unknown type name ‘IMB_KEY_SIZE_BYTES’

struct gcm_ctr_vector {
    const uint8_t *K;       /* AES Key */
    IMB_KEY_SIZE_BYTES Klen;/* length of key in bits */.
    const uint8_t *IV;      /* initial value used by GCM */
    uint64_t IVlen;         /* length of IV in bytes */
    const uint8_t *A;       /* additional authenticated data */
    uint64_t Alen;          /* length of AAD in bytes */
    const uint8_t *P;       /* Plain text */
    uint64_t Plen;          /* length of our plaintext */
    /* outputs of encryption */
    const uint8_t *C;       /* same length as PT */
    const uint8_t *T;       /* Authentication tag */
    uint8_t Tlen;           /* AT length can be 0 to 128bits */
};
gcm_ctr_vectors_test.h:47:9: error: unknown type name ‘IMB_KEY_SIZE_BYTES’
   47 |         IMB_KEY_SIZE_BYTES Klen;/* length of key in bits */
      |         ^~~~~~~~~~~~~~~~~~
gcm_ctr_vectors_test.h:72:21: error: unknown type name ‘IMB_MGR’
   72 | extern int gcm_test(IMB_MGR *p_mgr);
      |                     ^~~~~~~
gcm_ctr_vectors_test.h:73:21: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
   73 | int ctr_test(struct IMB_MGR *);
      |                     ^~~~~~~
In file included from main.c:35:
customop_test.h:32:33: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
   32 | extern int customop_test(struct IMB_MGR *state);
      |                                 ^~~~~~~
In file included from main.c:36:
utils.h:41:66: error: ‘IMB_ARCH_NUM’ undeclared here (not in a function)
   41 | int update_flags_and_archs(const char *arg, uint8_t arch_support[IMB_ARCH_NUM],
tkanteck commented 1 year ago

Hey, what commands were executed that resulted in these errors? Was library installed on the system before compiling the test applications? These are not linux macros but data types and macros coming from intel-ipsec-mb.h header file

tkanteck commented 1 year ago

Hey @spyroot, could you please provide more details here?

spyroot commented 1 year ago

Folks I’m closing it looks like kernel 6 has some odd issue, install command that part of make install , somehow create empty header file. .I.e if you do make install intel-mb copies to /use/include and it empty. ..

tkanteck commented 1 year ago

OK. Thanks for checking and getting back