[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsyUVWXtzBmm-U_q@x1>
Date: Mon, 26 Aug 2024 11:42:29 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Eiichi Tsukata <eiichi.tsukata@...anix.com>
Cc: "peterz@...radead.org" <peterz@...radead.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"namhyung@...nel.org" <namhyung@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"alexander.shishkin@...ux.intel.com" <alexander.shishkin@...ux.intel.com>,
"jolsa@...nel.org" <jolsa@...nel.org>,
"irogers@...gle.com" <irogers@...gle.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"kan.liang@...ux.intel.com" <kan.liang@...ux.intel.com>,
"james.clark@...aro.org" <james.clark@...aro.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf test: Use -Wp,-U_FORTIFY_SOURCE for tests built
with -O0
On Mon, Aug 26, 2024 at 03:04:12AM +0000, Eiichi Tsukata wrote:
> Ping
Tried, didn't work, can you please check on the tmp.perf-tools-next?
⬢[acme@...lbox perf-tools-next]$ b4 am -ctsl --cc-trailers 20240806061749.143072-1-eiichi.tsukata@...anix.com
Grabbing thread from lore.kernel.org/all/20240806061749.143072-1-eiichi.tsukata@...anix.com/t.mbox.gz
Analyzing 3 messages in the thread
Looking for additional code-review trailers on lore.kernel.org
Checking attestation on all messages, may take a moment...
---
✓ [PATCH] perf test: Use -Wp,-U_FORTIFY_SOURCE for tests built with -O0
+ Link: https://lore.kernel.org/r/20240806061749.143072-1-eiichi.tsukata@nutanix.com
+ Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
✓ Signed: DKIM/nutanix.com
---
Total patches: 1
---
Link: https://lore.kernel.org/r/20240806061749.143072-1-eiichi.tsukata@nutanix.com
Base: not specified
git am ./20240806_eiichi_tsukata_perf_test_use_wp_u_fortify_source_for_tests_built_with_o0.mbx
⬢[acme@...lbox perf-tools-next]$ git am ./20240806_eiichi_tsukata_perf_test_use_wp_u_fortify_source_for_tests_built_with_o0.mbx
Applying: perf test: Use -Wp,-U_FORTIFY_SOURCE for tests built with -O0
error: patch failed: tools/perf/tests/workloads/Build:7
error: tools/perf/tests/workloads/Build: patch does not apply
Patch failed at 0001 perf test: Use -Wp,-U_FORTIFY_SOURCE for tests built with -O0
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
⬢[acme@...lbox perf-tools-next]$ git am --abort
⬢[acme@...lbox perf-tools-next]$
> > On Aug 6, 2024, at 15:27, Eiichi Tsukata <eiichi.tsukata@...anix.com> wrote:
> >
> > Hi,
> >
> > FYI: Fedora uses “RPM_OPT_FLAGS” as “EXTRA_CFLAGS” to build perf.
> > https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel.spec#_2908
> >
> > And on Fedora40, it has “-Wp,-D_FORTIFY_SOURCE=3”.
> >
> > [eiichi@...5 ~]$ rpm --showrc | grep RPM_OPT | head -n 1
> > RPM_OPT_FLAGS="%{optflags}"
> > [eiichi@...5 ~]$ rpm --eval '%{optflags}'
> > -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mon-omit-leaf-frame-pointer
> >
> > Best,
> > Eiichi
> >
> >> On Aug 6, 2024, at 15:17, Eiichi Tsukata <eiichi.tsukata@...anix.com> wrote:
> >>
> >> If EXTRA_CFLAGS has "-Wp,-D_FORTIFY_SOURCE=2", the build fails with:
> >>
> >> error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
> >>
> >> Use "-Wp,-U_FORTIFY_SOURCE" instead of "-U_FORTIFY_SOURCE" for tests
> >> built with -O0.
> >>
> >> Signed-off-by: Eiichi Tsukata <eiichi.tsukata@...anix.com>
> >> ---
> >> tools/perf/tests/workloads/Build | 8 ++++----
> >> 1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/tools/perf/tests/workloads/Build b/tools/perf/tests/workloads/Build
> >> index 48bf0d3b0f3d..ec36c21e375e 100644
> >> --- a/tools/perf/tests/workloads/Build
> >> +++ b/tools/perf/tests/workloads/Build
> >> @@ -7,7 +7,7 @@ perf-test-y += sqrtloop.o
> >> perf-test-y += brstack.o
> >> perf-test-y += datasym.o
> >>
> >> -CFLAGS_sqrtloop.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE
> >> -CFLAGS_leafloop.o = -g -O0 -fno-inline -fno-omit-frame-pointer -U_FORTIFY_SOURCE
> >> -CFLAGS_brstack.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE
> >> -CFLAGS_datasym.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE
> >> +CFLAGS_sqrtloop.o = -g -O0 -fno-inline -Wp,-U_FORTIFY_SOURCE
> >> +CFLAGS_leafloop.o = -g -O0 -fno-inline -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE
> >> +CFLAGS_brstack.o = -g -O0 -fno-inline -Wp,-U_FORTIFY_SOURCE
> >> +CFLAGS_datasym.o = -g -O0 -fno-inline -Wp,-U_FORTIFY_SOURCE
> >> --
> >> 2.45.2
> >>
> >
>
Powered by blists - more mailing lists