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  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, 11 Aug 2014 14:55:51 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Adrian Hunter <adrian.hunter@...el.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 13/41] perf tools: Add machine__kernel_ip()

On Mon, Aug 11, 2014 at 03:46:44PM +0300, Adrian Hunter wrote:
> On 08/11/2014 03:43 PM, Jiri Olsa wrote:
> > On Mon, Aug 11, 2014 at 03:36:40PM +0300, Adrian Hunter wrote:
> >> On 08/11/2014 03:23 PM, Jiri Olsa wrote:
> >>> On Wed, Jul 16, 2014 at 05:22:22PM +0300, Adrian Hunter wrote:
> >>>> On 16/07/2014 5:15 p.m., Jiri Olsa wrote:
> >>>>> On Mon, Jul 14, 2014 at 01:02:37PM +0300, Adrian Hunter wrote:
> >>>>>
> >>>>> SNIP
> >>>>>
> >>>>>> +
> >>>>>> +int machine__get_kernel_start(struct machine *machine)
> >>>>>> +{
> >>>>>> +	struct map *map = machine__kernel_map(machine, MAP__FUNCTION);
> >>>>>> +	int err = 0;
> >>>>>> +
> >>>>>> +	/*
> >>>>>> +	 * The only addresses above 2^63 are kernel addresses of a 64-bit
> >>>>>> +	 * kernel.  Note that addresses are unsigned so that on a 32-bit system
> >>>>>> +	 * all addresses including kernel addresses are less than 2^32.  In
> >>>>>> +	 * that case (32-bit system), if the kernel mapping is unknown, all
> >>>>>> +	 * addresses will be assumed to be in user space - see
> >>>>>> +	 * machine__kernel_ip().
> >>>>>> +	 */
> >>>>>> +	machine->kernel_start = 1ULL << 63;
> >>>>>> +	if (map) {
> >>>>>> +		err = map__load(map, machine->symbol_filter);
> >>>>>> +		if (map->start)
> >>>>>> +			machine->kernel_start = map->start;
> >>>>>> +	}
> >>>>>> +	return err;
> >>>>>> +}
> >>>>>
> >>>>> we just recently got machine__get_kernel_start_addr function,
> >>>>> I think we want just one function for this
> >>>>
> >>>> They do quite different things.
> >>>>
> >>>
> >>> so one of those two should have different name
> >>
> >> Such as?
> > 
> > dont know ;-) but if they do 'quite different things' as u said,
> > I expect to see that at least in the function name
> 
> How about:
> 
> 	machine__get_kernel_start_addr -> machine__get_running_kernel_start

sounds good

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