[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241018155513.zaufdhi7p5mrz2bp@treble>
Date: Fri, 18 Oct 2024 08:55:13 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: "Kirill A . Shutemov" <kirill@...temov.name>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Waiman Long <longman@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Michael Ellerman <mpe@...erman.id.au>,
linuxppc-dev@...ts.ozlabs.org,
Andrew Cooper <andrew.cooper3@...rix.com>,
Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH v2 3/6] x86/uaccess: Rearrange putuser.S
On Fri, Oct 18, 2024 at 11:51:06AM +0300, Kirill A . Shutemov wrote:
> On Thu, Oct 17, 2024 at 02:55:22PM -0700, Josh Poimboeuf wrote:
> > SYM_FUNC_START(__put_user_2)
> > check_range size=2
> > ASM_STAC
> > -3: movw %ax,(%_ASM_CX)
> > +2: movw %ax,(%_ASM_CX)
> > xor %ecx,%ecx
> > ASM_CLAC
> > RET
> > SYM_FUNC_END(__put_user_2)
> > EXPORT_SYMBOL(__put_user_2)
>
> This patch provides an opportunity to give these labels more meaningful
> names, so that future rearrangements do not require as much boilerplate.
Yeah, I can add a patch like Linus' patch to getuser.S which
encapsulates it all in a macro:
.macro UACCESS op src dst
1: \op \src,\dst
_ASM_EXTABLE_UA(1b, __get_user_handle_exception)
.endm
.text
SYM_FUNC_START(__get_user_1)
check_range size=1
ASM_STAC
UACCESS movzbl (%_ASM_AX),%edx
xor %eax,%eax
ASM_CLAC
RET
SYM_FUNC_END(__get_user_1)
EXPORT_SYMBOL(__get_user_1)
--
Josh
Powered by blists - more mailing lists