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] [day] [month] [year] [list]
Message-ID: <539EB974.9030904@intel.com>
Date:	Mon, 16 Jun 2014 12:31:32 +0300
From:	Adrian Hunter <adrian.hunter@...el.com>
To:	Jiri Olsa <jolsa@...hat.com>, Simon Que <sque@...omium.org>
CC:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Stephane Eranian <eranian@...gle.com>,
	Sonny Rao <sonnyrao@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: Get kernel start address by symbol name

On 06/16/2014 11:09 AM, Jiri Olsa wrote:
> On Mon, Jun 16, 2014 at 10:06:49AM +0200, Jiri Olsa wrote:
>> On Fri, Jun 13, 2014 at 11:45:21AM -0700, Simon Que wrote:
>>> The function machine__get_kernel_start_addr() was taking the first symbol
>>> of kallsyms as the start address. This is incorrect in certain cases
>>> where the first symbol is something at 0, while the actual kernel
>>> functions begin at a later point (e.g. 0x80200000).
>>>
>>> This patch fixes machine__get_kernel_start_addr() to search for the
>>> symbol "_text" or "_stext", which marks the beginning of kernel mapping.
>>> This was already being done in machine__create_kernel_maps(). Thus, this
>>> patch is just a refactor, to move that code into
>>> machine__get_kernel_start_addr().
>>>
>>> Change-Id: I0c38c36f5e8b0f4fb92a6f57211fa45aabe545a6
>>> Signed-off-by: Simon Que <sque@...omium.org>
>>
>> hi,
>> looks good to me, adding Adrian to the loop

Yes, it looks fine except for the stuff below.

> 
> well, apart from this compile error ;-)
> 
> [jolsa@...va perf]$ make
>   BUILD:   Doing 'make -j4' parallel build
>   CC       util/machine.o
>   SUBDIR   /home/jolsa/kernel.org/linux-perf/tools/lib/traceevent/
> util/machine.c: In function ‘machine__get_kernel_start_addr’:
> util/machine.c:520:6: error: ‘addr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   u64 addr;
>       ^
> util/machine.c: In function ‘machine__process_kernel_mmap_event’:
> util/machine.c:547:42: error: ‘addr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    machine->vmlinux_maps[type] = map__new2(start, kernel, type);
>                                           ^
> util/machine.c:520:6: note: ‘addr’ was declared here
>   u64 addr;
>       ^
> cc1: all warnings being treated as errors
> make[1]: *** [util/machine.o] Error 1
> make: *** [all] Error 2
> 

There are checkpatch errors too:

ERROR: Remove Gerrit Change-Id's before submitting upstream.
#17:
Change-Id: I0c38c36f5e8b0f4fb92a6f57211fa45aabe545a6

ERROR: "foo** bar" should be "foo **bar"
#59: FILE: tools/perf/util/machine.c:515:
+                                         const char** symbol_name)

ERROR: "foo* bar" should be "foo *bar"
#64: FILE: tools/perf/util/machine.c:519:
+       const char* name;

total: 3 errors, 0 warnings, 0 checks, 90 lines checked


--
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