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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 4B91BC2D0E4 for ; Tue, 24 Nov 2020 06:54:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDBB22080A for ; Tue, 24 Nov 2020 06:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729797AbgKXGyD (ORCPT ); Tue, 24 Nov 2020 01:54:03 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:44869 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728986AbgKXGyC (ORCPT ); Tue, 24 Nov 2020 01:54:02 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4CgF9f503cz9tyhw; Tue, 24 Nov 2020 07:53:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id hmjPhs3s2u0p; Tue, 24 Nov 2020 07:53:58 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4CgF9f44vJz9tyhv; Tue, 24 Nov 2020 07:53:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5E5C08B7A3; Tue, 24 Nov 2020 07:53:59 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 1BWyoMS_Jinp; Tue, 24 Nov 2020 07:53:59 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 4C8818B79F; Tue, 24 Nov 2020 07:53:58 +0100 (CET) Subject: Re: [PATCH v2 00/19] Add generic vdso_base tracking To: Dmitry Safonov , linux-kernel@vger.kernel.org Cc: Dmitry Safonov <0x7f454c46@gmail.com>, Alexander Viro , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Guo Ren , "H. Peter Anvin" , Ingo Molnar , Oleg Nesterov , Russell King , Thomas Bogendoerfer , Thomas Gleixner , Vincenzo Frascino , Will Deacon , x86@kernel.org, "linuxppc-dev@lists.ozlabs.org" References: <20201124002932.1220517-1-dima@arista.com> From: Christophe Leroy Message-ID: <5e315bf6-b03d-e66e-9557-22ece397080e@csgroup.eu> Date: Tue, 24 Nov 2020 07:53:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201124002932.1220517-1-dima@arista.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 24/11/2020 à 01:29, Dmitry Safonov a écrit : > v2 Changes: > - Rename user_landing to vdso_base as it tracks vDSO VMA start address, > rather than the explicit address to land (Andy) > - Reword and don't use "new-execed" and "new-born" task (Andy) > - Fix failures reported by build robot > > Started from discussion [1], where was noted that currently a couple of > architectures support mremap() for vdso/sigpage, but not munmap(). > If an application maps something on the ex-place of vdso/sigpage, > later after processing signal it will land there (good luck!) > > Patches set is based on linux-next (next-20201123) and it depends on > changes in x86/cleanups (those reclaim TIF_IA32/TIF_X32) and also > on my changes in akpm (fixing several mremap() issues). I have a series that cleans up VDSO init on powerpc and migrates powerpc to _install_special_mapping() (patch 10 of the series). https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=204396&state=%2A&archive=both I'm wondering how we should coordinate with your series for merging. I guess your series will also imply removal of arch_unmap() ? see https://elixir.bootlin.com/linux/v5.10-rc4/source/arch/powerpc/include/asm/mmu_context.h#L262 > > Logically, the patches set divides on: > - patch 1: a cleanup for patches in x86/cleanups > - patches 2-11: cleanups for arch_setup_additional_pages() > - patches 12-13: x86 signal changes for unmapped vdso > - patches 14-19: provide generic vdso_base in mm_struct > > In the end, besides cleanups, it's now more predictable what happens for > applications with unmapped vdso on architectures those support .mremap() > for vdso/sigpage. > > I'm aware of only one user that unmaps vdso - Valgrind [2]. > (there possibly are more, but this one is "special", it unmaps vdso, but > not vvar, which confuses CRIU [Checkpoint Restore In Userspace], that's > why I'm aware of it) > > Patches as a .git branch: > https://github.com/0x7f454c46/linux/tree/setup_additional_pages-v2 > > v1 Link: > https://lore.kernel.org/lkml/20201108051730.2042693-1-dima@arista.com/ > > [1]: https://lore.kernel.org/linux-arch/CAJwJo6ZANqYkSHbQ+3b+Fi_VT80MtrzEV5yreQAWx-L8j8x2zA@mail.gmail.com/ > [2]: https://github.com/checkpoint-restore/criu/issues/488 > Christophe