UPSTREAM: x86/uaccess: Introduce user_access_{save,restore}()

Upstream commit e74deb11931ff682b59d5b9d387f7115f689698e.

Introduce common helpers for when we need to safely suspend a
uaccess section; for instance to generate a {KA,UB}SAN report.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Change-Id: I07f77f905a279d0b711d1297152fc2c37ab582d2
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 128674696
3 files changed