[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add UseConsole parameter to disable default console
- To: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Owen Smith <owen.smith@xxxxxxxxxx>
- Date: Mon, 26 Oct 2026 10:58:34 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=znIbBGHBgDwUytaiJ3SHnJRt4/DzohB+klpoYXvIh6I=; b=l5rsbTRCrL6YPEL2IORnCJshBe7nn5T7txOsaQ5MhRYx97SKtLhs2PD19e83IUxFEKYXUazuaUi1MlhG8e+3cVkImV1BR46v9lLHwpgzdV8lpAHA8cOFvyalNMbfgBBhfjdT6zvjfgwc0KB5U75r9L6wBvmDkqXBRYSE1Nti6+EpYJdoQO8zNn4DSIHoyoYxOCtQSkSOnAX0su3PyFnyDcUdDMs1WAq6rZ+z3RVir95iSitY/qGB54c1ioQL8626eD1pOZMDkjQEByvktWB1Rni+AFEQPKb9it24nAMcuK/WntvyrMBRHilfr92qs9+PnmT/bntOiE0MbyKsXaEF8A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lYf19pgobl76ombLolwbb5qDlAQDqvDuV/Xt2eGoO2wn4WL4QY/E5ax04AwGmIGMY98l6CTCPt5MYPg6VYFouY4HnmYbaFVBcMQaH/MoZa9xlNHri+kgOGLY6JZqE7KMXePJhZIQQbO8XOqYNBmvg0qyoAmP4geAf8sasqKDdNdezlqeo4q1X6DkOIalJ0Exb+X5RE6njVq5HirelYV/E+yf4VYDqoW0He6BPp4orj1EmI/CSN5D0tZ+CMcTd0d/t4M/rjyWaXrhtYXpwcTI8WdP8ZdMDARWO1IT+jXEyExBqFyHDj4q8DwbgpaqJ0bzy9sr7vjdyxE36yBrkB8/Hw==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
- Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Delivery-date: Mon, 26 Oct 2026 10:58:41 +0000
- List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
- Msip_labels:
- Thread-index: AQHdZRdnsgXsHTe+9UuY0/QI3ZURircPmdnogAAEloCAAAE2moAABzkAgAAAUCg=
- Thread-topic: [PATCH] Add UseConsole parameter to disable default console
On 26/10/2026 11:43, Owen Smith wrote:
>
>> On 26/10/2026 11:15, Owen Smith wrote:
>>> By setting "UseConsole" = 1, the default console (and CONSOLE) interface
>>> will fail.
>>> The default console's PDO will still be created, but any attempt to call
>>> CreateFile will
>>> fail, so I'd assume any alternate use would need to manage the default
>>> console ring
>>> itself. Non-default console's PDOs are unaffected.
>>>
>>
>> My idea is to totally prevent xenbus and others from touching the
>> default console ring and leave the console ring's usage to some other
>> applications. That seemed simpler than swallowing read/write requests at
>> first glance.
>>
>> From my testing, it looks like I can still open handles to the default
>> console PDO XENCONS\VEN_XN&DEV_CONSOLE\0 (e.g. Get-NtFile -Access
>> ReadData,WriteData,Synchronize -ShareMode Delete \Device\...). Although
>> I haven't tested this point further.
>>
>
> PdoDispatchCreate calls the console's ABI Open, which does not directly call
> the CONSOLE(Acquire) interface, so the PDO can be opened (I missed this)
> The default console's StreamWorker thread will attempt to acquire the console
> interface and fail, skipping any attempt to drive the default console ring.
> StreamPutQueue will allow IRPs to be queued, but nothing will pop them until
> they are cancelled.
>
I can error handling for StreamWorker to simply error out during
read/writes. What do you think?
> Owen
>
A 'enabled' flag in XENCONS_STREAM, set in the worker, and checked before
StreamPutQueue queues the IRP should be sufficient.
Owen
Xenbus change here: Reviewed-by: Owen Smith <owen.smith@xxxxxxxxxx>
|