Lines Matching +full:zero +full:- +full:initialised
1 // SPDX-License-Identifier: GPL-2.0-only
43 /* if PG_mte_tagged is set, tags have already been initialised */ in mte_sync_tags()
45 if (!test_and_set_bit(PG_mte_tagged, &page->flags)) in mte_sync_tags()
64 * tagged, return non-zero to avoid KSM merging. If only one of the in memcmp_pages()
65 * pages is tagged, set_pte_at() may zero or change the tags of the in memcmp_pages()
68 if (test_bit(PG_mte_tagged, &page1->flags) || in memcmp_pages()
69 test_bit(PG_mte_tagged, &page2->flags)) in memcmp_pages()
85 * mte_thread_switch() checks current->thread.sctlr_tcf0 as an in set_sctlr_el1_tcf0()
90 current->thread.sctlr_tcf0 = tcf0; in set_sctlr_el1_tcf0()
110 current->thread.gcr_user_incl = incl; in set_gcr_el1_excl()
135 if (current->thread.sctlr_tcf0 != next->thread.sctlr_tcf0) in mte_thread_switch()
136 update_sctlr_el1_tcf0(next->thread.sctlr_tcf0); in mte_thread_switch()
137 update_gcr_el1_excl(next->thread.gcr_user_incl); in mte_thread_switch()
145 update_gcr_el1_excl(current->thread.gcr_user_incl); in mte_suspend_exit()
167 return -EINVAL; in set_mte_ctrl()
171 task->thread.sctlr_tcf0 = tcf0; in set_mte_ctrl()
172 task->thread.gcr_user_incl = gcr_incl; in set_mte_ctrl()
188 ret = task->thread.gcr_user_incl << PR_MTE_TAG_SHIFT; in get_mte_ctrl()
190 switch (task->thread.sctlr_tcf0) { in get_mte_ctrl()
213 void __user *buf = kiov->iov_base; in __access_remote_tags()
214 size_t len = kiov->iov_len; in __access_remote_tags()
219 return -EFAULT; in __access_remote_tags()
222 return -EIO; in __access_remote_tags()
241 if (!test_bit(PG_mte_tagged, &page->flags)) { in __access_remote_tags()
242 ret = -EOPNOTSUPP; in __access_remote_tags()
249 tags = min(len, (PAGE_SIZE - offset) / MTE_GRANULE_SIZE); in __access_remote_tags()
264 len -= tags; in __access_remote_tags()
271 kiov->iov_len = buf - kiov->iov_base; in __access_remote_tags()
272 if (!kiov->iov_len) { in __access_remote_tags()
275 return -EIO; in __access_remote_tags()
277 return -EFAULT; in __access_remote_tags()
295 return -EPERM; in access_remote_tags()
297 if (!tsk->ptrace || (current != tsk->parent) || in access_remote_tags()
299 !ptracer_capable(tsk, mm->user_ns))) { in access_remote_tags()
301 return -EPERM; in access_remote_tags()
319 return -EIO; in mte_ptrace_copy_tags()
321 if (get_user(kiov.iov_base, &uiov->iov_base) || in mte_ptrace_copy_tags()
322 get_user(kiov.iov_len, &uiov->iov_len)) in mte_ptrace_copy_tags()
323 return -EFAULT; in mte_ptrace_copy_tags()
333 ret = put_user(kiov.iov_len, &uiov->iov_len); in mte_ptrace_copy_tags()