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=-3.8 required=3.0 tests=BAYES_00,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 0D005C433E1 for ; Fri, 21 Aug 2020 08:02:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C1FBD2078D for ; Fri, 21 Aug 2020 08:02:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Hgqmt2gF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1FBD2078D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 62B8A8D0024; Fri, 21 Aug 2020 04:02:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 58D9B8D0006; Fri, 21 Aug 2020 04:02:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4310A8D0024; Fri, 21 Aug 2020 04:02:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id 2A9E28D0006 for ; Fri, 21 Aug 2020 04:02:38 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DA12D3657 for ; Fri, 21 Aug 2020 08:02:37 +0000 (UTC) X-FDA: 77173833954.26.frogs15_320381727037 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 9CC9D1804B647 for ; Fri, 21 Aug 2020 08:02:37 +0000 (UTC) X-HE-Tag: frogs15_320381727037 X-Filterd-Recvd-Size: 5668 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 08:02:37 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id v9so886533ljk.6 for ; Fri, 21 Aug 2020 01:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KVANsT7rGco8JMibU7QuawjfcSy1WR7/xbKwNyAgmos=; b=Hgqmt2gFQ05GBJGh0SqMZid0hpRruO+7hlBBLRoI/e8Qfx10Eb1i2dVQTrmEN8INWv ydm8q2T9r65aaYh3WJ7GgNYNToM7Nw6ew9LJC9/4oAqbHdXIOChoQ+bWsSIqt1pdu1Wu GRzK8oIVcVyz7z11wS0vi5I32ZcKdDT6K2/faEeIk8hVfuDJchTi7WEph61q6tXYLPEZ gP18J4mdALOg80ABnRr66gLiIC2fG0R3Z9RXkOUq3gzepaMKSQJqmfdg6pE7rr+iTgK+ eKHXGA+mstO5diN1LU+ADDZhVTD0f6rULRkpXQYgQGlCwLa3+vJrC+We/EpNxhj3L3oR Ob+Q== 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=KVANsT7rGco8JMibU7QuawjfcSy1WR7/xbKwNyAgmos=; b=uDaCk7DUs1czm+UEk3N7kfzubEnNg8N3e6GBO712RYZAa4ovk7zzXCHa4wUW/kwuQn sWPFPTStBWikL412ZYGLnO3g28fChOkLz6i8rHp9PqFfGMj4z+z2ri3/O8hLJdPOD1d0 uWPP98LcEy/YRTb6cbDf6ePNz85+5JR7Vkg7wsMTpLn3nC7mEfBZJxnN1Jlc+q2xNqjU 9ohAZ/D4W7HN8PZwjBr7wZP4P5b9s4FT3DtuSgNINDUaZm85RRnQEp24IdJi0zWAElBO 45Q83rBs24O1bboTdbsnKyvafirvAWdob8HwrsFgOIvS8XsqIVJR4APzc5qAY8pCsTBT V/HQ== X-Gm-Message-State: AOAM533Ry0V9+dro5S83ahghMIcJYGCPQNCfhdJ5ZvDsjJZ8wl0tWIS1 KQW9Vh+9SHR9HojbZom9XssK17RbthnIfecxdxSutQ== X-Google-Smtp-Source: ABdhPJwe3AC/P9WErKr7WjO89lZ4U82FGOfaCqbMomabrRvML6lyzWFyF7oTFLeMddGrGhign2BmIyVqh+1N8Zo7NIo= X-Received: by 2002:a2e:b892:: with SMTP id r18mr879700ljp.249.1597996955601; Fri, 21 Aug 2020 01:02:35 -0700 (PDT) MIME-Version: 1.0 References: <20200819141650.7462-1-sumit.semwal@linaro.org> <20200819141650.7462-3-sumit.semwal@linaro.org> <20200820075846.GA5033@dhcp22.suse.cz> <20200821072334.GB32537@dhcp22.suse.cz> <20200821075304.GC32537@dhcp22.suse.cz> In-Reply-To: <20200821075304.GC32537@dhcp22.suse.cz> From: Sumit Semwal Date: Fri, 21 Aug 2020 13:32:24 +0530 Message-ID: Subject: Re: [PATCH v5 2/2] mm: add a field to store names for private anonymous memory To: Michal Hocko Cc: Colin Cross , Andrew Morton , Linux-MM , lkml , Alexey Dobriyan , Jonathan Corbet , Mauro Carvalho Chehab , Kees Cook , Alexey Gladkov , Matthew Wilcox , Jason Gunthorpe , "Kirill A . Shutemov" , Michel Lespinasse , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Song Liu , Huang Ying , Vlastimil Babka , Yang Shi , chenqiwu , Mathieu Desnoyers , John Hubbard , Mike Christie , Bart Van Assche , Amit Pundir , Thomas Gleixner , Christian Brauner , Daniel Jordan , Adrian Reber , Nicolas Viennot , Al Viro , Thomas Cedeno , linux-fsdevel@vger.kernel.org, Pekka Enberg , Dave Hansen , Peter Zijlstra , Ingo Molnar , Oleg Nesterov , "Eric W. Biederman" , Jan Glauber , John Stultz , Rob Landley , Cyrill Gorcunov , "Serge E. Hallyn" , David Rientjes , Hugh Dickins , Mel Gorman , Robin Holt , Shaohua Li , Johannes Weiner , Minchan Kim Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9CC9D1804B647 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: Hi Michal, On Fri, 21 Aug 2020 at 13:23, Michal Hocko wrote: > > On Fri 21-08-20 09:24:02, Michal Hocko wrote: > > On Fri 21-08-20 08:51:57, Sumit Semwal wrote: > [...] > > > Indeed. so does it sound ok to add an access_remote_vma_mmap_lockheld() version? > > > > You will still need to take the lock if the pointer belongs to a remote > > address space. But how are you going to find out? > > Scratch that. I didn't realize prctl is always called with the current > context. So there will never be a pointer from a remote process. Going > with a variant which doesn't take mmap_sem would be safe. Thanks much for the review and confirmation. I will prepare the updated patchset and send it out with the review comments incorporated. > > Sorry about the confusion. Not at all! > -- > Michal Hocko > SUSE Labs Best, Sumit.