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=-1.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 E74EBC433E0 for ; Thu, 14 May 2020 01:00:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E1CD22065C for ; Thu, 14 May 2020 01:00:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="eMXyaK/b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1CD22065C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 44F3580044; Wed, 13 May 2020 21:00:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FFFA8003E; Wed, 13 May 2020 21:00:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EE2480044; Wed, 13 May 2020 21:00:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 16BCB8003E for ; Wed, 13 May 2020 21:00:16 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D4B6B4820 for ; Thu, 14 May 2020 01:00:15 +0000 (UTC) X-FDA: 76813518390.17.feet06_24129d702935 X-HE-Tag: feet06_24129d702935 X-Filterd-Recvd-Size: 3410 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 May 2020 01:00:15 +0000 (UTC) Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 E5F482054F; Thu, 14 May 2020 01:00:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589418014; bh=iL3qRo6PKMlX7MXjMuhMdIo6UsuawSg8IZnaTVQPWcw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eMXyaK/bX8VY/yTLe5XB8JtMJrtcjjev1fGQABBIMNzXe1l1nVaonllA6Js7jUFE/ roA4DNirFqPNV8zYvxpE5SZpnZrPScPhYauQnT6eTn3ErV59izLzTc8zoDjhqVpUBV xIAKU4KFe9w7hOY+jhok+DYEHeqUtAEj9JByg/IQ= Date: Thu, 14 May 2020 10:00:09 +0900 From: Masami Hiramatsu To: Linus Torvalds Cc: Daniel Borkmann , Christoph Hellwig , "the arch/x86 maintainers" , Alexei Starovoitov , Andrew Morton , linux-parisc@vger.kernel.org, linux-um , Netdev , bpf@vger.kernel.org, Linux-MM , Linux Kernel Mailing List Subject: Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe Message-Id: <20200514100009.a8e6aa001f0ace5553c7904f@kernel.org> In-Reply-To: References: <20200513160038.2482415-1-hch@lst.de> <20200513160038.2482415-12-hch@lst.de> <20200513192804.GA30751@lst.de> <0c1a7066-b269-9695-b94a-bb5f4f20ebd8@iogearbox.net> <20200514082054.f817721ce196f134e6820644@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Wed, 13 May 2020 16:59:40 -0700 Linus Torvalds wrote: > On Wed, May 13, 2020 at 4:21 PM Masami Hiramatsu wrote: > > > > > > For trace_kprobe.c current order (kernel -> user fallback) is preferred > > because it has another function dedicated for user memory. > > Well, then it should just use the "strict" kernel-only one for the > non-user memory. > > But yes, if there are legacy interfaces, then we might want to say > "these continue to work for the legacy case on platforms where we can > tell which kind of pointer it is from the bit pattern". Yes, that was why I changed my mind and send reviewed-by last time. https://lore.kernel.org/bpf/20200511142716.f1ff6fc55220012982c47fec@kernel.org/ > But we should likely at least disallow it entirely on platforms where > we really can't - or pick one hardcoded choice. On sparc, you really > _have_ to specify one or the other. OK. BTW, is there any way to detect the kernel/user space overlap on memory layout statically? If there, I can do it. (I don't like "if (CONFIG_X86)" thing....) Or, maybe we need CONFIG_ARCH_OVERLAP_ADDRESS_SPACE? Thank you, -- Masami Hiramatsu