From patchwork Wed Dec 1 09:42:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12649625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C508C433F5 for ; Wed, 1 Dec 2021 09:43:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.235751.408948 (Exim 4.92) (envelope-from ) id 1msM8R-0003jP-42; Wed, 01 Dec 2021 09:42:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 235751.408948; Wed, 01 Dec 2021 09:42:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1msM8R-0003jI-0f; Wed, 01 Dec 2021 09:42:43 +0000 Received: by outflank-mailman (input) for mailman id 235751; Wed, 01 Dec 2021 09:42:41 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1msM8P-0003j4-KW for xen-devel@lists.xenproject.org; Wed, 01 Dec 2021 09:42:41 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0686af80-528b-11ec-976b-d102b41d0961; Wed, 01 Dec 2021 10:42:40 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2110.outbound.protection.outlook.com [104.47.17.110]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-28-t941qyhqN5yhiYhLe5q79Q-1; Wed, 01 Dec 2021 10:42:39 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB5598.eurprd04.prod.outlook.com (2603:10a6:803:e9::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Wed, 1 Dec 2021 09:42:38 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::5951:a489:1cf0:19fe]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::5951:a489:1cf0:19fe%5]) with mapi id 15.20.4734.024; Wed, 1 Dec 2021 09:42:37 +0000 Received: from [10.156.60.236] (37.24.206.209) by AS9PR06CA0180.eurprd06.prod.outlook.com (2603:10a6:20b:45c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22 via Frontend Transport; Wed, 1 Dec 2021 09:42:37 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0686af80-528b-11ec-976b-d102b41d0961 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1638351760; 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=yCxKdOv38xfLsrtBhC68T2KY7VJQHeYtb/l3qTS1wqQ=; b=AFswq5f2MApeqBz8RKrPYv8wqIFThtqZQStl0hXrup1+ULwuNgnPaR+wO2QEgG9bOzPvYO iIvmiP77Ldl5rXJORz6/KVLJ0S8q7BhwWNjlgr0f9ezOI90Ebufgdyivl2BhHnXy+N2S7i pIdjyQxy0Jcpitp0nLM5ICQpNfm2ssI= X-MC-Unique: t941qyhqN5yhiYhLe5q79Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A1vCqNXhxuJy11f+B+U5t1B/YsF3LFMrnvY1mCw3ESIDUzJSYlbmylwqxICqZ0tsKzeqeZCGZ4Z9+ot/nNEqo7xrxG6MavhNSEF7fUAifiBEcwMRXeM+mKm2DwFGl6B9Tg/3YGoztdSq2nCdH5BtmH799rvCqbzFSEXfJm1Y14O9Vwqsl2rDkpy/muaVfh3eiXr5aBrTXXAXWSBviHN/ql7m2CbFP9rasXUHMsYJ+SGAzFb1+NgtxtT37dBrtH3Gn/YNVufKHDaLh5Eg90uLrzDrryzKz73Mu4wcjRg9H6+AqOnYjgTJShX7GA4XIfdOJFQNoF33VkJmpvdbXCr8RA== 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=yCxKdOv38xfLsrtBhC68T2KY7VJQHeYtb/l3qTS1wqQ=; b=fOC+V8VD3lwTebnBrLtgPkNWRDMoywZJFKwty34wmbeXI9wZAA1NkjVqZ+yp5M/i9sMySYkJ+vqAYMhbCLig3ny2SWvtHcE84RY42EwG4lrdxOwxOU+FlCDVBWM0scJZPvgz167iyG8w2RldFgZCn5KfY2X6asDXf1boQA4Rjqw4gyLPCQMEOtvgV1bCaaUbH/faELEc6GOgiJTyEZhwJtWNt46pzWe/a+uviTvQwTETeSlt7hqPYtABPIrwFv3mQzQZLVLSU7ery0dv55WZnMTa2pHjY6z1kOGJbsoeHB02g08wumPc67gfYll3BGiVX1vSoqm0PV//GvjsYNGE5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Wed, 1 Dec 2021 10:42:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: [PATCH 4/4] libxc: correct bounce direction in xc_get_device_group() Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Paul Durrant , Ian Jackson , Wei Liu , Juergen Gross References: <5d72c629-fabf-3d40-aa19-d177826fdde5@suse.com> In-Reply-To: <5d72c629-fabf-3d40-aa19-d177826fdde5@suse.com> X-ClientProxiedBy: AS9PR06CA0180.eurprd06.prod.outlook.com (2603:10a6:20b:45c::27) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fd771e5-7128-4bb5-294f-08d9b4aee90e X-MS-TrafficTypeDiagnostic: VI1PR04MB5598: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JOKdXrSKNWj89xesVVK+HwIBQC1AR5KXsCBIODEjcjcH8L5Xu/rKG7+aPSBr+QVXH1JZQGus8nqlp7L0ywd3V/vlnnzCw3yMwKeTPLoSuN8QXa5uWhWIMtXTfO9z4el7CgVigrY6Sg8dB9SxLsHZirio6KJ7pOqOudz4+rZZaTnAhT/Ei1kADK6X0xBDBW9tnEN5g2glawh92hkblfHxATQ+AjWdRfaUBPwYgNMWtGWqsMBYhkbyUMTf14Z5etzZxbWMggoNLLeVp8tCEBSjC0qL92N8+pNek52QhA+ZqMl3+udZiXVN7kw0ipObigsr3kED3dylq6y8iE7L+RuJSwhqkGQo0907Rd/+hCHar8Rl1MwCtr2Tzr2/ek53wqrSzQxau0FEmggiy0UUFpnnX6D6DphiFydfNyoqkSHCXOjVGToWzN10Pk/CDXU4xUjyJQuCeUJjbClrKnvDCll52PYi+a4DB27cK5M86Xp+4bgwRvG1x1c4NPJzwgpmH9jxi2DGe3NqqjrroKOlT3Cvz36AEhcpB0kn8dSpdaji33GlRlL+Cn3mDOPTEG2vvFgItYL/PVy8lGNLOor4DLOf2hDgfxU+bq/+amUkZhHFkrVfXbkTL/UrV6DdPbRY6U7c7BeoL6E6yPdAHq7Ral2gsBGv1KVLI3i5c2bVjg+DTMyM/L3vTgVAdJM6mDfKsAHVHmm1gnU6dSCl7eBnNa2h417Kri7qqYOX/VTBvZ4JiMo/wdITI+P3+oD+FMge4oPP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(2616005)(6916009)(86362001)(31696002)(4744005)(6486002)(38100700002)(54906003)(508600001)(956004)(4326008)(5660300002)(26005)(107886003)(8936002)(66556008)(66946007)(8676002)(31686004)(36756003)(186003)(16576012)(66476007)(2906002)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CYnJF/hruCCsI8sYiBHngQH5MEe9?= =?utf-8?q?eQNT+G/GzuUXZ2uUVUKhIWtDSnUdjRO8BzwxPsVYv3wLTsscj3l3wHAtYcvjEVKpU?= =?utf-8?q?j5mKCCOpRjprr0hu7ZNPr6OK7+ZmOa4YdRlibFqUx+t6fT1Lo4Lg4ch0OexY0pEOp?= =?utf-8?q?LZZUiayZEWgX1FsaooIcRHyZgLcRsuLVwWE7k66k2Q5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gGb8BO8wpAqhZD2hMs?= =?utf-8?q?wBE4oW3GRYPj4y0fuxNDxuiB+BpCaBlCQBPxekM9Pd+Vq9vL8EWKAQndbqGx/Ya/R?= =?utf-8?q?Fmo6q6oJcezo1OD58aPFCsZt5f2I6SLoLmCiSjvJgYRr3gXHOQx7OVOAQHc83z4/o?= =?utf-8?q?AgN7loWbbRVS0kFyn7VeSZIeUqBPpjdli7KbE4v1QIM0tfohWpX9GEb/+HKGSa0ja?= =?utf-8?q?/owGeDKnisTsGyzzKKF8DWd2SY9rcNgTlWTBTJnzI74IgSzvsWNVd9jwRFPzwdYHI?= =?utf-8?q?l0JhPjFlTFAUxKttVs9H2u9pfXuNSohsOvHyzaQ3HTLo7Nxxnb6a07+k6UfWyh6dB?= =?utf-8?q?6jTILX5Yubvg1u9QshHKEFchMzd8dIBRY2UPHCsQSL/T0J06Ep3gve7IbC5/2UwwM?= =?utf-8?q?ctJoZbFVrikwDLW27TuMnC5B8dvVgKADqpFl1/j1tACpu1+2SajeDJ+RfFJmFVtCj?= =?utf-8?q?um2pHFtAMmqhP4WOn+8KX0PechsoqlpsnqYeh8iz6FnrSG6suB4eL84=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fd771e5-7128-4bb5-294f-08d9b4aee90e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2021 09:42:37.8383 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IGRmUrEbscc16rKpbJKVNAKJmKOOeYvoadll8FfiVuepf/OxNTuD8NreqB7JXp+qKwqq/o4dlPtPmRm2TdEdrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5598 The array of IDs is an output. Fixes: 79647c5bc9c6 ("libxc: convert domctl interfaces over to hypercall buffers") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross --- Clearly the function, including its Python wrapper, cannot have been used by anything for many years. I wonder whether that isn't good enough a reason to sanitize the layout of the array elements: Right now they have BDF in bits 8...23, when conventionally this would be bits 0...15. --- a/tools/libs/ctrl/xc_domain.c +++ b/tools/libs/ctrl/xc_domain.c @@ -1546,7 +1546,8 @@ int xc_get_device_group( { int rc; DECLARE_DOMCTL; - DECLARE_HYPERCALL_BOUNCE(sdev_array, max_sdevs * sizeof(*sdev_array), XC_HYPERCALL_BUFFER_BOUNCE_IN); + DECLARE_HYPERCALL_BOUNCE(sdev_array, max_sdevs * sizeof(*sdev_array), + XC_HYPERCALL_BUFFER_BOUNCE_OUT); if ( xc_hypercall_bounce_pre(xch, sdev_array) ) {