Re: [PATCH] net :mana : Add per-cpu stats for MANA device

2024-03-11 Thread Stephen Hemminger
On Sun, 10 Mar 2024 21:19:50 -0700 Shradha Gupta wrote: > On Fri, Mar 08, 2024 at 11:22:44AM -0800, Jakub Kicinski wrote: > > On Fri, 8 Mar 2024 18:51:58 + Haiyang Zhang wrote: > > > > Dynamic is a bit of an exaggeration, right? On a well-configured system > > > > each CPU should use a sing

Re: [PATCH] net :mana : Add per-cpu stats for MANA device

2024-03-11 Thread Jakub Kicinski
On Sun, 10 Mar 2024 21:19:50 -0700 Shradha Gupta wrote: > > Seems unlikely, but if it does work we should enable it for all > > devices, no driver by driver. > You mean, if the usecase seems valid we should try to extend the framework > mentioned by Rahul > (https://lore.kernel.org/lkml/20240307

[PATCH 0/5] Handle set_memory_XXcrypted() errors in Hyper-V

2024-03-11 Thread mhkelley58
From: Michael Kelley Shared (decrypted) pages should never be returned to the page allocator, lest future usage of the pages store data that should not be exposed to the host. They may also cause the guest to crash if the page is used in a way disallowed by HW (i.e. for executable code or as a pa

[PATCH v2 1/5] Drivers: hv: vmbus: Leak pages if set_memory_encrypted() fails

2024-03-11 Thread mhkelley58
From: Rick Edgecombe In CoCo VMs it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory

[PATCH v2 2/5] Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl

2024-03-11 Thread mhkelley58
From: Rick Edgecombe In CoCo VMs it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory

[PATCH v2 3/5] hv_netvsc: Don't free decrypted memory

2024-03-11 Thread mhkelley58
From: Rick Edgecombe In CoCo VMs it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory

[PATCH v2 4/5] uio_hv_generic: Don't free decrypted memory

2024-03-11 Thread mhkelley58
From: Rick Edgecombe In CoCo VMs it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory

[PATCH v2 5/5] Drivers: hv: vmbus: Don't free ring buffers that couldn't be re-encrypted

2024-03-11 Thread mhkelley58
From: Michael Kelley In CoCo VMs it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory

Re: [PATCH] net :mana : Add per-cpu stats for MANA device

2024-03-11 Thread Stephen Hemminger
On Mon, 11 Mar 2024 08:51:26 -0700 Jakub Kicinski wrote: > On Sun, 10 Mar 2024 21:19:50 -0700 Shradha Gupta wrote: > > > Seems unlikely, but if it does work we should enable it for all > > > devices, no driver by driver. > > You mean, if the usecase seems valid we should try to extend the fra

[PATCH 1/1] hv_balloon: Enable hot-add for memblock sizes > 128 Mbytes

2024-03-11 Thread mhkelley58
From: Michael Kelley The Hyper-V balloon driver supports hot-add of memory in addition to ballooning. Current code hot-adds in fixed size chunks of 128 Mbytes (fixed constant HA_CHUNK in the code). While this works in Hyper-V VMs with 64 Gbytes or less or memory where the Linux memblock size is

Re: [PATCH v2] mshyperv: Introduce hv_get_hypervisor_version function

2024-03-11 Thread Nuno Das Neves
On 3/7/2024 3:03 PM, Nuno Das Neves wrote: > Introduce x86_64 and arm64 functions to get the hypervisor version > information and store it in a structure for simpler parsing. > > Use the new function to get and parse the version at boot time. While at > it, move the printing code to hv_common_init

Re: [PATCH v2 1/5] Drivers: hv: vmbus: Leak pages if set_memory_encrypted() fails

2024-03-11 Thread Kuppuswamy Sathyanarayanan
Hi, On 3/11/24 9:15 AM, mhkelle...@gmail.com wrote: > From: Rick Edgecombe > > In CoCo VMs it is possible for the untrusted host to cause > set_memory_encrypted() or set_memory_decrypted() to fail such that an > error is returned and the resulting memory is shared. Callers need to > take care to

Re: [PATCH v2 2/5] Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl

2024-03-11 Thread Kuppuswamy Sathyanarayanan
On 3/11/24 9:15 AM, mhkelle...@gmail.com wrote: > From: Rick Edgecombe > > In CoCo VMs it is possible for the untrusted host to cause > set_memory_encrypted() or set_memory_decrypted() to fail such that an > error is returned and the resulting memory is shared. Callers need to > take care to han

Re: [PATCH v2 3/5] hv_netvsc: Don't free decrypted memory

2024-03-11 Thread Kuppuswamy Sathyanarayanan
On 3/11/24 9:15 AM, mhkelle...@gmail.com wrote: > From: Rick Edgecombe > > In CoCo VMs it is possible for the untrusted host to cause > set_memory_encrypted() or set_memory_decrypted() to fail such that an > error is returned and the resulting memory is shared. Callers need to > take care to han

Re: [PATCH v2 4/5] uio_hv_generic: Don't free decrypted memory

2024-03-11 Thread Kuppuswamy Sathyanarayanan
On 3/11/24 9:15 AM, mhkelle...@gmail.com wrote: > From: Rick Edgecombe > > In CoCo VMs it is possible for the untrusted host to cause > set_memory_encrypted() or set_memory_decrypted() to fail such that an > error is returned and the resulting memory is shared. Callers need to > take care to han

Re: [PATCH v2 2/5] Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl

2024-03-11 Thread Kuppuswamy Sathyanarayanan
On Mon, Mar 11, 2024 at 10:02 PM Kuppuswamy Sathyanarayanan wrote: > > > On 3/11/24 9:15 AM, mhkelle...@gmail.com wrote: > > From: Rick Edgecombe > > > > In CoCo VMs it is possible for the untrusted host to cause > > set_memory_encrypted() or set_memory_decrypted() to fail such that an > > error

RE: [PATCH v2 2/5] Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl

2024-03-11 Thread Michael Kelley
From: Kuppuswamy Sathyanarayanan > > On 3/11/24 9:15 AM, mhkelle...@gmail.com wrote: > > From: Rick Edgecombe > > > > In CoCo VMs it is possible for the untrusted host to cause > > set_memory_encrypted() or set_memory_decrypted() to fail such that an > > error is returned and the resulting memor