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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQ47bZpE6c6Yoz-jQS78uU611oZwU8bH+7e=p5zSyADJw@mail.gmail.com>
Date: Tue, 2 Jul 2024 18:15:20 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
Cc: "nicolas@...sle.eu" <nicolas@...sle.eu>, "conor@...nel.org" <conor@...nel.org>, 
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>, "robh@...nel.org" <robh@...nel.org>, 
	"linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "krzk@...nel.org" <krzk@...nel.org>
Subject: Re: [PATCH v2 4/4] kbuild: use $(src) instead of $(srctree)/$(src)
 for source directory

On Sat, Jun 29, 2024 at 7:54 AM Edgecombe, Rick P
<rick.p.edgecombe@...el.com> wrote:
>
> On Fri, 2024-06-28 at 14:23 -0700, Rick Edgecombe wrote:
> > On Fri, 2024-06-28 at 11:13 +0900, Masahiro Yamada wrote:
> > > There are two solutions, depending on what you want to achieve.
> > >
> > > The official way is to pass the absolute path to M=
> > > (or relative path to ../linux-tdm-kvm-out)
> > >
> > > The other unofficial way is to pass VPATH.
> > > The external module build does not officially support
> > > the separate output directory, but you can still
> > > do it in this case.
> > >
> > > [1] will work like before.
> >
> > The absolute path worked, but why not make it use the relative path by default
> > in this case? "arch/x86/kvm/" shouldn't be confused with an absolute path...
>
> Argh, I missed that make ARCH=x86_64 O=../linux-tdx-kvm-out/ -j36 M=$(realpath
> arch/x86/kvm) will output the the source tree instead of the output directory.
>
> So there is no official way to build just a module to the output directory?


You already know how to do it:

#I'm guess it has something to do with the "M=" option because:
#make ARCH=x86_64 O=../linux-tdx-kvm-out/ -j36 arch/x86/kvm/kvm.ko
#arch/x86/kvm/kvm-intel.ko
#
#...works.




> And
> it just accidentally worked all these years? IMO it's a nice feature to have.
> I've especially found it useful when doing virtualization development where you
> need to build/test guest and host kernels as the same time.
>
> Or was it just now delegated to unofficial support after this patch?


No.
The M= option is intended for building external modules.
You just abused it to build the upstream modules.

Kbuild has never supported building external modules in a separate
output directory.


"delegated to unofficial support" is a wrong statement,
as it has never officially supported in the past.


Your way is a workaround that people found happened to work.






-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ