Comment 6 for bug 1926142

Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: memfd from ubuntu_kernel_selftests failed to build on B-5.4

A quick check shows this test was introduced in 544029862c selftests/memfd: add tests for F_SEAL_FUTURE_WRITE seal [1]

As this issue does not exist in F-5.4, I think it might have something to do with B-hwe-5.4.

Run `git grep F_SEAL_FUTURE_WRITE` in B-hwe-5.4 and Focal tree shows the following is missing on the former:

include/linux/mm.h: * seal_check_future_write - Check for F_SEAL_FUTURE_WRITE flag and handle it
include/linux/mm.h: * Check whether F_SEAL_FUTURE_WRITE is set; if so, do proper check/handling on
include/linux/mm.h: if (seals & F_SEAL_FUTURE_WRITE) {
include/linux/mm.h: * Since an F_SEAL_FUTURE_WRITE sealed memfd can be mapped as

Diff: https://pastebin.ubuntu.com/p/8k5djst6C3/

[1] https://github.com/torvalds/linux/commit/544029862cbb1d7903e19f2e58f48d4884e1201b