Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp48817pxf; Wed, 24 Mar 2021 20:36:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF3oJ9Bmshy2Odhb4+QnvqKVzfUrGm3b1sEmiX9K4gK5fwzPtHAuGenEoZrrP+A4kiuWY5 X-Received: by 2002:a17:906:4d85:: with SMTP id s5mr7075788eju.43.1616643387783; Wed, 24 Mar 2021 20:36:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1616643387; cv=pass; d=google.com; s=arc-20160816; b=wQAiY+KqJd9LlUWuf+lDJnb3jq/MSJSbjQeiCnHKJEyOih+ZGSk/88oj5tB4KWgg8M KQrbq7oxa4fnwkwRk8Dz2ug7RIvZHU3COM8+WLU2dm8FP+Zj1gKyVh95XghV+dTdJmoS RMW/CfA+5B7EYu5+g2L+SGchnPYebyiWAasx1zFBARcCiyEruf9BNv0kVJlwThrM4YFi r/IxoekbmXu0PzDV3Lo7TpsTAr9xgDX1EZG9Fenb9ybNKuGkuXZI36ibUkyREIrMr6tT XOmcphn82SOd++UdpPxKt4q4EbhqmVyoZr+ZkUva8klsfcWYFK1uyjLKOcpd6Mu8O5EH xZZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-language :content-transfer-encoding:in-reply-to:user-agent:date:message-id :from:references:cc:to:subject:dkim-signature:dkim-signature; bh=Io2lAihE3mQOuQ7rki9suM4viVm/JFb91YPnIilRCI8=; b=QZq9cUdRvJIUsxtfTgCTRtay+lDDiBH0xZkzLnjKY8w2hIxrNFlfYT1b/oLk6+E9lt BkiLxTJh5b+rjLlzXA3CbPCP2r+veZUBOUOB8PBv6abB6bSF9vWnOC1kVDL7k9ah3TY5 piYZABgXV6sc2ICACOsxPu4bJZkSAK8niqGScYG94meKbdupiKKBio/s5OKd59MCe594 ohJcb58FQYOVnQMewOXJhZMIavnubuzkSJGT/JHwSujR0FmEkXgQqe2oQqphQ0/uy4HG 2V/JGMqXcm2y1tmkG3gZbLsQP1dzciDJmU09RzxmU9vZsFaUNnsSVqGN/s9oHSw+qdPZ Bdnw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=Py5k8o6l; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ha9MghV2; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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 f2si3165285edn.109.2021.03.24.20.36.04; Wed, 24 Mar 2021 20:36:27 -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=Py5k8o6l; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ha9MghV2; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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 S238956AbhCXXKR (ORCPT + 99 others); Wed, 24 Mar 2021 19:10:17 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:48828 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234723AbhCXXKM (ORCPT ); Wed, 24 Mar 2021 19:10:12 -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 12ONA2xb038970; Wed, 24 Mar 2021 23:10:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=Io2lAihE3mQOuQ7rki9suM4viVm/JFb91YPnIilRCI8=; b=Py5k8o6l/pgPCAR7DEx9bYMqNKJOuzBB1gOZ3ig9hdVpySreWYt/U5TGwpZ5H190seEM JO2n8iivHCmv5b+Vbkk2Z17KP5lopNMJMK/pK4rTah9UqBZbKeTfQ221sQCMERa6mgJL 7sH0Z+S0AY6PUJE1qGOTq4ujfcMyv610Co0OvMtOrOJh4dqzk6TqeaOsUDgKNwkwlDzv NYOxFBRLfRz8Peg0jhZ4pymWUnBtzS9vP318eiqgEwtFeXYuS0F8R8QXetmbrObxE598 +aNf2MroNep2X7w3HtX70bk2WHesjj01dLKe/d2SCFTq1ZR3nABni5tYG6XPPsH7DXDe Jw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 37d9pn4g4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Mar 2021 23:10:02 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12ON4tsp155571; Wed, 24 Mar 2021 23:09:57 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2174.outbound.protection.outlook.com [104.47.56.174]) by userp3030.oracle.com with ESMTP id 37du00fc8h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Mar 2021 23:09:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BcTG725W8jhbRDeKi+s7n2vqKNSEmb1l3VYfTnaKMr9BksxkE9jxabsdo9tfLeFUYrsqGDIGE8YXnRT44jcL8/xJvF9RNWKGMbcEkQ7Vpe8oXGm33oz4xrVee3f/SLJZWPjPCs8UNCWNkF2h8KmMhFaGjh/lZvleI/91xgEBFspvL2JOYQa4e3gwNew60jIhrrjcWsLfmDwanOYdHH/y2iA4L8qt/8xdOhjz4g28AH+Hk7hI0RbMsnpUmMvuJPlJz80D2hLv2FYZZIrh60AZWNEBv1cuvlQsv0J9vrWR0+FW+YfoDQ0ZVC94lHX3TennUIaRMyt24KLvXkANjbIEog== 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=Io2lAihE3mQOuQ7rki9suM4viVm/JFb91YPnIilRCI8=; b=JRLDFR2UguDD5VfbX/PBw4YtNpt3x/EUyByI3GNGVJQGiwlOCVIUfBsvoAWntb1XvreE+1wlAaIwfAM/5gYEBod4COFJ45AiUbGTdCuggqZbS8OsrJ09AUy2KKAIk2DJ535FAvFBGoLKwTUnDzY+Zd7tfBjKgIO3DhDwNvqGhrEpHea6OMAZxJusxYOVfRoV8hR1mR+5b2I3N5v2fXuRwwxO3Q81Fwj77XVZWFcOkbB66ykzNg5NUNYmgZx+/ufixRDVgH9pxJzVv+W8+arD5nW61kG4HBs5uyWAKYAuCUyGsTFEf+SWdQbt/WJ+r6h/Qo8qOgAaKQW1se9/kBPlKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; 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=Io2lAihE3mQOuQ7rki9suM4viVm/JFb91YPnIilRCI8=; b=Ha9MghV2NBbBh9wQGSI4JQ9+HHEoIppGIzHImk0iThVRoG6FG7PScBDbBVnx+tidiaRC7nYDmljIKn8/6GRkvz3GCa0SBxX/vZLOGmH7DcUghggDg207AzkG6jrQXUtyTwSyxHaRubwJ48YxO9iUpsQzIeThkTuC6TA06Sqqw8M= Authentication-Results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=oracle.com; Received: from BYAPR10MB3288.namprd10.prod.outlook.com (2603:10b6:a03:156::21) by BYAPR10MB2632.namprd10.prod.outlook.com (2603:10b6:a02:b2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.23; Wed, 24 Mar 2021 23:09:55 +0000 Received: from BYAPR10MB3288.namprd10.prod.outlook.com ([fe80::f489:4e25:63e0:c721]) by BYAPR10MB3288.namprd10.prod.outlook.com ([fe80::f489:4e25:63e0:c721%7]) with mapi id 15.20.3977.025; Wed, 24 Mar 2021 23:09:55 +0000 Subject: Re: [PATCH v2 0/2] xen/x86: alternative fix for XSA-369 To: Roger Pau Monne , linux-kernel@vger.kernel.org Cc: Juergen Gross , Stefano Stabellini , Jan Beulich , xen-devel@lists.xenproject.org References: <20210324122424.58685-1-roger.pau@citrix.com> From: Boris Ostrovsky Message-ID: <6b70700e-667b-03a7-8f5e-937d5c45c79d@oracle.com> Date: Wed, 24 Mar 2021 19:09:51 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 In-Reply-To: <20210324122424.58685-1-roger.pau@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [138.3.201.40] X-ClientProxiedBy: BYAPR08CA0053.namprd08.prod.outlook.com (2603:10b6:a03:117::30) To BYAPR10MB3288.namprd10.prod.outlook.com (2603:10b6:a03:156::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.74.100.232] (138.3.201.40) by BYAPR08CA0053.namprd08.prod.outlook.com (2603:10b6:a03:117::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Wed, 24 Mar 2021 23:09:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba059265-bd32-4aec-fb63-08d8ef19efd2 X-MS-TrafficTypeDiagnostic: BYAPR10MB2632: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ckQb0z20JdOZYGvomBOSsv1UDlYotxz6NLc7tQKpsJQ+P1MrejO8LFokvU+39nELzUV0jz0lUR+Fot4sL/CbN2WteKe9Ldo5H8yOywoyxyTk2lMIMfSGByJavwiwZSm5DkiKo3vEbLl8AGCzeL05UgFwPOZ7O5mddF+lwRmRGEdzzAbd59N5Syoe7PAZc/m0ZkzP7q1Vuke9MUkVAEnFvpghSkmGy0N5VNy3VqfXMULTlK71Cbp7smJjXuUKVYNjyUQ+uS0dQcKiamTm2pP4AeEH1tEj9euiDBnUUhg4ql99twELCkDeKBEGbqJNMZfH40LNaPzE9BBzrpTXGZfzJWM5uwRmqnyyPcZwmxIBrdYASSob6CthaqpKlzPTUHGc5HuAisQuAJsMfo8W9rk2mVjP86gGTE0wSw7uaOVbIwvp198Pyui9bG6q+vGGMMFTwOvWGSE6sLt0bX4AG8jzMuwLqXsT63OEydylbXoZIRig+byucEVyw5XEPcfpWfqrycxFQBNWh/WL/l0ZfrQmm2ZRqDA1CaAkDHFjUIiQOpbDymBPW9LzSlXZ9xh1On6EhFfA3XyxUlmBh5PR6mCsDlqQp2+ZcnneD9HdFOmhHZhNviTFFGUojwQptvFHUPkAGvh82BLoIuaeWMIjhoG+2OG6LHFpweQDiR52LkPoXPKyblyF00B3qw4Xt+QMwC0V6rqPC0ZOZlI9yyhRGDgAgk1HtIlllh5ayHGheS0dXf0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB3288.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(376002)(346002)(39860400002)(136003)(366004)(2616005)(956004)(8936002)(44832011)(478600001)(8676002)(38100700001)(5660300002)(2906002)(53546011)(54906003)(16576012)(16526019)(86362001)(36756003)(66556008)(31686004)(316002)(4326008)(6486002)(83380400001)(31696002)(186003)(26005)(66946007)(66476007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?Lys2RGZSZFFuUTdNQ21uL255Z3hVeDk0eVZlM3IyNVBCaDBNcDJKMC8rUGlW?= =?utf-8?B?SVJhTkJ0bjJRMkRKUng1bS95ZGV1UkllUHhGTlI1akc5SGd6RVNnYlpVZFFO?= =?utf-8?B?MkIrTGZkSHBWRlpRUlFINE51RGlWL1FZT3hBQThQSUhsZkswT0UwQVZvMTNR?= =?utf-8?B?dFdUUlhvQ21kekFiTk9MZm1lcVc2SFZ2RXdkaTNQaXJyQjczdnVibXczZFRs?= =?utf-8?B?Z3NLNSt5dHQ3QkZPdGJjd0FydEFZRjI1UDF1VCtHT2pldGN3SW9aR1Y5cys2?= =?utf-8?B?VTlpOStUalNaM3ppL0d3dS9SYnBIdHZEeDcwa3JFME5KclpVbzZpZTFvTVAr?= =?utf-8?B?eFdJQTlBdWpOWmF0cXE1Tm5UUjA3SElxb3pUb21QcE92K2tjdzBxS25VNHpv?= =?utf-8?B?Qm4vUTVxdmFHL1pXVEovVWorbFJZZmlmRlF2MXl1RFhxZ0dkR2ZZUGZKUFpa?= =?utf-8?B?MEpaRHVOMVpkcTlaVWY1VXpy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NDJMUjloT2lHUVNiZjJTZWFnR01wVUVpRGw5anhFeTg2cTIw?= =?utf-8?B?aHVRVTd6T0V0elpuYSs1NW5UeWdNM2Y3MDRUMWRQcjFqZDg4dnV1ZmlnZS90?= =?utf-8?B?aEpPc1piOTExSkIwYThDWXNnei9uWEN5TFhBd1k5ZExqN2xRWnA5WTlaSUpL?= =?utf-8?B?ejFPZ002ajB1WEhLWUg3N0Y2cjA5WmxZOXgwUi8ySmhkRC9xbGpzZExGL0th?= =?utf-8?B?cWhBN3Q5OVo0T0ZHUGJoZEFkUm9SNzZHNmZxZzAwNlFXZ0UweldiT3g5RVk1?= =?utf-8?B?SXA3NTc4T3F5eVBoNU5GK1hjbitkdFJaa0dycEpHLzdoQmVYY2U4NVc3Tm5J?= =?utf-8?Q?vq5BG4J4X7F3IZ+gCCzy9bbprgJT1BM+LG8NvfF?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba059265-bd32-4aec-fb63-08d8ef19efd2 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3288.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2021 23:09:55.1036 (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: +bdPrtrKXm83xqWLSEvJxX57gmUUNJd+NYprHYbVupfqGXA44wpZ5J2NiLNpnCdhKpztHM/guuY9ZlsniF18ep+qWpYomUlHRdlFDt9fYd4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2632 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9933 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103240166 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9933 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 bulkscore=0 spamscore=0 adultscore=0 clxscore=1015 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103240167 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/24/21 8:24 AM, Roger Pau Monne wrote: > Hello, > > This is a proposal for an alternative fix for XSA-369 that instead of > special casing XEN_UNPOPULATED_ALLOC to size the p2m relies on making > XEN_BALLOON_MEMORY_HOTPLUG_LIMIT depend on the generic MEMORY_HOTPLUG > option rather than XEN_BALLOON_MEMORY_HOTPLUG. > > I think this is safer, as we don't want to be special casing any option > that pulls in generic MEMORY_HOTPLUG without XEN_BALLOON_MEMORY_HOTPLUG. > Without this we would also need to at least special case ZONE_DEVICE > which also relies on MEMORY_HOTPLUG, and is what pulls the generic > MEMORY_HOTPLUG option even when XEN_BALLOON_MEMORY_HOTPLUG is disabled > with XEN_UNPOPULATED_ALLOC. > > Thanks, Roger. > > Roger Pau Monne (2): > xen/x86: make XEN_BALLOON_MEMORY_HOTPLUG_LIMIT depend on > MEMORY_HOTPLUG > Revert "xen: fix p2m size in dom0 for disabled memory hotplug case" > > arch/x86/include/asm/xen/page.h | 12 ------------ > arch/x86/xen/p2m.c | 7 ++----- > arch/x86/xen/setup.c | 16 ++++++++++++++-- > drivers/xen/Kconfig | 4 ++-- > 4 files changed, 18 insertions(+), 21 deletions(-) Reviewed-by: Boris Ostrovsky