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]
Date:   Wed, 14 Apr 2021 15:02:59 -0700
From:   Alexei Starovoitov <ast@...com>
To:     Andrii Nakryiko <andrii@...nel.org>, <bpf@...r.kernel.org>,
        <netdev@...r.kernel.org>, <daniel@...earbox.net>
CC:     <kernel-team@...com>
Subject: Re: [PATCH bpf-next 13/17] selftests/bpf: use -O0 instead of -Og in
 selftests builds

On 4/14/21 1:01 PM, Andrii Nakryiko wrote:
> While -Og is designed to work well with debugger, it's still inferior to -O0
> in terms of debuggability experience. It will cause some variables to still be
> inlined, it will also prevent single-stepping some statements and otherwise
> interfere with debugging experience. So switch to -O0 which turns off any
> optimization and provides the best debugging experience.
> 
> Signed-off-by: Andrii Nakryiko <andrii@...nel.org>
> ---
>   tools/testing/selftests/bpf/Makefile | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 6448c626498f..22a88580b491 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -21,7 +21,7 @@ endif
>   
>   BPF_GCC		?= $(shell command -v bpf-gcc;)
>   SAN_CFLAGS	?=
> -CFLAGS += -g -Og -rdynamic -Wall $(GENFLAGS) $(SAN_CFLAGS)		\
> +CFLAGS += -g -O0 -rdynamic -Wall $(GENFLAGS) $(SAN_CFLAGS)		\
>   	  -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)		\
>   	  -I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT)			\
>   	  -Dbpf_prog_load=bpf_prog_test_load				\
> @@ -201,7 +201,7 @@ $(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile)    \
>   		    $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/bpftool
>   	$(Q)$(MAKE) $(submake_extras)  -C $(BPFTOOLDIR)			       \
>   		    CC=$(HOSTCC) LD=$(HOSTLD)				       \
> -		    EXTRA_CFLAGS='-g -Og'				       \
> +		    EXTRA_CFLAGS='-g -O0'				       \

lol. so much for gcc docs :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ