Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1858990pxb; Wed, 2 Feb 2022 14:15:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6VDc4YQt7E/zgytSK6bf7kZV+xce2pU2jyehlkfWOuZg8u2MbUyIB5oqf27tBw9/yV58Y X-Received: by 2002:a17:907:7e92:: with SMTP id qb18mr28184878ejc.555.1643840147548; Wed, 02 Feb 2022 14:15:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1643840147; cv=pass; d=google.com; s=arc-20160816; b=cFIt3rTQBUAVGDdKP+Ph1G0m7JORZwYb+qCTiufjmHizX3WrrUDXm1i3rAUgY31MXC skvkEZTwAuIWR20W0EtamNY+MvLDkmh/T30f9T885xukeH9H1tZXZDThAx8kBXRCCKza yhm7I3XYcbx1XPue1lBQW1tUfq2i1RZHPsocFK3htWY3goLPMI+hnsmLyr3B/dc8/grn lCxNU2FOaCgMpqSamvfEQnGAdPwXHoBbCe9HvcCK5eILrXSN0DLkc0JjBa29KJbjKB96 30HRfSf2us/hs31BLw/3Mnh6Ptp6rrQf9lUXBM+GlnqVWO5kEcrRUqg+dQ72r+9kFzAC RVJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:content-language:references:cc:to:subject:from :user-agent:date:message-id:dkim-signature:dkim-signature; bh=uqd1IjKQiDzpM5NeiuJ72xcGAwACnMETGHJInZt04Ag=; b=QkkGW1g9CMuOMuF3ddJgo+yZ2HyW0Rf/zhVimXFIhtOLQDU7aQoo1HN12GU7LQSNM4 9XeB5XeB4mCO9+rRFpHfCM4FHdaHtiu+CLFKuSXdyR4ZaaS4xPd1nlrY91XpP4DFBWvQ 82VOdB3TrxvQpfzZf7EEfswfBNUd5zM30lzFv7xXJyGrLLtzlViF3TNRUyV0JPyUqRh1 TC5a8loKlA9BXR+YjnvE7Mr+QuH7cmHhseVUnONr0rWBxZILBs1uVerW0uf+OJjKVsyy 7NLDt/0rZ4MWEcK2fxtEH9WSMer3i+IenMXl4r1hjvGVw43rtTwkT+FR56aC8gJpjRfr s2AQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ezVCSW6n; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=uFAG6Xmc; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22si11726218edb.337.2022.02.02.14.15.22; Wed, 02 Feb 2022 14:15:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ezVCSW6n; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=uFAG6Xmc; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347460AbiBBVDD (ORCPT + 99 others); Wed, 2 Feb 2022 16:03:03 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:34368 "EHLO mx0a-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347354AbiBBVCl (ORCPT ); Wed, 2 Feb 2022 16:02:41 -0500 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 212KwhMp023469; Wed, 2 Feb 2022 21:02:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : from : subject : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=uqd1IjKQiDzpM5NeiuJ72xcGAwACnMETGHJInZt04Ag=; b=ezVCSW6nj1XjDr8Nb1w9Cl7hUKvIm//QVUNsWhNCY2P8RmMH+o/OuA6VJ5QM2q5flelS SjvVjUfPQZqItiD9Ans62SVghYpgOgXzGv2geDFZCdFK+KPgf82mWrK0Qf4rZJl+7OU/ 11V7/2zPt4pMf8pS41UUHwvEZaVIDyzJgAc01rvAnDOwwjQf1ELDYM66I1UQ4HT95CWZ KcgObTGYFaZtgwsrmxjTDVJGGAz+LHMDRdBc+qOtvyy5m+HZSz+9vq6YXMaJekjDsJuq mORo61eN/0hj4vBRQ9Y0xPDTyxzIpmkZ+8q6bul9LNI1H4BpxAKTPxWNALEhposbus8b Vw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3dxnk2pxcy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Feb 2022 21:02:22 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 212L1Ejv021471; Wed, 2 Feb 2022 21:02:20 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by aserp3020.oracle.com with ESMTP id 3dvwd8xt3n-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Feb 2022 21:02:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cNEriRssaTblMGYtP0BFEZ3EXgPuRChaek/7myiBMiNS79Th54L0hQZON/TMdog/fXtIHS3/sWKNdt6L+nOlYDRvsC2+qf8rMQyVlTH1ItVtBaL/EI51MjecQk3h1061xlWNTBX5QHoCcEZBoAPqjHicr5jBkqigHqH0JDHg3MJHeXezcTGCMI4wN8O8RaFOC89Io7ySrdJBNtA4jNsfKZryh7+PDdhMfNvZLWBw/VHsLE/VVRaLYY6cdA8A1CeEQP58Xbgj8PRqv2n1KZh574Dv+Lehcf1mOfI8Xf/1KaEZDWg66pNxRTxQZ9q6UI+qMgfk3Zfs3uYoEbwTpd2Hkg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uqd1IjKQiDzpM5NeiuJ72xcGAwACnMETGHJInZt04Ag=; b=ClYb/3YHJXxDcaatximYADvPd5T7ZySqREAcox70QzMPYYyCcL5kZkBoOcqT+SHFFXyUJ9+BDifXWWN5tL3ZbfqnO1vkkLtQdtVRmqC+C85Gq995tH09ULjneT85FeODxBIQuDlQRe5xI8b93AzoxOn70T2nlDmb6En9CwAN0CNFZaKVCarn4GhnAMCIheKQ0l9OKQ4v1TewIOd6/6AD2eCx0aKqAumjqhjl0TUE4vDbUgX3gOuMiQeZJsxHCPd5Z2FBSjZVg9ihhFOXUlpCRJkqw8EkeAQM65uAjUjWeSDPv5/pmoVDaIreGirb90zZHzokQ7xR4A1MZmT4krwQ3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uqd1IjKQiDzpM5NeiuJ72xcGAwACnMETGHJInZt04Ag=; b=uFAG6XmcjTyowI0MHV6ssTvG/wkcG3J8Lf0MC4FuvyblRHXSithNTET3kdD/fVw3s/ffVJ1hBMe5DszHyj+TojGV0OWGuqQT4KUy3wYJZutoGgl5vC38UGKk+L/epvPEOAMJKRFwWt2sZOCJr7SAPosZIJT/AKLNhqPTi5IN8t8= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by MN2PR10MB4014.namprd10.prod.outlook.com (2603:10b6:208:182::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.17; Wed, 2 Feb 2022 21:02:17 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::21b5:910:b965:9e6c]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::21b5:910:b965:9e6c%6]) with mapi id 15.20.4930.022; Wed, 2 Feb 2022 21:02:17 +0000 Message-ID: Date: Wed, 2 Feb 2022 15:02:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 From: Mike Christie Subject: Re: [PATCH V6 01/10] Use copy_process in vhost layer To: "Eric W. Biederman" Cc: geert@linux-m68k.org, vverma@digitalocean.com, hdanton@sina.com, hch@infradead.org, stefanha@redhat.com, jasowang@redhat.com, mst@redhat.com, sgarzare@redhat.com, virtualization@lists.linux-foundation.org, christian.brauner@ubuntu.com, axboe@kernel.dk, linux-kernel@vger.kernel.org References: <20211129194707.5863-1-michael.christie@oracle.com> <87tuf79gni.fsf@email.froward.int.ebiederm.org> <87tuf11oe6.fsf@email.froward.int.ebiederm.org> <87pmpoxzuf.fsf@email.froward.int.ebiederm.org> <783145b7-243b-b85e-e274-44ef6c0696b9@oracle.com> <874k62b76d.fsf@email.froward.int.ebiederm.org> <68ba89ae-108e-c14a-02a0-db72b169c9b1@oracle.com> <87a6fs3lk5.fsf@email.froward.int.ebiederm.org> Content-Language: en-US In-Reply-To: <87a6fs3lk5.fsf@email.froward.int.ebiederm.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DS7PR03CA0108.namprd03.prod.outlook.com (2603:10b6:5:3b7::23) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83a1a489-d0dd-4f1a-125e-08d9e68f49dc X-MS-TrafficTypeDiagnostic: MN2PR10MB4014:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OwdYeVcfKOPiEAc0h1Kpbr5eQLW4rGKIPISrGViUEw+ekAE8ErdY+Vk5fFyKvLc3scLaXiu5Xty/44N7rBgS8jDdXFAb0f27LhC4g0xedoTvBopw+eS//8nHeqC1tOzDorKBu7wq/XR6FiS/A8sxS6PcFcYWWLFsrwcJ346n8uG7IVUH50d+2fPh41+p40zgQSZKVLUBPplYSau3shmr4rm/Og1YSHE528OO6feqhaYkbxp+fXupG44h/JNW6qF2lB1bpCpt/HfSnEch08ekqBs+sCNDvl0EjJlES9fjhGsuOTvy8T4ewLVBxV+KyUBO38Iq3lGP7w1nSobLW1u+6ZO4Mwd3FaLH/Qpoh7BoJgGFgIntlItXyzJG4rXEuAigPIV3MkJ/8dkVG1hRzbIu6Xrg9sfBiPlH5g4Y4qPclGDLAGksxLqbbkehLlPYiadXv6NyrTV4gzAiE5Uia75Kgt4EwcO56kXVRzafa+h2S7MfKCZNeJZXX+m4mV+JZM8D2x4SHMJkORpGy7nkin6iHEPgiGQwXngHETeM6EGopjYSqVmVeLxNNOjP49ukg5EeOExr9iWIM/brWuHK4lZhg0AE6Sjxcmusr/HEpQM7N0QFvKMQZgHEdUGeG7BEHiXsnpBJBgZCKpqaJ8I11GX19gnyNBqJDGEKk7A27ruBJZ3Qq5BVUF/6iKTpLXOgYONTkwEIuGgOOwEsnfri1bKA6GltQ0uNKN4TvgcB4qIx3RY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR10MB1466.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(83380400001)(6666004)(2906002)(316002)(38100700002)(5660300002)(186003)(26005)(2616005)(6916009)(66556008)(4326008)(66476007)(7416002)(6506007)(66946007)(53546011)(8676002)(31686004)(31696002)(6486002)(8936002)(508600001)(6512007)(36756003)(86362001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Zk5qT3JoNjdwbFdUeUpzYktTWExxdXBiZkpXUXV6WEY1dUlpYlUrcmcwbnpW?= =?utf-8?B?SU85NG1aOVYzcFVtcS9GeDNvVEYrYWFQTUJCdW0yNEUzODFSbjQvQ1I2b1I1?= =?utf-8?B?NXFjOUtyek5QN0oydUx1TGMvK2VZL1JCMUVHbkt6ZTV3QWVERGI4clVJdHA5?= =?utf-8?B?Qm1LQTJEWHAwcUNEWmVmK3gxSEhyOEpWejRWbWhYTzJQbnBsY01YSGxWNWpJ?= =?utf-8?B?UHNNQTYrQkEyczJZTWZ5R0RLeWtLZ0owbHp5UVNnNFBReG1EbnVlWnZnTXNm?= =?utf-8?B?M1ZlbXhzM3pYeTdZN2E5bWsrcnlMSjhUbXJtR1Zja1FKVGI3VFRwZmlyV2lr?= =?utf-8?B?OG01Q01HZWo5ZjBQamM0VG5SSFBtRk5LVHE1bDcwaytsZWhZRkJJUERqUzZ1?= =?utf-8?B?VDBsN1JIU0cxVDNlUExEbW9WODgwSUpsQXhOZ1Y3Q1NGMzUrYllHUDhmZ1hY?= =?utf-8?B?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orOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83a1a489-d0dd-4f1a-125e-08d9e68f49dc X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2022 21:02:14.4756 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VWN2Xa2v+DpUaED5Ic8EZieZ48/shaTWihivpR7dtkkbeHjTi4EXWL6JXYMv70gNoiAPiRL7TfJJQqZTs7mh1WnK6wuO2RiDCpDK5YD+czM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4014 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10246 signatures=673430 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202020115 X-Proofpoint-GUID: nROq2uTsuoonXRyxdE6f5u_3Yocyu5Uh X-Proofpoint-ORIG-GUID: nROq2uTsuoonXRyxdE6f5u_3Yocyu5Uh Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/18/22 1:12 PM, Eric W. Biederman wrote: > Mike Christie writes: > >> On 1/17/22 11:31 AM, Eric W. Biederman wrote: >>> Mike Christie writes: >>> >>>> On 12/22/21 12:24 PM, Eric W. Biederman wrote: >>>>> All I am certain of is that you need to set >>>>> "args->exit_signal = -1;". This prevents having to play games with >>>>> do_notify_parent. >>>> >>>> Hi Eric, >>>> >>>> I have all your review comments handled except this one. It's looking like it's >>>> more difficult than just setting the exit_signal=-1, so I wanted to check that >>>> I understood you. >>> >>> [snip problems with exit_signal = -1] >>> >>>> >>>> What do you think? >>> >>> I was wrong. I appear to have confused the thread and the non-thread >>> cases. >>> >>> Perhaps I meant "args->exit_signal = 0". That looks like >>> do_notify_parent won't send it, and thread_group_leader continues to do >>> the right thing. >> >> That doesn't work too. exit_notify will call do_notify_parent but >> our parent, qemu, does not ignore SIGCHILD so we will not drop >> down in into this chunk: >> >> psig = tsk->parent->sighand; >> spin_lock_irqsave(&psig->siglock, flags); >> if (!tsk->ptrace && sig == SIGCHLD && >> (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN || >> (psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) { >> >> do_notify_parent will return false and so autoreap in exit_notify will >> be false. > > Bah good point. We won't send the signal but you won't autoreap either. > > I think we could legitimately change this bit: > > /* > * Send with __send_signal as si_pid and si_uid are in the > * parent's namespaces. > */ > if (valid_signal(sig) && sig) > __send_signal(sig, &info, tsk->parent, PIDTYPE_TGID, false); > > To add: > else > /* We don't notify the parent so just autoreap */ > autoreap = true; > Hey, This works for me, but I think we might have issues where threads now get reaped too soon when they are being ptraced. I think I found a simple solution by just using kernel_wait in the vhost task code since I want to wait for the thread to exit when I'm removing a device already. I posted a patchset so you can check it out.