Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1504363ybk; Thu, 21 May 2020 08:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4l4JqXgDICCjOCdvrjXrg4crUEldq45094pTwZDgSTMLaG5iG/2DkhjmCKysjmFBY4YxC X-Received: by 2002:a50:ec8e:: with SMTP id e14mr8112301edr.105.1590074714087; Thu, 21 May 2020 08:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590074714; cv=none; d=google.com; s=arc-20160816; b=H2YU5dg9fJFiQtvZOGwlbBRyoHjS3ncNNNhBXcBgJRsCN5dGa0af/s2eUWZKvk2axx 0U/KLdVaJI+tmCBny0pLsYCJ63raC5OEnU/Hy/iS+ONTkmIWsYzFwhnl4TCJzEpWcCwH RXvX4euTg+RhhQAz+Oxt+rKRTeNr78FrohX46lgp1WcJ0CcGN/N5459Nngyo4vbf8Q94 kKgI1Clv80pLReBwIrXo/rdsKqJUusVKHM/M8DLDCCYvqMFoAKWGh7qgG26tqNq0Kp0d yO2/cQcm6h+IOa2AS+/X8jiJZmM7+XWJ4ZSGScwMsw6+pEQB03LXn2vju+8W/abWCZsX xDiw== 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 :dkim-signature; bh=FhwjB9eDi0xwZgnRZDImeNjcc9cNIZkOcwQVq4y1nSU=; b=My9C40I9tUDXLJWmBRsodJxac0tD9hlN5JhPl4/bIEG7tHkSGfLbbP3vNKLBMLpE9a lFJIk8aKcKP/XuyjRL7DQrQ8vREZ249U6fGS6rXQQIqsUry0ec5DoRKvBpWKxuLFcxlN 7mBzMFnQTwDL/4r+xGgQdzjjzjdOTt7/yc8leYRrFAGQGnByhflRfYX1R3DLSX2NqtQR ontvoB+tc2vkFQjSIiM8gAYf9STXJE07IgCNPm6try8rcD0bTxjZ0aC8nGsWSCCb6vrs TtNzx1GeAtAkueyyk6SJCpo3jom0vm9eIhPahFD2ydKrDwHreRBxGVlKBTWJPNw0O4cE NtpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=i6l6MGdR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lv2si3311964ejb.651.2020.05.21.08.24.51; Thu, 21 May 2020 08:25:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=i6l6MGdR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730023AbgEUPXQ (ORCPT + 99 others); Thu, 21 May 2020 11:23:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730008AbgEUPXO (ORCPT ); Thu, 21 May 2020 11:23:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77F3CC061A0E; Thu, 21 May 2020 08:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=FhwjB9eDi0xwZgnRZDImeNjcc9cNIZkOcwQVq4y1nSU=; b=i6l6MGdRC6JXPYBg8m9hgS5gXs ZKwD1lvGetzP5DFZyyR4TEX7zeay+toBlWO3Ntu10fSDEs/ncYpf08Lmw1qKfY/EA904OYlQu4FY+ zEY0BV2z16Q+exDeUj4IvpoxQUaEaXXhxbrO+IfuFYgokh7lfwmm2wYzCt6sXtWJDFtQrqz6SAzhF DQ9Hr2akG0qdkzXoJ//hlNTIYX1BxZhHcMLPkJqmc8H6L2pMXo5uiLlPiVUwjYN/4YyfAKZfXJ7Qm ggIrOAcxFsjCuYGgGeIVDiUd8WVZPxBjbVAoYGoi6dg6yRO3qlhvGWsRi4BWueDnVC+ZdDUlziWac DJ6J7/Yg==; Received: from [2001:4bb8:18c:5da7:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbn2K-00042u-Lv; Thu, 21 May 2020 15:23:09 +0000 From: Christoph Hellwig To: x86@kernel.org, Alexei Starovoitov , Daniel Borkmann , Masami Hiramatsu , Linus Torvalds , Andrew Morton Cc: linux-parisc@vger.kernel.org, linux-um@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/23] maccess: remove various unused weak aliases Date: Thu, 21 May 2020 17:22:40 +0200 Message-Id: <20200521152301.2587579-3-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200521152301.2587579-1-hch@lst.de> References: <20200521152301.2587579-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org maccess tends to define lots of underscore prefixed symbols that then have other weak aliases. But except for two cases they are never actually used, so remove them. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 3 --- mm/maccess.c | 19 +++---------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 67f016010aad5..a2c606a403745 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -324,7 +324,6 @@ extern long __probe_kernel_read(void *dst, const void *src, size_t size); * happens, handle that and return -EFAULT. */ extern long probe_user_read(void *dst, const void __user *src, size_t size); -extern long __probe_user_read(void *dst, const void __user *src, size_t size); /* * probe_kernel_write(): safely attempt to write to a location @@ -336,7 +335,6 @@ extern long __probe_user_read(void *dst, const void __user *src, size_t size); * happens, handle that and return -EFAULT. */ extern long notrace probe_kernel_write(void *dst, const void *src, size_t size); -extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size); /* * probe_user_write(): safely attempt to write to a location in user space @@ -348,7 +346,6 @@ extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size * happens, handle that and return -EFAULT. */ extern long notrace probe_user_write(void __user *dst, const void *src, size_t size); -extern long notrace __probe_user_write(void __user *dst, const void *src, size_t size); extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count); extern long strncpy_from_unsafe_strict(char *dst, const void *unsafe_addr, diff --git a/mm/maccess.c b/mm/maccess.c index cf21e604f78cb..4e7f3b6eb05ae 100644 --- a/mm/maccess.c +++ b/mm/maccess.c @@ -79,11 +79,7 @@ EXPORT_SYMBOL_GPL(probe_kernel_read); * Safely read from user address @src to the buffer at @dst. If a kernel fault * happens, handle that and return -EFAULT. */ - -long __weak probe_user_read(void *dst, const void __user *src, size_t size) - __attribute__((alias("__probe_user_read"))); - -long __probe_user_read(void *dst, const void __user *src, size_t size) +long probe_user_read(void *dst, const void __user *src, size_t size) { long ret = -EFAULT; mm_segment_t old_fs = get_fs(); @@ -106,11 +102,7 @@ EXPORT_SYMBOL_GPL(probe_user_read); * Safely write to address @dst from the buffer at @src. If a kernel fault * happens, handle that and return -EFAULT. */ - -long __weak probe_kernel_write(void *dst, const void *src, size_t size) - __attribute__((alias("__probe_kernel_write"))); - -long __probe_kernel_write(void *dst, const void *src, size_t size) +long probe_kernel_write(void *dst, const void *src, size_t size) { long ret; mm_segment_t old_fs = get_fs(); @@ -131,11 +123,7 @@ long __probe_kernel_write(void *dst, const void *src, size_t size) * Safely write to address @dst from the buffer at @src. If a kernel fault * happens, handle that and return -EFAULT. */ - -long __weak probe_user_write(void __user *dst, const void *src, size_t size) - __attribute__((alias("__probe_user_write"))); - -long __probe_user_write(void __user *dst, const void *src, size_t size) +long probe_user_write(void __user *dst, const void *src, size_t size) { long ret = -EFAULT; mm_segment_t old_fs = get_fs(); @@ -171,7 +159,6 @@ long __probe_user_write(void __user *dst, const void *src, size_t size) * probing memory on a user address range where strncpy_from_unsafe_user() is * supposed to be used instead. */ - long __weak strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count) __attribute__((alias("__strncpy_from_unsafe"))); -- 2.26.2