- /* Executable implies readable */
- if ((args->flags & PANFROST_BO_NOREAD) &&
!(args->flags & PANFROST_BO_NOEXEC))
return -EINVAL;
Generally, executable also implies not-writeable. Should we check that?
We were allowing it until now, so doing that would break the backward compat, unfortunately.
Not a problem if you only enforce this starting with the appropriate UABI version, but...
I still don't see how that solves the <old-userspace,new-kernel> situation, since old-userspace doesn't know about the new UABI, and there's no version field on the CREATE_BO ioctl() to let the kernel know about the UABI used by this userspace program. I mean, we could add one, or add a new PANFROST_BO_EXTENDED_FLAGS flag to enforce this 'noexec implies nowrite' behavior, but is it really simpler than explicitly passing the NOWRITE flag when NOEXEC is passed?
For some reason I thought the ABI version was negotiated (it is in kbase). Don't worry about it.
That commit is
Reviewed-by: Alyssa Rosenzweig alyssa.rosenzweig@collabora.com