Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp272601ybi; Wed, 29 May 2019 21:07:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv8KmUwcVELNDADfnoCXzkCsPdtcsC1AtVqvyPmF9PH3MzZNC3yOANJcjvzdgXfiqd9+Oh X-Received: by 2002:a65:4786:: with SMTP id e6mr1842397pgs.85.1559189242504; Wed, 29 May 2019 21:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189242; cv=none; d=google.com; s=arc-20160816; b=AB5IvAPLZEwO/eblkEuH0uaTz0PLJOSI8IWyon4QHXROwzeeFx8NDo205u0LSzm44q N6YM3ao2KieUf1urou7xWUF6RBQSJ30FzGeBwFqvEVg4i7zlH7t9Gpf/yZIXdrDuP0u6 5hwxH+Of1uaHGv7pjOLlOFyivoLtydKb/jm/HR4l9J4/tv7fDQuMsvpeKvhmkgBsXz3d TnK+pAu3Ccmb3zpTuFI252QcX5twUYf+7joxgX+lGF9P22DZWw/IgMNZXI4n8PZ39Eu6 SNWwJPIydLcIiqOrUu1FM/aTa0Bo3XXzoO9GnK+u8n4yoVXjaRCmVZyeH5ZMeHzlkhdB pUww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zEVQso+6+ycXswx+j+b4vh9acVeJ0GOx3F8HiABt90E=; b=EgRW7kE0YwVT0mAWl7id3CuUg8B6bUuAS21KMU/RMRqpY/MpzpyRZS/T6sxTJoQGXi NShuCUu+gtuyP2q4TAhTBP+qKgvqK5iY/nNODNykxfU95W+9M/bWLfRv7IQNfZFJVvaz y142bMX8NEFwAz5Bj3wLh5P5WGwhhpgXJaxfwZK3OGL5Ees/Y2eBUI+0RG1G+2Sxd95z ekKl3j9iJBSRcjSPvA5FiPqASqDsFbLlylpHPNdbd8TRuGeTI3aDwtxQdBLRCWnslx1M LpIpIl15CphE7C4sAVXMa2lFj18QAy8ycswurT4w2klsAyzSh+Dn1jcP0vbrmGYrDboV H8Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rnx3H752; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si2190823pjb.0.2019.05.29.21.07.05; Wed, 29 May 2019 21:07:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rnx3H752; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731840AbfE3EEl (ORCPT + 99 others); Thu, 30 May 2019 00:04:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:48858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731276AbfE3DRu (ORCPT ); Wed, 29 May 2019 23:17:50 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 08B3B2472D; Thu, 30 May 2019 03:17:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186270; bh=dCVDXips007izB5sZEkFSjcUty+mk+m6uZJDYn5+XbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rnx3H752W2wD973HP3sBnCKfni1EpPTyU7dI/byW4cZwozskJV/JbA+Uyah+Lz2Kn W9+topTJRqY1Q7zHn5rjUn2lp75wgsjL0IPYuwnsTd7z2Rva155A1Y+f/OGdj7MYn3 3CUTyf/W0/0s5bm1SADxnTAg5oqvQ2ET6aMuWIuQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Borislav Petkov , Josh Poimboeuf , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH 4.19 209/276] x86/uaccess: Fix up the fixup Date: Wed, 29 May 2019 20:06:07 -0700 Message-Id: <20190530030538.201874533@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit b69656fa7ea2f75e47d7bd5b9430359fa46488af ] New tooling got confused about this: arch/x86/lib/memcpy_64.o: warning: objtool: .fixup+0x7: return with UACCESS enabled While the code isn't wrong, it is tedious (if at all possible) to figure out what function a particular chunk of .fixup belongs to. This then confuses the objtool uaccess validation. Instead of returning directly from the .fixup, jump back into the right function. Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/lib/memcpy_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/memcpy_64.S b/arch/x86/lib/memcpy_64.S index 3b24dc05251c7..9d05572370edc 100644 --- a/arch/x86/lib/memcpy_64.S +++ b/arch/x86/lib/memcpy_64.S @@ -257,6 +257,7 @@ ENTRY(__memcpy_mcsafe) /* Copy successful. Return zero */ .L_done_memcpy_trap: xorl %eax, %eax +.L_done: ret ENDPROC(__memcpy_mcsafe) EXPORT_SYMBOL_GPL(__memcpy_mcsafe) @@ -273,7 +274,7 @@ EXPORT_SYMBOL_GPL(__memcpy_mcsafe) addl %edx, %ecx .E_trailing_bytes: mov %ecx, %eax - ret + jmp .L_done /* * For write fault handling, given the destination is unaligned, -- 2.20.1