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: <3F6DFBAE-ECA5-4E06-B9A0-4D6868FD0B13@linux.ibm.com>
Date:   Mon, 19 Aug 2019 17:56:21 +0200
From:   Ilya Leoshkevich <iii@...ux.ibm.com>
To:     Andrii Nakryiko <andriin@...com>
Cc:     bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii.nakryiko@...il.com>,
        Kernel Team <kernel-team@...com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>
Subject: Re: [RESEND][PATCH v3 bpf-next] btf: expose BTF info through sysfs

> Am 12.08.2019 um 20:39 schrieb Andrii Nakryiko <andriin@...com>:
> 
> @@ -92,23 +92,34 @@ vmlinux_link()
> }
> 
> # generate .BTF typeinfo from DWARF debuginfo
> +# ${1} - vmlinux image
> +# ${2} - file to dump raw BTF data into
> gen_btf()
> {
> -	local pahole_ver;
> +	local pahole_ver
> +	local bin_arch
> 
> 	if ! [ -x "$(command -v ${PAHOLE})" ]; then
> 		info "BTF" "${1}: pahole (${PAHOLE}) is not available"
> -		return 0
> +		return 1
> 	fi
> 
> 	pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
> 	if [ "${pahole_ver}" -lt "113" ]; then
> 		info "BTF" "${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
> -		return 0
> +		return 1
> 	fi
> 
> -	info "BTF" ${1}
> +	info "BTF" ${2}
> +	vmlinux_link ${1}
> 	LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J ${1}
> +
> +	# dump .BTF section into raw binary file to link with final vmlinux
> +	bin_arch=$(${OBJDUMP} -f ${1} | grep architecture | \
> +		cut -d, -f1 | cut -d' ' -f2)
> +	${OBJCOPY} --dump-section .BTF=.btf.kernel.bin ${1} 2>/dev/null
> +	${OBJCOPY} -I binary -O ${CONFIG_OUTPUT_FORMAT} -B ${bin_arch} \
> +		--rename-section .data=.BTF .btf.kernel.bin ${2}
> }

CONFIG_OUTPUT_FORMAT appears to be x86-only; enabling
CONFIG_DEBUG_INFO_BTF on s390 caused a build failure. I now have a quick
and dirty local patch, which adds CONFIG_OUTPUT_FORMAT to s390 and fixes
the issue for me, but I suspect that CONFIG_DEBUG_INFO_BTF might be
broken on other arches as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ