Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4005050ybb; Mon, 23 Mar 2020 11:40:22 -0700 (PDT) X-Google-Smtp-Source: ADFU+vugTRqTKM0NaR1wZITUEqjYN3qAriy6V0zv4R8eebHdNR/PgiZTYwvSZPcpZWYVqAExTB+S X-Received: by 2002:a05:6830:1da4:: with SMTP id z4mr2733034oti.5.1584988822522; Mon, 23 Mar 2020 11:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584988822; cv=none; d=google.com; s=arc-20160816; b=hEcWl5CLRIBwOpVEG0FrqeF0pNEH0nNUDm9NqF5klldgibhLyKu0jdrIq7wW6UqXLS dc6L70DU8fFrgT3g5OOK7hWbrfcVxilMJVOgkJR9tH1ulKtQ+Q3TIZ6elX6qM4T+0Vow 9lF4ur2Yt/fK0izwNhmfZKdcONKn36OyjUR08NsQtAkEgzjM03ensH4nlkdYSPV06Txj Dn4vmT5ghpxJlZVO16u+rDwVcmwQd6zeQWfN/pAML1huc0AgHtj/dkJOO5nMCdp9b3aS hDkFNx2PCLydfD9ljO/Gk2ZLsnHnuBJNubwKsS7CLkzmKo873tLT4c110mqgSRHQzkzP x1Iw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=p3TSXrHurYnJud60M1fSnzJIYfwroFGaa/cHbz0yKNY=; b=hhk4hDqQf7snYDnVeRMfP4yFfCXil39seJKMR7QPoLrvR+j+kHUGngutzWC62X5VBg ge+59w0db3RUecIZVaUGta1xnGosFznJNnYUnzFSoExpVtpJN/Ct9XVQ0QTExvupmfpw HsVDxbpuv4tBUt0npowDLTipC5ZUSpYp6NZoDvWBg8T1g4ydlRZExIN59r73vmQD3VaG owkX6V/Prd/jDSCZCmjzy9S/X2W8NFNRrF3+1N1r15MxoWJrBrXvc2wmr5Au5sIHxMUR T273nca/wNWgfT4vC8ursLiVCilSfGKILHzVwS7VDvLtlg3zcNdcA5hqfVNMBYFGGtKD X/yw== ARC-Authentication-Results: i=1; mx.google.com; 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 u23si4391520otg.167.2020.03.23.11.40.09; Mon, 23 Mar 2020 11:40: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; 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 S1728090AbgCWSjZ (ORCPT + 99 others); Mon, 23 Mar 2020 14:39:25 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:46696 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgCWSiX (ORCPT ); Mon, 23 Mar 2020 14:38:23 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGRxt-00135d-9u; Mon, 23 Mar 2020 18:38:21 +0000 From: Al Viro To: Linus Torvalds Cc: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH 08/22] x86: kill get_user_{try,catch,ex} Date: Mon, 23 Mar 2020 18:38:05 +0000 Message-Id: <20200323183819.250124-8-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200323183819.250124-1-viro@ZenIV.linux.org.uk> References: <20200323183620.GD23230@ZenIV.linux.org.uk> <20200323183819.250124-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro no users left Signed-off-by: Al Viro --- arch/x86/include/asm/uaccess.h | 54 ------------------------------------------ 1 file changed, 54 deletions(-) diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index 1cfa33b94a1a..4dc5accdd826 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -335,12 +335,9 @@ do { \ "i" (errret), "0" (retval)); \ }) -#define __get_user_asm_ex_u64(x, ptr) (x) = __get_user_bad() #else #define __get_user_asm_u64(x, ptr, retval, errret) \ __get_user_asm(x, ptr, retval, "q", "", "=r", errret) -#define __get_user_asm_ex_u64(x, ptr) \ - __get_user_asm_ex(x, ptr, "q", "", "=r") #endif #define __get_user_size(x, ptr, size, retval, errret) \ @@ -378,41 +375,6 @@ do { \ : "=r" (err), ltype(x) \ : "m" (__m(addr)), "i" (errret), "0" (err)) -/* - * This doesn't do __uaccess_begin/end - the exception handling - * around it must do that. - */ -#define __get_user_size_ex(x, ptr, size) \ -do { \ - __chk_user_ptr(ptr); \ - switch (size) { \ - case 1: \ - __get_user_asm_ex(x, ptr, "b", "b", "=q"); \ - break; \ - case 2: \ - __get_user_asm_ex(x, ptr, "w", "w", "=r"); \ - break; \ - case 4: \ - __get_user_asm_ex(x, ptr, "l", "k", "=r"); \ - break; \ - case 8: \ - __get_user_asm_ex_u64(x, ptr); \ - break; \ - default: \ - (x) = __get_user_bad(); \ - } \ -} while (0) - -#define __get_user_asm_ex(x, addr, itype, rtype, ltype) \ - asm volatile("1: mov"itype" %1,%"rtype"0\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3:xor"itype" %"rtype"0,%"rtype"0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - _ASM_EXTABLE_EX(1b, 3b) \ - : ltype(x) : "m" (__m(addr))) - #define __put_user_nocheck(x, ptr, size) \ ({ \ __label__ __pu_label; \ @@ -540,22 +502,6 @@ struct __large_struct { unsigned long buf[100]; }; #define __put_user(x, ptr) \ __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr))) -/* - * {get|put}_user_try and catch - * - * get_user_try { - * get_user_ex(...); - * } get_user_catch(err) - */ -#define get_user_try uaccess_try_nospec -#define get_user_catch(err) uaccess_catch(err) - -#define get_user_ex(x, ptr) do { \ - unsigned long __gue_val; \ - __get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \ - (x) = (__force __typeof__(*(ptr)))__gue_val; \ -} while (0) - #define put_user_try uaccess_try #define put_user_catch(err) uaccess_catch(err) -- 2.11.0