On 4/18/22 12:14, Borislav Petkov wrote:
On Mon, Apr 18, 2022 at 09:42:31AM -0700, Dionna Amalie Glaze wrote:What is the intended name of this driver? I see the following +static struct platform_driver snp_guest_driver = { + .remove = __exit_p(snp_guest_remove), + .driver = { + .name = "snp-guest", + }, +}; yet... +#define DEVICE_NAME "sev-guest" and + misc->minor = MISC_DYNAMIC_MINOR; + misc->name = DEVICE_NAME; + misc->fops = &snp_guest_fops;Gah, I have raised this in the past: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fr%2FYNxzJ2I3ZumTELLb%40zn.tnic&data=04%7C01%7Cthomas.lendacky%40amd.com%7Cb0af127a9aa44b85a23508da215ef064%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637858988899530603%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=p7S%2BjZjFODp%2BSg2z2SKZIKLgyy80roI3UQpCZ2Dc2t0%3D&reserved=0 but that aspect has veered off into the weeds. I *think* this should be called "sev-guest". Dov's driver which is mentioned in that thread, ended up being called efi_secret so I guess sev-guest. Tom?
The driver name is used when registering the driver in snp_init_platform_device() and isn't really referenced after that. The module name is sevguest.ko, while the device name ends up being /dev/sev-guest. All that really matters is the device name that is exposed to user space. But if we want things to match, then, yes, we can change the name that is used in arch/x86/kernel/sev.c and drivers/virt/coco/sevguest/sevguest.c to "sev-guest" if that works. Do you want the module name to also be sev-guest.ko? Thanks, Tom
![]() |