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] [day] [month] [year] [list]
Message-ID: <ft72yuyrztnlptk5muuypdcatm7ugiys6sbvjhxruszat5e22o@kv7jrgphxg2v>
Date: Sat, 24 Aug 2024 09:56:43 -0600
From: Jose Fernandez <jose.fernandez@...ux.dev>
To: Nicolas Schier <nicolas@...sle.eu>
Cc: Thomas Weißschuh <linux@...ssschuh.net>, 
	Christian Heusel <christian@...sel.eu>, Nathan Chancellor <nathan@...nel.org>, 
	Masahiro Yamada <masahiroy@...nel.org>, Peter Jung <ptr1337@...hyos.org>, linux-kbuild@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kbuild: add debug package to pacman PKGBUILD

On 24/08/17 05:54PM, Nicolas Schier wrote:
> On Sat, Aug 17, 2024 at 09:11:47AM -0600, Jose Fernandez wrote:
> > Add a new debug package to the PKGBUILD for the pacman-pkg target. The
> > debug package includes the non-stripped vmlinux file, providing access
> > to debug symbols needed for kernel debugging and profiling. The vmlinux
> > file will be installed to /usr/src/debug/${pkgbase}. The debug package
> > will be built by default and can be excluded by overriding PACMAN_EXTRAPACKAGES.
> > 
> > Signed-off-by: Jose Fernandez <jose.fernandez@...ux.dev>
> > Reviewed-by: Peter Jung <ptr1337@...hyos.org>
> > ---
> > v1->v2:
> > - Use the new PACMAN_EXTRAPACKAGES [1] variable to allow users to disable the
> > debug package if desired, instead of always including it.
> > 
> > [1] https://lore.kernel.org/lkml/20240813185900.GA140556@thelio-3990X/T/
> > 
> >  scripts/package/PKGBUILD | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> > 
> > diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> > index fbd7eb10a52c..d40d282353de 100644
> > --- a/scripts/package/PKGBUILD
> > +++ b/scripts/package/PKGBUILD
> > @@ -5,7 +5,7 @@
> >  pkgbase=${PACMAN_PKGBASE:-linux-upstream}
> >  pkgname=("${pkgbase}")
> >  
> > -_extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers}
> > +_extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers debug}
> >  for pkg in $_extrapackages; do
> >  	pkgname+=("${pkgbase}-${pkg}")
> >  done
> > @@ -106,6 +106,15 @@ _package-api-headers() {
> >  	${MAKE} headers_install INSTALL_HDR_PATH="${pkgdir}/usr"
> >  }
> >  
> > +_package-debug(){
> > +	pkgdesc="Non-stripped vmlinux file for the ${pkgdesc} kernel"
> > +	depends=(${pkgbase}-headers)
> > +
> > +	cd "${objtree}"
> > +	mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
> > +	install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux
> > +}
> > +
> 
> If you like to also include debug stuff for kernel modules, you might
> want to have a look at scripts/package/builddeb's install_linux_image_dbg.

Hi Nicolas, thank you for the suggestion. I'll iterate on the debug stuff for
kernel modules in a follow-up patch to keep this one focused on vmlinux.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ