[PATCH v2 2/9] ARM: traps: use get_kernel_nofault instead of set_fs()
hch at infradead.org
Sat Sep 19 01:27:46 EDT 2020
On Fri, Sep 18, 2020 at 02:46:17PM +0200, Arnd Bergmann wrote:
> ARM uses set_fs() and __get_user() to allow the stack dumping code to
> access possibly invalid pointers carefully. These can be changed to the
> simpler get_kernel_nofault(), and allow the eventual removal of set_fs().
> dump_instr() will print either kernel or user space pointers,
> depending on how it was called. For dump_mem(), I assume we are only
> interested in kernel pointers, and the only time that this is called
> with user_mode(regs)==true is when the regs themselves are unreliable
> as a result of the condition that caused the trap.
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the linux-arm-kernel