[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeojMwHh8O73bw23@google.com>
Date: Thu, 7 Mar 2024 20:27:45 +0000
From: Yosry Ahmed <yosryahmed@...gle.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...el.com>,
Peter Zijlstra <peterz@...radead.org>, Andy Lutomirski <luto@...nel.org>, x86@...nel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/3] x86/mm: cleanup prctl_enable_tagged_addr()
nr_bits error checking
On Thu, Mar 07, 2024 at 07:31:44PM +0200, Kirill A. Shutemov wrote:
> On Thu, Mar 07, 2024 at 01:39:16PM +0000, Yosry Ahmed wrote:
> > In prctl_enable_tagged_addr(), we check that nr_bits is in the correct
> > range, but we do so in a twisted if/else block where the correct case is
> > sandwiched between two error cases doing exactly the same thing.
> >
> > Simplify the if condition and pull the correct case outside with the
> > rest of the success code path.
>
> I'm okay either way.
>
> I structured the code this way as I had separate patch that adds also
> LAM_U48. But it is unlikely to get upstreamed.
I see, thanks for the context. For now, I think this makes the code a
little bit clearer.
Powered by blists - more mailing lists