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=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,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 832FFC433ED for ; Wed, 21 Apr 2021 20:56:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DDF8761445 for ; Wed, 21 Apr 2021 20:56:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDF8761445 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4D2306B0036; Wed, 21 Apr 2021 16:56:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A8DF6B006E; Wed, 21 Apr 2021 16:56:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3245E6B0070; Wed, 21 Apr 2021 16:56:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id 158286B0036 for ; Wed, 21 Apr 2021 16:56:13 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BA098181DF76D for ; Wed, 21 Apr 2021 20:56:12 +0000 (UTC) X-FDA: 78057581784.36.FFEBF29 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf26.hostedemail.com (Postfix) with ESMTP id BA82740002CF for ; Wed, 21 Apr 2021 20:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619038571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mLlgzpQfoJCT71FvpVLvkR2QOJhpT2lBE6Z4JwewyNU=; b=e/o/mH2sJnxLeGOLXyx3qCcEduX1Qm2cOaI7Eq1H0RcCqame8RGwOTLxBI7DA0euSdOVFG tPL1okFM18/w220jJ8pl+U0i21fePCJAPeUCx1t0U+my88X+fC8QQeag8MJSs3WYS+aeyW y+2dx63S3X3oHXEVFW8hmlLrQ9zBazc= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-582-s4R4ZhlFNIS3Gs-wuBTSwg-1; Wed, 21 Apr 2021 16:56:09 -0400 X-MC-Unique: s4R4ZhlFNIS3Gs-wuBTSwg-1 Received: by mail-wr1-f70.google.com with SMTP id t18-20020adfdc120000b02900ffe4432d8bso13190007wri.6 for ; Wed, 21 Apr 2021 13:56:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=mLlgzpQfoJCT71FvpVLvkR2QOJhpT2lBE6Z4JwewyNU=; b=FYKzJbtXMZdECJG+C4ELA6WTTS3F9ONrCl1R79iZKbnXSfqmVd3xRr+XiEe7Ou67EB /UoNsfJk7l3uxwPFyLqV/h/1MZzXi5yvOyhRgmuGpxh5RI94p21WeYTVM2OP9N/RgMle i9U4E54UPVjKc4i/eeBbz5fQAsATXo93hb/ndPf8fdGxUkqo8dBCWEw/vraaG8jhpL1V mHiOuxAqD1816CuYqqeWr8JOzZRjczLRJuRFXyLS0+WDiAcIWfoiEsE/2WbpAlqAp90h 2eEm1x+5rPrJk9pJa1xp8m3X881oEK0pE7TV0JdXJ+0IgMDXtk+qz+/3Ok60u8uel2jz JdAA== X-Gm-Message-State: AOAM531cfcut+y3mXsdDc1/M1tNTxEUOYZBfTpuzuF9a/4isbTLIac2U M2fYuXUCb0C170N91KR1sZflB97giyUgfJXWykQlGH7utjt2J29vmKO9FQ0Lg19UxWDa4B1ZWit o1C2wJrw4lJvWkwXv7yclhzL3YiGcZLGhmFyx7nNk85NjIQqjvDizm5++4WM= X-Received: by 2002:a1c:a746:: with SMTP id q67mr11645572wme.22.1619038568100; Wed, 21 Apr 2021 13:56:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyAkMIsdPwBFrOs8dqR12pB+jB+9nIPAFo91LjQiaTCWUoiuM0bx8GTcXqhSrcq5U0A4EeYg== X-Received: by 2002:a1c:a746:: with SMTP id q67mr11645539wme.22.1619038567860; Wed, 21 Apr 2021 13:56:07 -0700 (PDT) Received: from [192.168.3.132] (p4ff237c9.dip0.t-ipconnect.de. [79.242.55.201]) by smtp.gmail.com with ESMTPSA id y145sm2910099wmc.24.2021.04.21.13.56.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Apr 2021 13:56:07 -0700 (PDT) Subject: Re: [PATCH v1 0/3] perf/binfmt/mm: remove in-tree usage of MAP_EXECUTABLE To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Alexander Viro , Peter Zijlstra , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Morton , Kees Cook , Greg Ungerer , Mike Rapoport , Catalin Marinas , Kevin Brodsky , Michal Hocko , Feng Tang , Don Zickus , x86@kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <20210421093453.6904-1-david@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <866b3f40-9416-0246-cf0a-6f46e9abd9bf@redhat.com> Date: Wed, 21 Apr 2021 22:56:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: BA82740002CF X-Stat-Signature: qnypayjwkpw8gygbxhqc36rdimzgecgo Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=170.10.133.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619038565-342104 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 21.04.21 21:03, Eric W. Biederman wrote: > David Hildenbrand writes: > >> Stumbling over the history of MAP_EXECUTABLE, I noticed that we still >> have some in-tree users that we can get rid of. >> >> A good fit for the whole series could be Andrew's tree. > > In general this looks like a good cleanup. > > Acked-by: "Eric W. Biederman" > > As far as I can see we can go after MAP_DENYWRITE the same way. > Today deny_write_access in open_exec is what causes -ETXTBSY > when attempting to write to file that is current executing. > > Do you have any plans to look at that? I did have a look and thought about ripping out MAP_DENYWRITE; I'm still in the process of connecting the pieces. Some VM_DENYWRITE e.g., in mm/khugepaged.c still gives me a headache , and I'll have to double-check whether it would be okay to just fallback on checking the actual vm->file. -- Thanks, David / dhildenb