Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp384147pxt; Thu, 12 Aug 2021 00:17:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOz0EYJ9+4Wt9PX6CQvQTG/GQQEWTPi6yB7f2yesDoWbFydqMQfEDKjTn/8lyexS0ZBtET X-Received: by 2002:a17:906:8a6a:: with SMTP id hy10mr2326082ejc.319.1628752624587; Thu, 12 Aug 2021 00:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628752624; cv=none; d=google.com; s=arc-20160816; b=noipH5TVZyvf9mUuXqz9Bpe3N+6vQTYawTLMBqQc4mUo5z4YOFIX+/8/AzuNiuN9ik mEPC+dbB4alwHvcj3QNh2wqCLmBug4m+iKPKTgE7wNajtGA9WJrYHsO6s2hsqn4fuymr S86Rx6SZa05Ti3rcYyvVLvxTEn2qu2MHHrLjVP/6qMbM8czpuB/CWDwFmbuwbkUsv50h guQn0kyKgHqrcmiQwS5SSUt7P7OBHf6nsL2qt0kifHndvdGO6bURDEzgEsIzm9r59I/B MOIaf1/R0Z/el9eoiSyY5WDiudM2uOh66piq1tAFA/J7V1MdkrsN30EdoHOSftdzfpzX 39zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=r1z8oCJ5otLeJGBN/vU9nWn4UXFrvOTRJOJmiwu3d0Y=; b=UPEbSTAjavx5bjygs/OahYG7ud8s7Ce7cyzVn9jhJR7BwsrgNrnpK14+6Ds6yRWTSn M99iVgu737BqZfe6O4fUpOduxWH2AaiWU/5DAzkA5PkA9CXOQNTpUyAcys7n07mrjV26 JDj/EPa5OW2X70V9YoAFV5XuDh8Lp0wJDWkB/59upqogh27dplDYvpRLqQ3eBYrF34Wa 7WFUlC4Mr+yV8EM8ypuYsi/PR5fzdIjyEVQgLXa7Hccjyx5FyYUP6j+G2dzXaxn9vTQK L4o6HbX6v+dBzVfIPDknXMtQ2HzddC4UH3nQr092POK6letRXM3C/4/9tMQBfCfbv1dX wLzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ipTCpo3B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fw19si1576301ejb.86.2021.08.12.00.16.41; Thu, 12 Aug 2021 00:17:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ipTCpo3B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234604AbhHLHNX (ORCPT + 99 others); Thu, 12 Aug 2021 03:13:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27387 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234281AbhHLHNW (ORCPT ); Thu, 12 Aug 2021 03:13:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628752377; 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=r1z8oCJ5otLeJGBN/vU9nWn4UXFrvOTRJOJmiwu3d0Y=; b=ipTCpo3BCM2RXa/8XEyKvoKpyZUUv+AcYw3gSv6h8jIT8a0fYPVl//fUWAAOJASiMQ7EYY WpEd3sKqjZAqJY2VTL42iAwYSeAf8qVndaLKKjL6/TWus6+Ci2RrGAsyYd2DsknoWfNj8Q zR+tMQwngXtD/mcTFnlZdmwoZo5lA38= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-12-QNt7q5lIOjS1UBO1F_a0ng-1; Thu, 12 Aug 2021 03:12:56 -0400 X-MC-Unique: QNt7q5lIOjS1UBO1F_a0ng-1 Received: by mail-wr1-f69.google.com with SMTP id o10-20020a5d684a0000b0290154758805bcso1502584wrw.3 for ; Thu, 12 Aug 2021 00:12:55 -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=r1z8oCJ5otLeJGBN/vU9nWn4UXFrvOTRJOJmiwu3d0Y=; b=b9G7j5JL76hYLSCuLXwwQEB2nhVxBksN5F9UEy/bm1bhz/bInFOvGbDMjOhcoLdGvA 3C6TcFy9nFQlj6XkxdGXKrx4SXxsQrY86t7y8DZyQ3vHBHFOU55OpER95E9waiU9InZ4 8+q4o9UcVPdq4Q/FAzZL2fw6aUPAzdiDEyGO/ga7d+WiuKJHIb1DAF28ScBmW7+Yx//B 9wBmIbp4AkKCAoy6A0LRToM0FBKA/tufcTZsrasz5EBafOc+ovW5dZJtHs1ZfTDhCW66 Ksnf8J0MXl++vHiRxKUGwNcLsqeWH7rYNSkq2+ftgf85gTxnGBHFt8VS3nM/j+EXcEnd CZTQ== X-Gm-Message-State: AOAM532OrPNQ892wV+Vt08pjXjIpcbGQG5zcnAMB9XJMqdlNy0rwC41H nOlMBDW6Pzfo5xpd9XhzTY0CbIH1By/xxB9Ex2J4Ig62rMqu24gs15h1zjillAT8ko+0FZiBsxj rI4lCBPJkoOtMxuJ2cIsPGEc+ X-Received: by 2002:a05:600c:2159:: with SMTP id v25mr14011556wml.187.1628752374745; Thu, 12 Aug 2021 00:12:54 -0700 (PDT) X-Received: by 2002:a05:600c:2159:: with SMTP id v25mr14011529wml.187.1628752374538; Thu, 12 Aug 2021 00:12:54 -0700 (PDT) Received: from [192.168.3.132] (p4ff23d8b.dip0.t-ipconnect.de. [79.242.61.139]) by smtp.gmail.com with ESMTPSA id m39sm7731910wms.28.2021.08.12.00.12.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Aug 2021 00:12:54 -0700 (PDT) Subject: Re: mmap denywrite mess (Was: [GIT PULL] overlayfs fixes for 5.14-rc6) To: Linus Torvalds Cc: Miklos Szeredi , =?UTF-8?Q?Christian_K=c3=b6nig?= , Matthew Wilcox , linux-mm , Linux Kernel Mailing List , linux-fsdevel , linux-unionfs@vger.kernel.org References: From: David Hildenbrand Organization: Red Hat Message-ID: Date: Thu, 12 Aug 2021 09:12:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.08.21 18:20, Linus Torvalds wrote: > On Wed, Aug 11, 2021 at 4:45 AM David Hildenbrand wrote: >> >> I proposed a while ago to get rid of VM_DENYWRITE completely: >> >> https://lkml.kernel.org/r/20210423131640.20080-1-david@redhat.com >> >> I haven't looked how much it still applies to current upstream, but >> maybe that might help cleaning up that code. > > I like it. > > I agree that we could - and probably should - just do it this way. > > We don't expose MAP_DENYWRITE to user space any more - and the old > legacy library loading code certainly isn't worth it - and so > effectively the only way to set it is with execve(). > > And yes, it gets rid of all the silly games with the per-mapping flags. I'll rebase, retest and resend, putting you on cc. Then we can discuss if/how/when we might want to go that path. -- Thanks, David / dhildenb