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.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 24988C433E1 for ; Thu, 14 May 2020 00:00:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 384ED20659 for ; Thu, 14 May 2020 00:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589414406; bh=4WYyMaGWG9a9nFYDIlkg8Bpp7B8l0nT3fSfWhGSXUN0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=I2t64/4H+f90gmOOzebhwuu8V9e7bWbg0gJ1rctUWwuuLbkdc6jovgePzNsnB2net /5OvvA+EFO+ZxLbrPPfzGb/YWxjkuQTmw13t7U3qNW/758brWosyy2jAgwcGYK531A 4nNeb32BxE+RO1d+sxhdgRXs9LU+t2UYm8sF34po= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732871AbgENAAD (ORCPT ); Wed, 13 May 2020 20:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1732867AbgENAAC (ORCPT ); Wed, 13 May 2020 20:00:02 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53FD2C061A0E for ; Wed, 13 May 2020 17:00:01 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id g1so1499551ljk.7 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=SHQC/fVF844oylCMiNImfvwdAnd52h1MsZz6F5FcVQjFLfkYBXfvXeAfrtGR4Nk5Z6 JlA/xIDg+vkQWQA10LkH89tAIS8HuD+NOpQGinXsnH7Lr640RhPnFnEeA8CB3BFtOt/7 +m3WiRfJ9ELsUshai9Lg/EVVj1FeUlyNAviVXiga32ceRxBRtqoT68qOWg/S98i5Soig 1+kxd4n3xZlQQ5EU6VVsjOxZZOdskIH/FONvO9TWJaripo+mCLWBr21IkP/Vq+26mUvg +k0xLaYgGR2dOPv8Hi7HP0a/kCpBawvhaB5UhJ5c0b8DYbwTe4wKjOpPu5nXx/xOibUq tltw== X-Gm-Message-State: AOAM531uwQB2/ctzpw9fBzZi60x2W3dJRlf9NUSMZDzMR7Ps3+nedEL3 9eXWN/4ap73eUnSrTNdKktoRu6QFIao= X-Google-Smtp-Source: ABdhPJwZLi1vunWZV2pHnjm25/jJngW7jWMkTFXIYMJAibeGdTgnse7Rc3eXeW3gW+e84ORtw5ItAA== X-Received: by 2002:a2e:81d5:: with SMTP id s21mr890972ljg.258.1589414398663; Wed, 13 May 2020 16:59:58 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id p8sm478247ljn.93.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-f181.google.com with SMTP id u6so1516484ljl.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-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@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 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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 24279C433E2 for ; Thu, 14 May 2020 00:00:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AC0AF20693 for ; Thu, 14 May 2020 00:00:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="fD3hyHvK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC0AF20693 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 D06BB90013B; Wed, 13 May 2020 20:00:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB809900022; Wed, 13 May 2020 20:00:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B800E90013B; Wed, 13 May 2020 20:00:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id 9EB43900022 for ; Wed, 13 May 2020 20:00:00 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6E2B9246A for ; Thu, 14 May 2020 00:00:00 +0000 (UTC) X-FDA: 76813366560.13.sail51_3a3c62e5ef044 X-HE-Tag: sail51_3a3c62e5ef044 X-Filterd-Recvd-Size: 4406 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 May 2020 00:00:00 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id u6so1516572ljl.6 for ; Wed, 13 May 2020 16:59:59 -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=ZLpGTfvUbUdlJ1LByEDn+tYq/eRBpQK+jBhZw/JXaSffCzZ9Czfu4juZplITiO4grj 4PeMCZ1au8T+XR5llFEdJfDHU2j9tZ/dmwlhN/F1LqHmLE1KhrC3toPjdD0fkCdr1/xL H62G2U23TXLFnghXKOihT2OYyLAQfosAGfk5wea3V68v+Q66aSLevgttYkeQHViuSWnw Sq6uN2nw9XmyCTH6Qr4b9Qzcs0rOtiXYBUrDG9vW4kgFHOSwYJAYys1HompnY8cHAqjq JDyoE0uGPHq1MkVDll1gP5pJd1FF2wfHQ38zHOFKwQ+vMvcFMdFjNVBN29ISgZJGx+E+ K1vw== X-Gm-Message-State: AOAM532bRv34Z7/oHb9q8MsBYzeRdVOQkDlxoxGr2uIzl/32R+0tuHrf 5hrfWdgJw4K6NgZ9QLJWjQuBZCunXe8= X-Google-Smtp-Source: ABdhPJxkgyP/JiYZxVL9vryKmaiSNamJcMlS3wd6lywvY10QWclSXzkdumk/nS0vjdwSB10nEmf9wA== X-Received: by 2002:a2e:5847:: with SMTP id x7mr916290ljd.61.1589414398240; 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 66sm85913lfk.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 o14so1530257ljp.4 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" 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, 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZ1I7-0004wR-8z for linux-um@lists.infradead.org; Thu, 14 May 2020 00:00:00 +0000 Received: by mail-lf1-x144.google.com with SMTP id a9so1020110lfb.8 for ; Wed, 13 May 2020 16:59:59 -0700 (PDT) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id d9sm612523lfa.77.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:56 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id h4so1476156ljg.12 for ; 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 Message-ID: Subject: Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe 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: Masami Hiramatsu 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, 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 _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um