Hi Christian,

On Tue, 2024-04-09 at 10:00 +0200, Chris Hofstaedtler wrote:
> * John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> [240409 09:36]:
> > the program enosys doesn't seem to be available on m68k and sh4, so it 
> > needs to
> > be excluded from the install files with the help of dh-exec:
> 
> I imagine the other option is to expand audit-arch.h to cover these
> archs. Do you mind reviewing this, then I could sent it upstream? Do
> note that I've mostly guessed what might be right.

Ah, I wasn't aware it's related to seccomp ;-).

> Relevant uapi header:
> https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/audit.h#L432
> 
> diff --git a/include/audit-arch.h b/include/audit-arch.h
> index ade182417..9afc663cd 100644
> --- a/include/audit-arch.h
> +++ b/include/audit-arch.h
> @@ -35,6 +35,8 @@
>  #    endif
>  #elif __powerpc__
>  #    define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC
> +#elif __m68k__
> +#    define SECCOMP_ARCH_NATIVE AUDIT_ARCH_M68K
>  #elif __mips__
>  #    if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
>  #     define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPS
> @@ -47,6 +49,12 @@
>  #    else
>  #     define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
>  #    endif
> +#elif __sh__
> +#    if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
> +#     define SECCOMP_ARCH_NATIVE AUDIT_ARCH_SH
> +#    else
> +#     define SECCOMP_ARCH_NATIVE AUDIT_ARCH_SHEL
> +#    endif
>  #elif __sparc__
>  #    if __SIZEOF_POINTER__ == 4
>  #     define SECCOMP_ARCH_NATIVE AUDIT_ARCH_SPARC

Looks good to me. I was actually the person who added support for m68k and sh4
to libseccomp. Unfortunately, upstream still hasn't released the a new stable
version which includes my patches. This is planned for 2.6.0.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to