From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZ2ER-0001DX-FN for linux-um@lists.infradead.org; Thu, 14 May 2020 01:00:16 +0000 Date: Thu, 14 May 2020 10:00:09 +0900 From: Masami Hiramatsu 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> Mime-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Linus Torvalds Cc: Daniel Borkmann , linux-parisc@vger.kernel.org, Netdev , the arch/x86 maintainers , linux-um , Alexei Starovoitov , Linux Kernel Mailing List , Linux-MM , bpf@vger.kernel.org, Andrew Morton , Christoph Hellwig 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 _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um