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:	Mon, 25 May 2015 13:04:51 +0200
From:	Martin Liška <mliska@...e.cz>
To:	Ingo Molnar <mingo@...nel.org>
CC:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] perf: fix wrong DEBUG configuration

On 05/25/2015 12:47 PM, Ingo Molnar wrote:
>
> * Martin Liška <mliska@...e.cz> wrote:
>
>> Currently, GCC optimizes -O6 same as -O3 level, thus change the value
>> to -O6.
>
> s/to -O6
>    to -O3
>
>> Right optimize debugging experience is given by passing -Og to
>> compiler. Assign default value for pointers that are identified by
>> compiler as non-initialized.
>
> s/Right optimize debugging experience is given/
>    Correct debugging experience is given/
>
> s/identified by compiler
>    identified by the compiler
>
>>   ifeq ($(DEBUG),0)
>> -  CFLAGS += -O6
>> +  CFLAGS += -O3
>> +else
>> +  CFLAGS += $(call cc-option,-Og,-O0)
>>   endif
>
>> +# try-run
>> +# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
>> +# Exit code chooses option. "$$TMP" is can be used as temporary file and
>> +# is automatically cleaned up.
>> +try-run = $(shell set -e;		\
>> +	TMP="$(TMPOUT).$$$$.tmp";	\
>> +	TMPO="$(TMPOUT).$$$$.o";	\
>> +	if ($(1)) >/dev/null 2>&1;	\
>> +	then echo "$(2)";		\
>> +	else echo "$(3)";		\
>> +	fi;				\
>> +	rm -f "$$TMP" "$$TMPO")
>> +
>> +# cc-option
>> +# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
>> +
>> +cc-option = $(call try-run,\
>> +	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
>
> Looks good to me!
>
> Acked-by: Ingo Molnar <mingo@...nel.org>
>
> Thanks,
>
> 	Ingo
>

Thank you for review.

This is final version of the patch, where I appended your acknowledgment.

Martin

View attachment "0001-perf-fix-wrong-DEBUG-configuration-v5.patch" of type "text/x-patch" (3197 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ