android_kernel_motorola_sm6375/Documentation/filesystems
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Joe Perches 5f42436428 sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output
commit 2efc459d06f1630001e3984854848a5647086232 upstream.

Output defects can exist in sysfs content using sprintf and snprintf.

sprintf does not know the PAGE_SIZE maximum of the temporary buffer
used for outputting sysfs content and it's possible to overrun the
PAGE_SIZE buffer length.

Add a generic sysfs_emit function that knows that the size of the
temporary buffer and ensures that no overrun is done.

Add a generic sysfs_emit_at function that can be used in multiple
call situations that also ensures that no overrun is done.

Validate the output buffer argument to be page aligned.
Validate the offset len argument to be within the PAGE_SIZE buf.

Signed-off-by: Joe Perches <[email protected]>
Link: https://lore.kernel.org/r/884235202216d464d61ee975f7465332c86f76b2.1600285923.git.joe@perches.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-03-07 12:20:48 +01:00
..
caching
cifs
configfs
ext4
nfs
9p.txt
adfs.txt
affs.txt
afs.txt
api-summary.rst
autofs-mount-control.txt
autofs.txt
automount-support.txt
befs.txt
bfs.txt
btrfs.txt
ceph.txt
coda.txt
cramfs.txt
dax.txt
debugfs.txt
devpts.txt
directory-locking.rst
dlmfs.txt
dnotify.txt
ecryptfs.txt
efivarfs.txt
erofs.txt
ext2.txt
ext3.txt
f2fs.txt
fiemap.txt
files.txt
fscrypt.rst
fsverity.rst
fuse-io.txt
fuse.txt
gfs2-glocks.txt
gfs2-uevents.txt
gfs2.txt
hfs.txt
hfsplus.txt
hpfs.txt
index.rst
inotify.txt
isofs.txt
journalling.rst
locking.rst
locks.txt
mandatory-locking.txt
mount_api.txt
nilfs2.txt
ntfs.txt
ocfs2-online-filecheck.txt
ocfs2.txt
omfs.txt
orangefs.txt
overlayfs.txt
path-lookup.rst
path-lookup.txt
porting.rst
proc.txt
qnx6.txt
quota.txt
ramfs-rootfs-initramfs.txt
relay.txt
romfs.txt
seq_file.txt seq_file: document how per-entry resources are managed. 2021-03-04 10:26:48 +01:00
sharedsubtree.txt
splice.rst
spufs.txt
squashfs.txt
sysfs-pci.txt
sysfs-tagging.txt
sysfs.txt sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output 2021-03-07 12:20:48 +01:00
sysv-fs.txt
tmpfs.txt
ubifs-authentication.rst
ubifs.txt
udf.txt
vfat.txt
vfs.rst
virtiofs.rst
xfs-delayed-logging-design.txt
xfs-self-describing-metadata.txt