From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9035165EFC for ; Fri, 18 Oct 2024 15:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729266915; cv=none; b=ausp52waYSy8EhmgeZalSgIgSEUjbZOd4NorVee8l2AEprne+GMcaqRGqH9xbAgW1ukn5oejnM8kJkGiOQyzwNRd2HsFL6K7vBkn2K/R4ZfZoiBapF6DqAfubd9atWM1dOZf+BkAo3ecXS1VRLUm68Y+pHTBrQtTsmbPzOFuIyA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729266915; c=relaxed/simple; bh=htHCVl3dLq19V8wPIxFnR3ZwPaftOj2Ne5i0C7AnREY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IDeGvjLf+9C5E02tEvQ7IEPeMnVWP07Kmta5exFcimBVOpBTCDbkDD7pNuCUxuR9b4B+HP4CQIvg9BWzhHoSGSv5IBh54CQSMj5tg7SZB5/AcbOtoqm7FrsA7b5iTkw1RcWEZlcIj1LdRpfN7w9rnFHuc9L/tO0XpnhIiFr4vjM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CgeeZh71; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CgeeZh71" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C71F2C4CEC3; Fri, 18 Oct 2024 15:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729266915; bh=htHCVl3dLq19V8wPIxFnR3ZwPaftOj2Ne5i0C7AnREY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CgeeZh71kHHVa+cdIml4FAaHnIyZWEzgZRfuxPxxCs+RFgod+LNwbqICcNdi7yKjG QG1DB6W5hM6ZVIvhWravyOF6IJevy+fGh8ntBge476UHqWIqXRDvOPzREa0THkkj74 Tc1xt0ykVx00t7JDcJObK37GMAXrH6vxy6QQB7M6CLaveixPdN5FuLclDcwS9RLUYG ZPlR65HSH+C7UTrMN/lgWv8zpB2FXtMTM+LdBKsUJyWILobAbQNZoc3LeDI8+RljKY oT1t72OoDDbv7tLUqEuj/7Vqg8AltGdVRJc2brKLDUmuMc0dPgOcJR5Gtplahxz4FA QTr93f8rHUetg== Date: Fri, 18 Oct 2024 08:55:13 -0700 From: Josh Poimboeuf To: "Kirill A . Shutemov" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Pawan Gupta , Waiman Long , Dave Hansen , Ingo Molnar , Linus Torvalds , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Andrew Cooper , Mark Rutland Subject: Re: [PATCH v2 3/6] x86/uaccess: Rearrange putuser.S Message-ID: <20241018155513.zaufdhi7p5mrz2bp@treble> References: <7818233ecd726628a3eb9cbb5ed0ba831e69af4b.1729201904.git.jpoimboe@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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