Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp338885ybg; Thu, 19 Mar 2020 00:20:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuu/nV2NaCyCirLT+fNIIERNXWu+jGqPC088NkyuLgJ9c//NlC4JU9vMdT7clLCRgJ8f2/O X-Received: by 2002:a05:6830:13d8:: with SMTP id e24mr1194412otq.328.1584602433088; Thu, 19 Mar 2020 00:20:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1584602433; cv=pass; d=google.com; s=arc-20160816; b=ub9weHCYdlMrLf7OAfq4eAxuQMRLZ6W+rXPzJFa3Q/E4kqKvgC5wHhdBmDX1MwDNJS IZSFepGdpMfuXPGVdyckblRN+4epugmyqXICxONUvL98OkVVVEzkDmPx315S1xULRWpG IHPOG31vFAvB8idG87HiHQST2Egg0Y/rvvUe78ABz+HN6/XzcID2qL3frIjEn0wytv8u gAYzfD5+qWhB4tlkMPO0kvArwX7IoNhhsAN1OMCV6rWGbBtTkkbfQoKhl3Q9zA/gTVoX BHj8ZLH1H82PUduoe2nyw4wxoa+UXlrU8PNbvV4PYcBxqL2tnFJTrCb9M9ufi2R5cpds fOJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject; bh=vxIBA0eTTJmtvzqWujapOEKtGUqHaJJ9YhL5aqFDIao=; b=TbnrzGeRpHvpyuxUfh8sT78LWa2tml2AVBIBpicc5jSkfFe8V8XAYSsoMubPkc+nKW wbG+BUlWFuy2bAAo2o6mX/X1yaf4WrAXFbL2TkUTsBg8dzpD8H3huPTviH5rzYuuyEE9 5g6b3zxHa+AP6MRsY/92UKVuVlS6T7i8a/68OPvPchisKsgcLQ188/OrQj5treqP4aaZ zrbPmz0+PiFb7Y/hSsJglBB0fBrx5My2kP00ZqYkgF0DnpXnyCFy7ftJmdNmgwrgTCjH kKdeDqhM40Xji6ndpb4RpziSpr202EFsT4F+ohDZShyQHui7KanvoqIeZlxBF8OtAkAn yXRA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=hotmail.de dkim=pass dkdomain=hotmail.de dmarc=pass fromdomain=hotmail.de); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si548913oij.237.2020.03.19.00.20.20; Thu, 19 Mar 2020 00:20:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=hotmail.de dkim=pass dkdomain=hotmail.de dmarc=pass fromdomain=hotmail.de); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727220AbgCSHTb (ORCPT + 99 others); Thu, 19 Mar 2020 03:19:31 -0400 Received: from mail-oln040092075049.outbound.protection.outlook.com ([40.92.75.49]:2786 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725767AbgCSHTa (ORCPT ); Thu, 19 Mar 2020 03:19:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mrUPWrUqOaKWAf1aMquFWlh4Oy1/f/HAOKhSlD6Lq7bfYuyHysoA+YgnYq7Tig7teDFyTX0FYGrpM1WYW6k2B5RbRd7LgR7rGzMpGL+HWtwOhFAlLolluq/4qRWH8uSBTVO9tObA5433/I46ZARG8P0T/H3ujw5AqC/5pp24sITW4VaZMadUMjmT74O3B6LDzPADDqKTnPD0RRY1LhVWLq9M6ZFy+x8KltzZPmLxEAbRQFI0azbnGkXg8kjjTDtwxV924ubNMyAQODVOwNLkXxCIFchEqXhCSihTSMTfhFwhfZwdvna9EfBIbB1zMkXt/uyLDKJy+5oMLneZtUTp2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vxIBA0eTTJmtvzqWujapOEKtGUqHaJJ9YhL5aqFDIao=; b=JW99FeZsWUIITD8fpMR3hGfOMBcqQrH7wYWyz0Fga13fF43wnK+J2vMKuFm6ns93H/AZwamPUZf8a1YqxzaKbMzsRKe2EQoVFLz0dwtihP9NAL7uPbvBmvcDHgKQGrXzLivWI1+9GGcQPCM/Bu96k/qunjdNmd8I7AUw7AE83zf50jfKCUtTj/KcnlXKDQBft9ZW9YcGqScztgHYmPgIQiiEk7HdXlbjxLnC9u1VlvEEG3a/CVHU/9CFMzhNndnf2G7Y5BMd28HTpWjcnL4DIPTmqZi+DXoRuieAZRoTFvGIAKzOjy7Qc51E6yKRkjHXV6HHnVEiL0ThfNxCPJUcbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hotmail.de; dmarc=pass action=none header.from=hotmail.de; dkim=pass header.d=hotmail.de; arc=none Received: from HE1EUR04FT040.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::39) by HE1EUR04HT022.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13; Thu, 19 Mar 2020 07:19:25 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (10.152.26.56) by HE1EUR04FT040.mail.protection.outlook.com (10.152.26.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13 via Frontend Transport; Thu, 19 Mar 2020 07:19:25 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:B5C2B2B81A31B114FA65B0D3F3DB93E518946F7458CE334BF9BEEB6C89AFCEC9;UpperCasedChecksum:D4F0E88236249F7EB1A0DF7531DD5D2B4DADEA94CB0CF94780BC0E257E4A6F30;SizeAsReceived:10330;Count:50 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::1956:d274:cab3:b4dd]) by AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::1956:d274:cab3:b4dd%6]) with mapi id 15.20.2835.017; Thu, 19 Mar 2020 07:19:25 +0000 Subject: Re: [PATCH v3 5/5] exec: Add a exec_update_mutex to replace cred_guard_mutex To: Kirill Tkhai , "Eric W. Biederman" Cc: Christian Brauner , Kees Cook , Jann Horn , Jonathan Corbet , Alexander Viro , Andrew Morton , Alexey Dobriyan , Thomas Gleixner , Oleg Nesterov , Frederic Weisbecker , Andrei Vagin , Ingo Molnar , "Peter Zijlstra (Intel)" , Yuyang Du , David Hildenbrand , Sebastian Andrzej Siewior , Anshuman Khandual , David Howells , James Morris , Greg Kroah-Hartman , Shakeel Butt , Jason Gunthorpe , Christian Kellner , Andrea Arcangeli , Aleksa Sarai , "Dmitry V. Levin" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "stable@vger.kernel.org" , "linux-api@vger.kernel.org" References: <87tv32cxmf.fsf_-_@x220.int.ebiederm.org> <87v9ne5y4y.fsf_-_@x220.int.ebiederm.org> <87zhcq4jdj.fsf_-_@x220.int.ebiederm.org> <87d09hn4kt.fsf@x220.int.ebiederm.org> <87lfo5lju6.fsf@x220.int.ebiederm.org> <6002ac56-025a-d50f-e89d-1bf42a072323@virtuozzo.com> <532ce6a3-f0df-e3e4-6966-473c608246e1@virtuozzo.com> <13c4d333-9c33-8036-3142-dac22c392c60@virtuozzo.com> From: Bernd Edlinger Message-ID: Date: Thu, 19 Mar 2020 08:19:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0015.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::25) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) X-Microsoft-Original-Message-ID: <5e38267c-cb7f-8049-26b8-3a0a155ca51a@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (92.77.140.102) by FR2P281CA0015.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Thu, 19 Mar 2020 07:19:24 +0000 X-Microsoft-Original-Message-ID: <5e38267c-cb7f-8049-26b8-3a0a155ca51a@hotmail.de> X-TMN: [m8LpYdCrZRxzdlzBeoQ2jXshgvDIn49Y] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 6f08d5e8-2023-42ff-f29b-08d7cbd5da79 X-MS-TrafficTypeDiagnostic: HE1EUR04HT022: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /X3jasuoM4he5VZ9efsssHDT2JLhi+bxnFrvMzKBipdJq7PD6e1D3/bieeI+FRYDf1zu8JdLQmLUzGDcaXiDwKTRfzWDlY4HKjKE1ClgnhUj/k1I4A0xVwI9yQP0cDl3+OODdh/HupnOxdzAZ6UwpbpvWEJxgTkH/ntX1CCGMo+usNsJbOlaazkqIIBvXCVq X-MS-Exchange-AntiSpam-MessageData: oK1Nj1SgfWb6a6HS+SOIRMvtP8Dk22KU8zlA/X9NBlFcG2WdV9gjSZSZq4/B5BXm38PHa2SVMw3oR2Ff4pKPD3eBa2RPrJmDDXxkgrdHqhsUh7iJDtEjjA2UjoJY/rG0uZBmz3FKFDndoIrTvEzKSQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f08d5e8-2023-42ff-f29b-08d7cbd5da79 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2020 07:19:25.4399 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT022 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/19/20 8:13 AM, Kirill Tkhai wrote: > On 18.03.2020 23:06, Bernd Edlinger wrote: >> >> I was thinking of something like that: >> >> --- a/fs/exec.c >> +++ b/fs/exec.c >> @@ -1010,6 +1010,11 @@ ssize_t read_code(struct file *file, unsigned long addr, >> } >> EXPORT_SYMBOL(read_code); >> >> +/* >> + * Maps the mm_struct mm into the current task struct. >> + * On success, this function returns with the mutex >> + * exec_update_mutex locked. >> + */ > > Looks OK for me. > Cool, yeah, then I will post an updated patch in a moment. Thanks Bernd.