[PATCH RESEND v2 03/26] PCI/proc: let procfs copy in config space writes
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Nov 5 11:49:10 PST 2026
> Implement ->proc_write_buf() so procfs copies in what is written before
> it pins the entry, and write the config space from that copy with
> get_unaligned_le16() and get_unaligned_le32() instead of get_user().
>
> The copy holds at most PCI_CFG_SPACE_EXP_SIZE bytes. Larger writes come
> up short with PROC_ENTRY_SHORT_WRITES, like they did before because
> they were cut at the end of the config space.
>
> A buffer that can't be read used to write zeroes to the config space and
> report success. It fails with -EFAULT now and nothing is written.
>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-work-procfs-drivers-v2-0-245e54e87116@kernel.org?part=3
More information about the kexec
mailing list