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,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 EB8D9C433DF for ; Wed, 13 May 2020 19:37:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F1352065C for ; Wed, 13 May 2020 19:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589398655; bh=VWs4NpfAEV+Wf9gSeX0e5o0koUyBavjyGOUsk1rJZSE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=akrnnMLJC9eiY+N6SvhAHgia/+cC6sEtjxU+PEdWTsl5d08fgPu7E4uGJkTqbwlSP 8ovlLXVxQ5LSH37FdybptA+Nr1UHX7tozzImLFspGb3NRB6gg98KqKjmSNhsTJaW8q XiBb/Ht265cDuBDsmNYY0XHudsDoP9koxc+eVinw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390725AbgEMThe (ORCPT ); Wed, 13 May 2020 15:37:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2390185AbgEMThc (ORCPT ); Wed, 13 May 2020 15:37:32 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCEBCC061A0C for ; Wed, 13 May 2020 12:37:31 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id h26so533444lfg.6 for ; Wed, 13 May 2020 12:37:31 -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=5FRYECFHiQr3Nfb1uzqLNFih4Bcng0OOjZJ5V5m4DAs=; b=ZjLEDdjhfQ+ZsfStprzo3boptGtjEB8xMJMPV9hfgVHHrrYSleH8mLbHC8Rk2rWQqc NnCj3BIzoVOHPTIgSoBKM0vWlfW3SuT0UoYyIfcumKGQE/4wsqoLb39sPYuJ5/AuOelG tGQKJ8l9ywdlX+FMm4CTzGEq2pztEwBhTbMlg= 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=5FRYECFHiQr3Nfb1uzqLNFih4Bcng0OOjZJ5V5m4DAs=; b=OCgLn629pC6BjlGA1mjKMEHedFC9g6ixoqS2qduaxe2bh0VcFkpW5J1av7q9vN8/ah L04ek2DWs3PElYjSJa0LYA6fSzdaFNDDgjd6SYiqKqFrjCBw3ggr8LUnqYAEW18dxlEh yUu8rTN76pAOppKCgzz33SBB5nvV+BK5Hx5XhrC0jYGuqLyPtOlSbJORDIdq29R4xFRz UUQ0ZvJvJut52+binmjvQDw3cKkSurVvxmmazWcMui9XttwpktrWrq24CwBK50Zng1JX 5Kuk3p43HUdSCU0kokaq0xZPQnJzKiE/WSOZ8UpGMLaMT0+YY3pz/zGUZWjcvHykd1MT sZwQ== X-Gm-Message-State: AOAM533vjQs7EnDVaXvJCu3AqoP1LcjsCQrlkECxIAJp1YmWwwlWTM/I AAOGlLwZZ6e9vD+6MNnF9PKRbRmHaws= X-Google-Smtp-Source: ABdhPJyL0CYPVKCzLId1BFoOKjJoRZ9S3jzAgiiVVC2kyzr4Z7lG8u2RQ3yFHqRJpVOqM6xYYAHWtA== X-Received: by 2002:ac2:5bdd:: with SMTP id u29mr670924lfn.72.1589398650039; Wed, 13 May 2020 12:37:30 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id v2sm219139ljv.86.2020.05.13.12.37.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 12:37:29 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id z22so571680lfd.0 for ; Wed, 13 May 2020 12:37:28 -0700 (PDT) X-Received: by 2002:ac2:4da1:: with SMTP id h1mr686949lfe.152.1589398648496; Wed, 13 May 2020 12:37:28 -0700 (PDT) MIME-Version: 1.0 References: <20200513160038.2482415-1-hch@lst.de> In-Reply-To: <20200513160038.2482415-1-hch@lst.de> From: Linus Torvalds Date: Wed, 13 May 2020 12:37:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: clean up and streamline probe_kernel_* and friends v2 To: Christoph Hellwig Cc: "the arch/x86 maintainers" , Alexei Starovoitov , Daniel Borkmann , Masami Hiramatsu , 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 9:00 AM Christoph Hellwig wrote: > > this series start cleaning up the safe kernel and user memory probing > helpers in mm/maccess.c, and then allows architectures to implement > the kernel probing without overriding the address space limit and > temporarily allowing access to user memory. It then switches x86 > over to this new mechanism by reusing the unsafe_* uaccess logic. Ok, I think I found a bug, and I had one more suggestion, but other than the two emails I sent this all looks like an improvement to me. 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,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 38123C433E0 for ; Wed, 13 May 2020 19:37:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C72BC2065C for ; Wed, 13 May 2020 19:37:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ZjLEDdjh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C72BC2065C 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 876DC80033; Wed, 13 May 2020 15:37:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 827368000B; Wed, 13 May 2020 15:37:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73CB380033; Wed, 13 May 2020 15:37:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0072.hostedemail.com [216.40.44.72]) by kanga.kvack.org (Postfix) with ESMTP id 58E278000B for ; Wed, 13 May 2020 15:37:33 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1B8583A82 for ; Wed, 13 May 2020 19:37:33 +0000 (UTC) X-FDA: 76812705186.21.dirt76_5f02596f27c2e X-HE-Tag: dirt76_5f02596f27c2e X-Filterd-Recvd-Size: 4005 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 May 2020 19:37:32 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id a9so521294lfb.8 for ; Wed, 13 May 2020 12:37:32 -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=5FRYECFHiQr3Nfb1uzqLNFih4Bcng0OOjZJ5V5m4DAs=; b=ZjLEDdjhfQ+ZsfStprzo3boptGtjEB8xMJMPV9hfgVHHrrYSleH8mLbHC8Rk2rWQqc NnCj3BIzoVOHPTIgSoBKM0vWlfW3SuT0UoYyIfcumKGQE/4wsqoLb39sPYuJ5/AuOelG tGQKJ8l9ywdlX+FMm4CTzGEq2pztEwBhTbMlg= 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=5FRYECFHiQr3Nfb1uzqLNFih4Bcng0OOjZJ5V5m4DAs=; b=a2g93yYWCqjnXcynBbtSppQIjsKXcBvmgPjAhAX0Tj6IjOdvEtZ5ztqEkgtjha0dEI UepLWpH1iNiRAfLwSfTZRXZex1v2hSQ/dctoPmqbO1XnUIjCmFb+0W2Ma5bzd1HZXfGK PEmk3hUTAAxDneVY4k3wWPVwEDy9QBJyKRVl6hDUPqAGH9KpGE5USwBONoTCmejdrouo Fm0T26v5V7sPiMbsIJHhoOo/QGb+fPJb0M8kUArjyNLij4G+TeS/IBKpPoYQwf/RDsOw tRcDJqH7QvNJcMv328wy/m4ufXv9HF7FHIocjQC9Fuo/ekgdExBYwMfFB3Z+HX2aYcEu zxjg== X-Gm-Message-State: AOAM532atxma6ghBqQveeRYsFpCJNFIAbK0PSvWCDh2ipfU+tCbRDFC8 2eiCUCiaZ19+vjXSTzJFLzO+iIydg34= X-Google-Smtp-Source: ABdhPJyYWwHt1GNxwjco9FuFuWkm78i6LApfayxdgW5oRK0OPqpwOTvKbPCWuoApzBL+UeXhxM1rog== X-Received: by 2002:ac2:5384:: with SMTP id g4mr688978lfh.1.1589398650289; Wed, 13 May 2020 12:37:30 -0700 (PDT) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id i76sm306755lfi.83.2020.05.13.12.37.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 12:37:29 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id u4so530986lfm.7 for ; Wed, 13 May 2020 12:37:28 -0700 (PDT) X-Received: by 2002:ac2:4da1:: with SMTP id h1mr686949lfe.152.1589398648496; Wed, 13 May 2020 12:37:28 -0700 (PDT) MIME-Version: 1.0 References: <20200513160038.2482415-1-hch@lst.de> In-Reply-To: <20200513160038.2482415-1-hch@lst.de> From: Linus Torvalds Date: Wed, 13 May 2020 12:37:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: clean up and streamline probe_kernel_* and friends v2 To: Christoph Hellwig Cc: "the arch/x86 maintainers" , Alexei Starovoitov , Daniel Borkmann , Masami Hiramatsu , 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 9:00 AM Christoph Hellwig wrote: > > this series start cleaning up the safe kernel and user memory probing > helpers in mm/maccess.c, and then allows architectures to implement > the kernel probing without overriding the address space limit and > temporarily allowing access to user memory. It then switches x86 > over to this new mechanism by reusing the unsafe_* uaccess logic. Ok, I think I found a bug, and I had one more suggestion, but other than the two emails I sent this all looks like an improvement to me. Linus