|
@@ -69,6 +69,14 @@ extern int __put_user_bad(void);
|
|
static inline void set_fs(mm_segment_t fs)
|
|
static inline void set_fs(mm_segment_t fs)
|
|
{
|
|
{
|
|
current_thread_info()->addr_limit = fs;
|
|
current_thread_info()->addr_limit = fs;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Prevent a mispredicted conditional call to set_fs from forwarding
|
|
|
|
+ * the wrong address limit to access_ok under speculation.
|
|
|
|
+ */
|
|
|
|
+ dsb(nsh);
|
|
|
|
+ isb();
|
|
|
|
+
|
|
modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER);
|
|
modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER);
|
|
}
|
|
}
|
|
|
|
|