Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp19452pxu; Thu, 3 Dec 2020 18:00:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3SEjdmWwfTrwb6Ks74MIGavr49SnCxHQFj1rK/dLpfWt68SU/8BtBXTpK3nlUBsIRRpnk X-Received: by 2002:a50:e143:: with SMTP id i3mr5428383edl.340.1607047222384; Thu, 03 Dec 2020 18:00:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607047222; cv=none; d=google.com; s=arc-20160816; b=w/xpxsFU4ZScVP2fP5Xp3Ztxd0m0GFZX3SW/tPpl0ITNjUIx/FUeiH5LPLRJtUlyuq gwQLkS7/GWTC+1bWnKW7mSloXePE6kLZ868qDU9BKVSHcXt4U9eXzDgrmry7mQBgb0Zi bJAs+kzI7oJ05J5xpvedw+4jKK9FV+e+nfYeOp1d+WAgVha9ZFB3R3o9QfUUHBu5CbMy 4KO79Mx8AsQZR80c/QgNBCtbv0bblrq44sIgTFLDwLOvtWtlSAH/yc5EKAKEstb79z6U tJRnulD9+O9JgemCaVryw1HfMzkHCMb14qguQCppxRHdW+cFcGGEk8oMCfNdsRTpmYwa Wt+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=AF4gEX/vocn6ADKGRD/a87GO0jg5J5yO20C1aSjch7U=; b=gZ4mXs7TLvClw8j3JI/gPGLOzBBQSw5JimfxDBX57xNje4xy93XZlO3hFYjzWShp8h OFcw1k8Ul7ObeGC9zEkYkVn0WxAv1zvALHt8Wqb14onJxWCUrTRSUzCWWojbri3GelnS 7hfz38ORo1xI/JYbEpPr9d+JYFgF5GcxpTLJte6Paf0CgHI5+HP/yWbskEPZt4LU5W4Q g6fcIadi6gwyvfSIc6mERp1TZZNav/yr083CudgG6Jh8CXFZx7251MhhqyT+B/kNn8N1 DPE3Dpcj03L+Uugqw/ZL0KEv2qqzrZJW7ehNJYeup70Vf6ZxJLFVc/lHcureLv2LTxsm nkcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QPzUPtwF; 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 s6si469913ejb.276.2020.12.03.17.59.58; Thu, 03 Dec 2020 18:00:22 -0800 (PST) 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=QPzUPtwF; 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 S1726337AbgLDB5w (ORCPT + 99 others); Thu, 3 Dec 2020 20:57:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:27802 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgLDB5w (ORCPT ); Thu, 3 Dec 2020 20:57:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607046986; 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=AF4gEX/vocn6ADKGRD/a87GO0jg5J5yO20C1aSjch7U=; b=QPzUPtwFwFzxKI0RBVJEd/NREsPxOY111xbbLPNhvPm3GEIjAfYzOzwDW2v+R+vnRFQBlC FV0A00wupcow0ipqL+CNnbDKxhoisRodEAdRS/yxhkAPlgq9xdJCVVqRPu+kFmJMh8sYiV 7UQ859iCCFToi5e9daNQPp8xsyD2u6I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-210-uxkl4M0IONqi5co7ssqmCA-1; Thu, 03 Dec 2020 20:56:24 -0500 X-MC-Unique: uxkl4M0IONqi5co7ssqmCA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D2140180A086; Fri, 4 Dec 2020 01:56:21 +0000 (UTC) Received: from llong.remote.csb (ovpn-117-98.rdu2.redhat.com [10.10.117.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 406EB620D7; Fri, 4 Dec 2020 01:56:16 +0000 (UTC) Subject: Re: [PATCH 0/3] exec: Transform exec_update_mutex into a rw_semaphore To: Linus Torvalds , "Eric W. Biederman" , Davidlohr Bueso Cc: Linux Kernel Mailing List , Peter Zijlstra , Ingo Molnar , Will Deacon , Jann Horn , Vasiliy Kulikov , Al Viro , Bernd Edlinger , Oleg Nesterov , Christopher Yeoh , Cyrill Gorcunov , Sargun Dhillon , Christian Brauner , Arnd Bergmann , Arnaldo Carvalho de Melo References: <87tut2bqik.fsf@x220.int.ebiederm.org> From: Waiman Long Organization: Red Hat Message-ID: <874ffe6a-628f-e504-037f-ec321565a40c@redhat.com> Date: Thu, 3 Dec 2020 20:56:15 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/3/20 5:42 PM, Linus Torvalds wrote: > On Thu, Dec 3, 2020 at 12:10 PM Eric W. Biederman wrote: >> The simplest and most robust solution appears to be making >> exec_update_mutex a read/write lock and having everything execept for >> exec take the lock for read. > Looks sane to me. > > I'd like the locking people to look at the down_read_*() functions, > even if they look simple. Adding Waiman and Davidlohr to the cc just > in case they would look at that too, since they've worked on that > code. I have looked at patches 1 & 2 on adding down_read_killable_nested() and down_read_interruptible(). They looks good to me. Cheers, Longman