[PATCH RFC 03/23] PCI/proc: let procfs copy in config space writes

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 3 07:18:27 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/20261102-work-procfs-drivers-v1-0-a994bd4d3b1a@kernel.org?part=3




More information about the kexec mailing list