[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+b=+DOuL2tR_q2F608xXms-MwWLBsz_+PtVojvQj98rcA@mail.gmail.com>
Date: Mon, 3 Apr 2023 15:55:43 +0200
From: Dmitry Vyukov <dvyukov@...gle.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
Kostya Serebryany <kcc@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Taras Madan <tarasmadan@...gle.com>,
"H . J . Lu" <hjl.tools@...il.com>,
Andi Kleen <ak@...ux.intel.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
Bharata B Rao <bharata@....com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Ashok Raj <ashok.raj@...el.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] x86/mm/iommu/sva: Fix error code for LAM enabling
failure due to SVA
On Mon, 3 Apr 2023 at 13:10, Kirill A. Shutemov
<kirill.shutemov@...ux.intel.com> wrote:
>
> Normally, LAM and SVA are mutually exclusive. LAM enabling will fail if
> SVA is already in use.
>
> Correct error code for the failure. EINTR is nonsensical there.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Fixes: 23e5d9ec2bab ("x86/mm/iommu/sva: Make LAM and SVA mutually exclusive")
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
Reviewed-by: Dmitry Vyukov <dvyukov@...gle.com>
> ---
> arch/x86/kernel/process_64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
> index 74c7e84a94d8..c7dfd727c9ec 100644
> --- a/arch/x86/kernel/process_64.c
> +++ b/arch/x86/kernel/process_64.c
> @@ -760,7 +760,7 @@ static int prctl_enable_tagged_addr(struct mm_struct *mm, unsigned long nr_bits)
>
> if (mm_valid_pasid(mm) &&
> !test_bit(MM_CONTEXT_FORCE_TAGGED_SVA, &mm->context.flags))
> - return -EINTR;
> + return -EINVAL;
>
> if (mmap_write_lock_killable(mm))
> return -EINTR;
> --
> 2.39.2
>
Powered by blists - more mailing lists