2023-04-24 10:34:04

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH] tools lib symbol: Use -D_FORTIFY_SOURCE=2 for non-debug builds

Commit 160be157eaba ("tool lib symbol: Add Makefile/Build") failed to
define _FORTIFY_SOURCE to 2, probabaly this was cut&pasted from other
Makefiles with the same problem.

Fixes: 160be157eaba ("tool lib symbol: Add Makefile/Build")
Signed-off-by: Uwe Kleine-König <[email protected]>
---
tools/lib/symbol/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/symbol/Makefile b/tools/lib/symbol/Makefile
index 13d43c6f92b4..4a08cc4e19f2 100644
--- a/tools/lib/symbol/Makefile
+++ b/tools/lib/symbol/Makefile
@@ -39,7 +39,7 @@ endif
endif

ifeq ($(DEBUG),0)
- CFLAGS += -D_FORTIFY_SOURCE
+ CFLAGS += -D_FORTIFY_SOURCE=2
endif

# Treat warnings as errors unless directed not to
--
2.39.2


2023-04-29 21:15:16

by Ian Rogers

[permalink] [raw]
Subject: Re: [PATCH] tools lib symbol: Use -D_FORTIFY_SOURCE=2 for non-debug builds

On Mon, Apr 24, 2023 at 3:28 AM Uwe Kleine-König <[email protected]> wrote:
>
> Commit 160be157eaba ("tool lib symbol: Add Makefile/Build") failed to
> define _FORTIFY_SOURCE to 2, probabaly this was cut&pasted from other
> Makefiles with the same problem.
>
> Fixes: 160be157eaba ("tool lib symbol: Add Makefile/Build")
> Signed-off-by: Uwe Kleine-König <[email protected]>

Acked-by: Ian Rogers <[email protected]>

Same problem here I think:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/api/Makefile#n42

Thanks,
Ian

> ---
> tools/lib/symbol/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/symbol/Makefile b/tools/lib/symbol/Makefile
> index 13d43c6f92b4..4a08cc4e19f2 100644
> --- a/tools/lib/symbol/Makefile
> +++ b/tools/lib/symbol/Makefile
> @@ -39,7 +39,7 @@ endif
> endif
>
> ifeq ($(DEBUG),0)
> - CFLAGS += -D_FORTIFY_SOURCE
> + CFLAGS += -D_FORTIFY_SOURCE=2
> endif
>
> # Treat warnings as errors unless directed not to
> --
> 2.39.2
>

2023-04-30 09:12:18

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH] tools lib symbol: Use -D_FORTIFY_SOURCE=2 for non-debug builds

On 4/29/23 23:05, Ian Rogers wrote:
> On Mon, Apr 24, 2023 at 3:28 AM Uwe Kleine-König <[email protected]> wrote:
>>
>> Commit 160be157eaba ("tool lib symbol: Add Makefile/Build") failed to
>> define _FORTIFY_SOURCE to 2, probabaly this was cut&pasted from other
>> Makefiles with the same problem.
>>
>> Fixes: 160be157eaba ("tool lib symbol: Add Makefile/Build")
>> Signed-off-by: Uwe Kleine-König <[email protected]>
>
> Acked-by: Ian Rogers <[email protected]>

Thanks

> Same problem here I think:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/api/Makefile#n42

Indeed, and similar patch here:

https://lore.kernel.org/all/[email protected]/

Best regards
Uwe

2024-04-01 11:52:01

by Diederik de Haas

[permalink] [raw]
Subject: Re: [PATCH] tools lib symbol: Use -D_FORTIFY_SOURCE=2 for non-debug builds

On Sunday, 30 April 2023 11:11:26 CEST Uwe Kleine-König wrote:
> On 4/29/23 23:05, Ian Rogers wrote:
> > On Apr 24, 2023 at 3:28 AM Uwe Kleine-König <[email protected]> wrote:
> >> Commit 160be157eaba ("tool lib symbol: Add Makefile/Build") failed to
> >> define _FORTIFY_SOURCE to 2, probabaly this was cut&pasted from other
> >> Makefiles with the same problem.
> >>
> >> Fixes: 160be157eaba ("tool lib symbol: Add Makefile/Build")
> >> Signed-off-by: Uwe Kleine-König <[email protected]>
> >
> > Acked-by: Ian Rogers <[email protected]>
>
> Thanks
>
> > Same problem here I think:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/to
> > ols/lib/api/Makefile#n42
> Indeed, and similar patch here:
>
> https://lore.kernel.org/all/[email protected]/

I noticed this (and the other linked) patch haven't been merged yet.
What's needed to move this forward?


Attachments:
signature.asc (235.00 B)
This is a digitally signed message part.