summaryrefslogtreecommitdiff
path: root/arch/x86/lib/usercopy.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-12-22 11:11:48 +0300
committerTakashi Iwai <tiwai@suse.de>2022-12-22 11:11:48 +0300
commit2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b (patch)
treef711bc9cab45f4963e4883ef15ff4c54a6cbc12e /arch/x86/lib/usercopy.c
parentb47068b4aa53a57552398e3f60d0ed1918700c2b (diff)
parentee0b089d660021792e4ab4dda191b097ce1e964f (diff)
downloadlinux-2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b.tar.xz
Merge branch 'for-next' into for-linus
Diffstat (limited to 'arch/x86/lib/usercopy.c')
-rw-r--r--arch/x86/lib/usercopy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/lib/usercopy.c b/arch/x86/lib/usercopy.c
index f1bb18617156..24b48af27417 100644
--- a/arch/x86/lib/usercopy.c
+++ b/arch/x86/lib/usercopy.c
@@ -6,6 +6,7 @@
#include <linux/uaccess.h>
#include <linux/export.h>
+#include <linux/instrumented.h>
#include <asm/tlbflush.h>
@@ -44,7 +45,9 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
* called from other contexts.
*/
pagefault_disable();
+ instrument_copy_from_user_before(to, from, n);
ret = raw_copy_from_user(to, from, n);
+ instrument_copy_from_user_after(to, from, n, ret);
pagefault_enable();
return ret;