[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877cd27mqa.ffs@tglx>
Date: Tue, 30 Jul 2024 20:34:21 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: "Alexey Gladkov (Intel)" <legion@...nel.org>,
linux-kernel@...r.kernel.org, linux-coco@...ts.linux.dev
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave
Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>, Andrew Morton
<akpm@...ux-foundation.org>, Yuan Yao <yuan.yao@...el.com>, Geert
Uytterhoeven <geert@...ux-m68k.org>, Yuntao Wang <ytcoode@...il.com>, Kai
Huang <kai.huang@...el.com>, Baoquan He <bhe@...hat.com>, Oleg Nesterov
<oleg@...hat.com>, cho@...rosoft.com, decui@...rosoft.com,
John.Starks@...rosoft.com
Subject: Re: [PATCH v1 2/4] x86/tdx: Add validation of userspace MMIO
instructions
On Tue, Jul 30 2024 at 19:35, Alexey Gladkov wrote:
>
> + vaddr = (unsigned long)insn_get_addr_ref(&insn, regs);
> +
> + if (user_mode(regs)) {
> + if (mmap_read_lock_killable(current->mm))
> + return -EINTR;
> +
> + ret = valid_vaddr(ve, mmio, size, vaddr);
> + if (ret)
> + goto fault;
fault is really the wrong name for the label because it's the general
return point of the function. 'out' or 'unlock' perhaps?
Thanks,
tglx
Powered by blists - more mailing lists