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=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 8D8F4C4724C for ; Wed, 6 May 2020 06:22:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 541C02082E for ; Wed, 6 May 2020 06:22:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="oWvEfbUn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 541C02082E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 07DF58E000D; Wed, 6 May 2020 02:22:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 007248E0003; Wed, 6 May 2020 02:22:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E12598E000D; Wed, 6 May 2020 02:22:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id C777B8E0003 for ; Wed, 6 May 2020 02:22:52 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7EEEF907A for ; Wed, 6 May 2020 06:22:52 +0000 (UTC) X-FDA: 76785300984.15.trick36_19110f384ac3b X-HE-Tag: trick36_19110f384ac3b X-Filterd-Recvd-Size: 4390 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 6 May 2020 06:22:52 +0000 (UTC) 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=Ism2pGSU5WX+kUcuOyuDphkif76JmaDpJJbD5Qn0Unw=; b=oWvEfbUnPltf7xRcMQ+nlweVoI KSmHiWsNNboxH9dPYh3gGa2Egw9v08GsiPpXlrGB8RymBTSvySy8WxrHhxnSz5t31KbJllBL93Zb+ ROXyRz3m8oLC7Dv3OfUu4D6B56P+PkLP8ZwySHDeJ4GqJMyiRCo4gMO+8RDp4gn7zZjyhXga02ORb 6gg3Be7cUNmoulvxSPoQQ42CdKj3fL0qxit+XPp3pbkNx0g1nu2lJIm9S55MEo5eJ5yR0Tjl6oLM7 vycTG08U42Vrl9XGU9mQQT/hUUps4khRpDi8MjK0NzwsAkyqXBFVwGXxsmPBUGHZHolZlNUAAxFyu Q/afGyyQ==; Received: from [2001:4bb8:191:66b6:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWDSD-0006g6-MF; Wed, 06 May 2020 06:22:50 +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 08/15] maccess: rename strnlen_unsafe_user to strnlen_user_unsafe Date: Wed, 6 May 2020 08:22:16 +0200 Message-Id: <20200506062223.30032-9-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200506062223.30032-1-hch@lst.de> References: <20200506062223.30032-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Content-Transfer-Encoding: quoted-printable 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: This matches the convention of always having _unsafe as a suffix, as well as match the naming of strncpy_from_user_unsafe. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 2 +- kernel/trace/trace_kprobe.c | 2 +- mm/maccess.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 221d703480b6e..77909cafde5a8 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -315,7 +315,7 @@ extern long strncpy_from_kernel_unsafe(char *dst, con= st void *unsafe_addr, extern long __strncpy_from_unsafe(char *dst, const void *unsafe_addr, lo= ng count); extern long strncpy_from_user_unsafe(char *dst, const void __user *unsaf= e_addr, long count); -extern long strnlen_unsafe_user(const void __user *unsafe_addr, long cou= nt); +extern long strnlen_user_unsafe(const void __user *unsafe_addr, long cou= nt); =20 /** * probe_kernel_address(): safely attempt to read from a location diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 67ed9655afc51..a7f43c7ec9880 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -1215,7 +1215,7 @@ fetch_store_strlen_user(unsigned long addr) { const void __user *uaddr =3D (__force const void __user *)addr; =20 - return strnlen_unsafe_user(uaddr, MAX_STRING_SIZE); + return strnlen_user_unsafe(uaddr, MAX_STRING_SIZE); } =20 /* diff --git a/mm/maccess.c b/mm/maccess.c index 683b70518a896..95f2bf97e5ad7 100644 --- a/mm/maccess.c +++ b/mm/maccess.c @@ -258,7 +258,7 @@ long strncpy_from_user_unsafe(char *dst, const void _= _user *unsafe_addr, } =20 /** - * strnlen_unsafe_user: - Get the size of a user string INCLUDING final = NUL. + * strnlen_user_unsafe: - Get the size of a user string INCLUDING final = NUL. * @unsafe_addr: The string to measure. * @count: Maximum count (including NUL) * @@ -273,7 +273,7 @@ long strncpy_from_user_unsafe(char *dst, const void _= _user *unsafe_addr, * Unlike strnlen_user, this can be used from IRQ handler etc. because * it disables pagefaults. */ -long strnlen_unsafe_user(const void __user *unsafe_addr, long count) +long strnlen_user_unsafe(const void __user *unsafe_addr, long count) { mm_segment_t old_fs =3D get_fs(); int ret; --=20 2.26.2