cpacf_kmac(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpacf_kmac β€” like, the KMAC instruction era πŸ’…

okay so this is a page out of the Kernel API Manual bestie, and it's all about one lil function that goes and runs the KMAC instruction for you. no cap, that's the whole vibe. it's a kernel API thing, so if you're here you're probably already deep in the s390 rabbit hole β€” welcome, we love that for you 🫢


✨ NAME ✨

cpacf_kmac β€” literally executes the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE) instruction. that's it, that's the function. iconic behavior honestly πŸ’…


🌸 SYNOPSIS 🌸

int cpacf_kmac (unsigned long func , void *param , const u8 *src , long
src_len );

look at her. four args, one int return, main character energy ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • func β€” the function code you're passing to KMAC; check out the CPACF_KMAC_xxx defines for the full menu, iykyk πŸ“
  • param β€” address of the parameter block; see POP for the deets on what each func wants in there πŸ‘‘
  • src β€” address of the source memory area, aka where your bytes live πŸ’–
  • src_len β€” how long the src operand is, in bytes. yes, bytes. always bytes. πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

so what comes back? it returns 0 for the query func, and the number of processed bytes for the digest funcs. that's the whole story, no notes πŸ’€βœ¨


🌈 SEE ALSO 🌈

the kernel file ./arch/s390/include/asm/cpacf.h (go read it, it's giving lore), plus the whole friend group:


mwah πŸ’œ this page lives in ./arch/s390/include/asm, it's dated October 2026, and it's filed under cpacf_kmac(9). slay, go forth and auth your codes bestie πŸŒΈπŸŽ€

πŸ“¦ where this page comes from