lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YvaGrD94Ttd8lGWi@nvidia.com>
Date:   Fri, 12 Aug 2022 13:58:20 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Alex Williamson <alex.williamson@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [GIT PULL] VFIO updates for v6.0-rc1 (part 2)

On Fri, Aug 12, 2022 at 09:35:34AM -0700, Linus Torvalds wrote:
> On Thu, Aug 11, 2022 at 2:36 PM Alex Williamson
> <alex.williamson@...hat.com> wrote:
> >
> >  - Rename vfio source file to more easily allow additional source
> >    files in the upcoming development cycles (Jason Gunthorpe)
> >
> > ----------------------------------------------------------------
> > Jason Gunthorpe (1):
> >       vfio: Move vfio.c to vfio_main.c
> >
> >  drivers/vfio/Makefile                | 2 ++
> >  drivers/vfio/{vfio.c => vfio_main.c} | 0
> 
> Guys, why do you do this ludicrously redundant file naming?
> 
> The directory is called "vfio".
> 
> Why is every file in it called "vfio_xyzzy.c"?

I think this is partly a historical artifact because each of the files
in the directory are compiling to actual kernel modules so the file
name has to have vfio_ in it to fit into the global module namespace.

Now, there is no reason I can see for all these files to be different
modules, but that is how it is, and because we have some module
parameters changing it is API breaking..

> So I've pulled this, since hey, "maintainer preference" and me not
> really having a lot of reason to *care*, but when I get this kind of
> pure rename pull request, I just have to pipe up about how silly and
> pointless the new name seems to be.

We can start to fix it up. I'm working on splitting that file up
further right now, so I will name the new ones container.c, group.c
and then we can resonably rename what is left as device.c - this would
logically match the object structure in the code at least.

Newer parts are already using non-prefix'd names:

$ ls drivers/vfio/pci/mlx5/
cmd.c  cmd.h  Kconfig  main.c  Makefile

> And if you don't use autocomplete, and actually type things out fully,
> doesn't that double redundant 'vtio' bother you even *more*?

Honestly, not really.. It is is just yet another tab in the bash
autocomplete, and vscode's filename searcher makes it irrelevant.

I'll watch out for it in future, eg I see I just merged
drivers/infiniband/hw/erdma/ and they used prefixes too.

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ