From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D81EC433DF for ; Tue, 9 Jun 2020 04:34:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C441D20820 for ; Tue, 9 Jun 2020 04:34:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="gZmw65p6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C441D20820 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8CCE26B00BD; Tue, 9 Jun 2020 00:34:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 87D758D0011; Tue, 9 Jun 2020 00:34:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 792606B00BF; Tue, 9 Jun 2020 00:34:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 5F9716B00BD for ; Tue, 9 Jun 2020 00:34:00 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1A37E181ABEA4 for ; Tue, 9 Jun 2020 04:34:00 +0000 (UTC) X-FDA: 76908405840.03.burn20_3b0ab9026dbf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id E471C87C85 for ; Tue, 9 Jun 2020 04:33:59 +0000 (UTC) X-HE-Tag: burn20_3b0ab9026dbf X-Filterd-Recvd-Size: 3379 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Jun 2020 04:33:59 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 8D586207F9; Tue, 9 Jun 2020 04:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591677239; bh=ZbnX8ulfbtGabTJvIs55DWtIOrVesyfwCC2zE9VyDW4=; h=Date:From:To:Subject:In-Reply-To:From; b=gZmw65p63iGiIR+SKN5NMU/BuY0LboS0xTNWrBgsUpuYCF8otSdXRuS2CnNtRPnuX MK6viLEhXri93dj8fusPA+rB+OUTeMn8aDwQvBQ7jW8+Q/QeZ1CDzBW8p6FW/uirPb VsWNnSUVeE4JZ8rNohsYzDVdJ0cj9oxBapFDPwU8= Date: Mon, 08 Jun 2020 21:33:58 -0700 From: Andrew Morton To: akpm@linux-foundation.org, ast@kernel.org, daniel@iogearbox.net, hch@lst.de, hpa@zytor.com, linux-mm@kvack.org, mhiramat@kernel.org, mingo@elte.hu, mm-commits@vger.kernel.org, sfr@canb.auug.org.au, tglx@linutronix.de, torvalds@linux-foundation.org Subject: [patch 72/93] maccess: unexport probe_kernel_write() Message-ID: <20200609043358.kHEutRZ0V%akpm@linux-foundation.org> In-Reply-To: <20200608212922.5b7fa74ca3f4e2444441b7f9@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Queue-Id: E471C87C85 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Christoph Hellwig Subject: maccess: unexport probe_kernel_write() Patch series "clean up and streamline probe_kernel_* and friends", v4. This series start cleaning up the safe kernel and user memory probing helpers in mm/maccess.c, and then allows architectures to implement the kernel probing without overriding the address space limit and temporarily allowing access to user memory. It then switches x86 over to this new mechanism by reusing the unsafe_* uaccess logic. This version also switches to the saner copy_{from,to}_kernel_nofault naming suggested by Linus. I kept the x86 helpers as-is without calling unsage_{get,put}_user as that avoids a number of hard to trace casts, and it will still work with the asm-goto based version easily. This patch (of 20): probe_kernel_write() is not used by any modular code. [sfr@canb.auug.org.au: turns out that probe_user_write is used in modular code] Link: http://lkml.kernel.org/r/20200602195741.4faaa348@canb.auug.org.au Link: http://lkml.kernel.org/r/20200521152301.2587579-1-hch@lst.de Link: http://lkml.kernel.org/r/20200521152301.2587579-2-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Stephen Rothwell Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Masami Hiramatsu Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- mm/maccess.c | 1 - 1 file changed, 1 deletion(-) --- a/mm/maccess.c~maccess-unexport-probe_kernel_write-and-probe_user_write +++ a/mm/maccess.c @@ -121,7 +121,6 @@ long __probe_kernel_write(void *dst, con return ret; } -EXPORT_SYMBOL_GPL(probe_kernel_write); /** * probe_user_write(): safely attempt to write to a user-space location _