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]
Message-ID: <482B6075.4030904@redhat.com>
Date:	Wed, 14 May 2008 17:58:13 -0400
From:	Steven Rostedt <srostedt@...hat.com>
To:	David Miller <davem@...emloft.net>
CC:	mingo@...e.hu, acme@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2]: sparc64: Add ftrace support.

David Miller wrote:
> From: Steven Rostedt <srostedt@...hat.com>
> Date: Wed, 14 May 2008 09:32:18 -0400
> 
>> If you add the following in arch/sparc64/kernel/Makefile
>>
>> ifdef CONFIG_DYNAMIC_FTRACE
>> obj-y += ftrace.o
>> # Do not trace the ftrace code itself
>> ORIG_CFLAGS := $(KBUILD_CFLAGS)
>> KBUILD_CFLAGS = $(if $(filter-out ftrace, $(basename $(notdir $@))), \
>> 	$(ORIG_CFLAGS), \
>> 	$(subst -pg,,$(ORIG_CFLAGS)))
>> endif
>>
>> Then you wont need the "notrace" annotations on the functions.
> 
> That frankly looks like crap compared to the simple "notrace"
> annotations in the *.c file.
> 
> This Makefile turd is in fact seemingly multiplying in various
> places in the ftrace tree, please reverse this trend.

I wish it wasn't so ugly. The Makefile scripts allow you to add more 
CFLAGS to specific files but does not have a way to remove generic 
flags. If there was a better way then I would love to do it.

The problem is that adding "notrace" on ever function that needs it, 
also becomes quite messy. Especially when you have files where all 
functions in the file needs a notrace and there is 40 or so small 
functions that this applies to.

To add flags to file foo.c one simply needs to do

CFLAGS_foo.o = -newflags

It would be nice to have something like

CFLAGS_REMOVE_foo.o = -pg

Perhaps that is possible to do. Then the above "Makefile turd" wont be 
so crappy.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ