integrity: use KERNEL_DS instead of get_ds()
Subsystems (5)
PATCH 1/1 integrity: use KERNEL_DS instead of get_ds()
get_ds() is a legacy name for KERNEL_DS; all architectures #define it to KERNEL_DS, and almost every user of set_fs() uses the name KERNEL_DS.
Let the integrity subsystem also use KERNEL_DS so that we can get rid of get_ds() at some point.
Signed-off-by Jann Horn <[email protected]>
--- security/integrity/iint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/iint.c +1 -1
@@ -200,7 +200,7 @@ int integrity_kernel_read(struct file *file, loff_t offset,return -EBADF ; old_fs =get_fs (); -set_fs (get_ds ()); +set_fs (KERNEL_DS ); ret =__vfs_read (file, buf, count, &offset);set_fs (old_fs);
Signature · 1 line
2.21.0.352.gf09ad66450-goog
Quoted 6 lines · Jann Horn
get_ds()is a legacy name forKERNEL_DS; all architectures #define it toKERNEL_DS, and almost every user ofset_fs()uses the nameKERNEL_DS.Let the integrity subsystem also use
KERNEL_DSso that we can get rid ofget_ds()at some point.
Nevermind, Linus just did this across the tree in
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=736706bee3298208343a76096370e4f6a5c55915
.