Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp915452ybk; Wed, 13 May 2020 17:02:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjoCtcQs8i3Vjtl/YluQUfcpOex4FiGH/UCx1OxSS06mB0nXXXoVoEvWcDw/u11cmzwJWP X-Received: by 2002:a05:6402:204e:: with SMTP id bc14mr1873078edb.199.1589414572325; Wed, 13 May 2020 17:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589414572; cv=none; d=google.com; s=arc-20160816; b=P1jUSSJIh5D78ZOiruRgjt/4i3suOS1bxc0gvBjT4PqhfpLfYQg2eUBsORRvnqjxXO /Re1pIbzus39EGVanEQsv+JwKTd1nPxbseNhB77pTrtDy3hjlMImnYMX65qee/60BqsT DjLswdWIFot/CHO2WKqmJHWU5oDcw78HKN3KjUKkrDQSDkiyJh46MmEQ1DHkh4bhFwvk MGDd8ktNH4qV3gxyM7Lz2jK1vEaGXfDNRTXN9X7knbiVgwxKC+Nf2EK+Rb18wZkjz0y7 J+wARlkVP/fB9dDMshDpYCN9hTRVmZSpnCgcZ8LdBkJ2aL2PhSn7PTS0KUGdEtOQur9t gCGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fasYih196bvKUHb0YCxHna3fp2u2qNy7HWnYHVsQ+sQ=; b=T5FQN50JxImSdY4tbBvccc03VZ3qH1PQ+F3X50VUPZUun8yVOqNE4AMFItItyqo8Gy DXSYfAKUp0LOscGQQb4gs23LwwIPzwowZNlxNyT5MbajF2l4/1FLZ8HTXdoS5y808kaY 8E0BS6krCcbmulhUEPWB8fasbuat5YQH9+N2UhWbX/ftgXgKE4IynpyJMgFqTfTOSjvt 1I6vvojS+GhzEZji5J7WbkFO4Uu7tewBfnIHmM3Ebp5rrFVXGp73Rrfzie4gaKV2jTzY 7iTIo2BYiUdquj/QzOKnW3ODpY+NBcb0vw4PWSzzisgthrjfznigokhcIYNTbsGSTklF BpJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fD3hyHvK; 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 y27si834041ejj.412.2020.05.13.17.02.29; Wed, 13 May 2020 17:02:52 -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=pass header.i=@linux-foundation.org header.s=google header.b=fD3hyHvK; 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 S1732867AbgENAAD (ORCPT + 99 others); Wed, 13 May 2020 20:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1732861AbgENAAB (ORCPT ); Wed, 13 May 2020 20:00:01 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36D5AC061A0C for ; Wed, 13 May 2020 17:00:01 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id c21so1048178lfb.3 for ; Wed, 13 May 2020 17:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fasYih196bvKUHb0YCxHna3fp2u2qNy7HWnYHVsQ+sQ=; b=fD3hyHvKHx/67q1VTFKCR74zDcE6394aAhGXhl0a0C48TMMb4AnhPQvs7IdErH6CX2 um+ec95QL1F0EfXLmER3SmoJ0T+gygc4SnxysABRELnzBjVWudgYOLaUmLBf8bjna0/G B5XXX5vTTIkGXj8ZYK86YltWbiai+htzLW22s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fasYih196bvKUHb0YCxHna3fp2u2qNy7HWnYHVsQ+sQ=; b=ELoPvN5GAW/MDWu5WAUMxBmHPeDIfM488+Zedp3Ohsk3SO35uVH9PrnmnRXP0MKidK MNxSKIVNsIquddo0PNV0pGMhuKeMMYC8FVYPy63nGHh71Uu/Phoz1xk4zuhS1s2KCBTI xYBawDz5XhuRzg8up/erbPWCDDp32PCRRyVXkLb+pG2wSxx8Knvy2t18RqAdHJ5KXQVe WiRiCjuiOQ/dmH+Qz2Xs7qVpnGRHGRsa7Zra6uxBTF8KXLTfv5sC+j+g8o/PYBbsYBay PoXVqNrOHc0Nz8EMc+chraosDPVNn3TtPYi1F5lqgvElVaXf3Gb6sBmq9PFDxuGGc89u hmiA== X-Gm-Message-State: AOAM533mauqHCP/3Ns936FA+rQQ6L2F4q94CF827Se8ZnXDhbw1nSQ3x scUHB64txblBafBhz5BtSJB8StTlSVA= X-Received: by 2002:ac2:4a8d:: with SMTP id l13mr1249662lfp.213.1589414398518; Wed, 13 May 2020 16:59:58 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id 66sm85914lfk.54.2020.05.13.16.59.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 16:59:57 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id u6so1516485ljl.6 for ; Wed, 13 May 2020 16:59:56 -0700 (PDT) X-Received: by 2002:a05:651c:319:: with SMTP id a25mr857486ljp.209.1589414396039; Wed, 13 May 2020 16:59:56 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20200514082054.f817721ce196f134e6820644@kernel.org> From: Linus Torvalds Date: Wed, 13 May 2020 16:59:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe To: Masami Hiramatsu 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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". 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. Linus