Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp223581pxa; Fri, 31 Jul 2020 10:17:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjhVv2TGJ3C/EaLrZ4qr3ueGSmMJg7tdnTA8LWp8Dlr6Ta8KuohhWNAxkNUVtw2HkhNaNP X-Received: by 2002:aa7:db10:: with SMTP id t16mr4663936eds.196.1596215843345; Fri, 31 Jul 2020 10:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596215843; cv=none; d=google.com; s=arc-20160816; b=iCQqIyR/Mw1oKqTRVQeKin7wobKMUQOO3+uf4yzwZromtVjZCndAVBoZNIPbGsjXyQ TT8xuQ/qz31zX9xvdnTWTzRphqf1fBN10qzfetAULGEYXSJSy2tO5gcR+3jscNn0BIq9 L+HqmRdaQtAogSoUpQPmux4druwP97MJgrK6IeuUGxAoNHJlOTyeaiSQNJ1q3WcdZ3yK 6rtGz9es2K4Rok4tzOuxSH8iIM8xnpo2VfJAvcf3TbEfoD1iYQO9OZI8/6eRGlUG8u1j dhL6cQbab/X4Tm+RIuxOic0Jjy7R9zIIcSCCxz9Mv9kImabtWFizO63K95KCjmoylN/f brfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=QLP5yum5fU8UgsIzhvQlNIqfGdJsDfckQfn3DAzacW8=; b=UgjSnNMv/5Ju9DQOW++VHt8jXX9saNeADOkPKE8kC4ZkRYxowh6MSvxiJH3tAjL9zd AVM/WZ/BbcEK+ruq4RJYDzxzgQfyQZwGthHeY+mVLSmGBTWTvcBcUtR6BgddQ+eLfSGC NWsHbNrZnR5S3CbUyU+Z/tpAS/Ha97RTjo0EqCuxv2HLLxC90GN5BxTLTle/mfr9sSBr ScLt7DykR5RxS7UAVrxILL5YPfwnDZ5jeYvsZtL+DkxeLSxoEtjldg4jDD86suEIFfgP 32beGAJ1kODtKCm4BbZY1+PiiXgzFvC+VuwaBckHx1G+0rdG4CLK6lVzIIhaj4n4vac6 lTlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=mmal8FRz; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si5314521edm.469.2020.07.31.10.17.01; Fri, 31 Jul 2020 10:17:23 -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=@oracle.com header.s=corp-2020-01-29 header.b=mmal8FRz; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387608AbgGaRQe (ORCPT + 99 others); Fri, 31 Jul 2020 13:16:34 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:59464 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387580AbgGaRQb (ORCPT ); Fri, 31 Jul 2020 13:16:31 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06VHBvmu156609; Fri, 31 Jul 2020 17:15:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=QLP5yum5fU8UgsIzhvQlNIqfGdJsDfckQfn3DAzacW8=; b=mmal8FRzyoj+O8X9csReBhlK93p5+cMh/ETJ0OUmlvwnyInxLy+PDCUxfNp7SWT751Lz wPFJZcEJb3ERLInaZIpcUlN3mgHrEILwqs8rAPYpjJLcAlq4bh9+OW6LOwIk4zNMEB84 hEofFiwTosRxp1RQZJV0f+9lAddx2h3vS6a4SlKHw5oum+g/sh5/KedgUE0YrS3/GXf0 Suhh4XB77kYufFl/+ZFn8CGMPkV3XqrkpTKaRMPdMYp4doN88E862Ka1ATMXw20FKtV/ +cog0eAkaVh1d9pc3uk56Akc7KQavBGp0fBcuauoBxwrK3pRyujlNJq62QmDEptEqyYm 3g== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 32mf702hp7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 Jul 2020 17:15:50 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06VHCsS3048730; Fri, 31 Jul 2020 17:15:50 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 32hu6064n3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jul 2020 17:15:49 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 06VHFc2P019306; Fri, 31 Jul 2020 17:15:38 GMT Received: from [10.39.235.87] (/10.39.235.87) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 31 Jul 2020 10:15:38 -0700 Subject: Re: [RFC PATCH 0/5] madvise MADV_DOEXEC To: Jason Gunthorpe Cc: Matthew Wilcox , "Eric W. Biederman" , Anthony Yznaga , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, mhocko@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, arnd@arndb.de, keescook@chromium.org, gerg@linux-m68k.org, ktkhai@virtuozzo.com, christian.brauner@ubuntu.com, peterz@infradead.org, esyr@redhat.com, christian@kellner.me, areber@redhat.com, cyphar@cyphar.com References: <20200730152250.GG23808@casper.infradead.org> <20200730171251.GI23808@casper.infradead.org> <63a7404c-e4f6-a82e-257b-217585b0277f@oracle.com> <20200730174956.GK23808@casper.infradead.org> <87y2n03brx.fsf@x220.int.ebiederm.org> <689d6348-6029-5396-8de7-a26bc3c017e5@oracle.com> <20200731152736.GP23808@casper.infradead.org> <9ba26063-0098-e796-9431-8c1d0c076ffc@oracle.com> <20200731165649.GG24045@ziepe.ca> From: Steven Sistare Organization: Oracle Corporation Message-ID: <71ddd3c1-bb59-3e63-e137-99b88ace454d@oracle.com> Date: Fri, 31 Jul 2020 13:15:34 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200731165649.GG24045@ziepe.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9699 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxscore=0 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310129 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9699 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 suspectscore=0 spamscore=0 impostorscore=0 clxscore=1015 phishscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310129 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/31/2020 12:56 PM, Jason Gunthorpe wrote: > On Fri, Jul 31, 2020 at 12:11:52PM -0400, Steven Sistare wrote: >>> Your preservation-across-exec use-case might or might not need the >>> VMA to be mapped at the same address. >> >> It does. qemu registers memory with vfio which remembers the va's in kernel >> metadata for the device. > > Once the memory is registered with vfio the VA doesn't matter, vfio > will keep the iommu pointing at the same physical pages no matter > where they are mapped. Yes, but there are other code paths that compute and use offsets between va and the base va. Mapping at a different va in the new process breaks vfio; I have tried it. - Steve