Lines Matching +full:reset +full:- +full:synchronized
1 // SPDX-License-Identifier: GPL-2.0-only
86 * tagged, return non-zero to avoid KSM merging. If only one of the in memcmp_pages()
171 * (per ARM DDI 0487F.c table D13-1). in mte_check_tfsr_el1()
193 unsigned long sctlr = task->thread.sctlr_user; in mte_update_sctlr_user()
194 unsigned long mte_ctrl = task->thread.mte_ctrl; in mte_update_sctlr_user()
215 task->thread.sctlr_user = sctlr; in mte_update_sctlr_user()
221 * SYS_GCR_EL1 will be set to current->thread.mte_ctrl value by in mte_update_gcr_excl()
228 ((task->thread.mte_ctrl >> MTE_CTRL_GCR_USER_EXCL_SHIFT) & in mte_update_gcr_excl()
241 BUG_ON(nr_inst != 1); /* Branch -> NOP */ in kasan_hw_tags_enable()
257 /* disable tag checking and reset tag generation mask */ in mte_thread_init_user()
277 * are synchronized before this point. in mte_thread_switch()
291 * CPU power-up. in mte_cpu_setup()
309 * RGSR_EL1.SEED must be non-zero for IRG to produce in mte_cpu_setup()
310 * pseudorandom numbers. As RGSR_EL1 is UNKNOWN out of reset, we in mte_cpu_setup()
333 * to TFSR_EL1 are synchronized before we report the state. in mte_suspend_enter()
374 task->thread.mte_ctrl = mte_ctrl; in set_mte_ctrl()
379 update_sctlr_el1(task->thread.sctlr_user); in set_mte_ctrl()
389 u64 mte_ctrl = task->thread.mte_ctrl; in get_mte_ctrl()
413 void __user *buf = kiov->iov_base; in __access_remote_tags()
414 size_t len = kiov->iov_len; in __access_remote_tags()
419 return -EFAULT; in __access_remote_tags()
422 return -EIO; in __access_remote_tags()
444 if (!(vma->vm_flags & VM_MTE)) { in __access_remote_tags()
445 err = -EOPNOTSUPP; in __access_remote_tags()
458 tags = min(len, (PAGE_SIZE - offset) / MTE_GRANULE_SIZE); in __access_remote_tags()
473 len -= tags; in __access_remote_tags()
480 kiov->iov_len = buf - kiov->iov_base; in __access_remote_tags()
481 if (!kiov->iov_len) { in __access_remote_tags()
484 return -EIO; in __access_remote_tags()
486 return -EFAULT; in __access_remote_tags()
504 return -EPERM; in access_remote_tags()
506 if (!tsk->ptrace || (current != tsk->parent) || in access_remote_tags()
508 !ptracer_capable(tsk, mm->user_ns))) { in access_remote_tags()
510 return -EPERM; in access_remote_tags()
528 return -EIO; in mte_ptrace_copy_tags()
530 if (get_user(kiov.iov_base, &uiov->iov_base) || in mte_ptrace_copy_tags()
531 get_user(kiov.iov_len, &uiov->iov_len)) in mte_ptrace_copy_tags()
532 return -EFAULT; in mte_ptrace_copy_tags()
542 ret = put_user(kiov.iov_len, &uiov->iov_len); in mte_ptrace_copy_tags()
550 switch (per_cpu(mte_tcf_preferred, dev->id)) { in mte_tcf_preferred_show()
575 return -EINVAL; in mte_tcf_preferred_store()
578 per_cpu(mte_tcf_preferred, dev->id) = tcf; in mte_tcf_preferred_store()
626 return end - uaddr; in mte_probe_user_range()