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]
Date:	Fri, 8 Jul 2016 17:21:00 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Song Shan Gong <gongss@...ux.vnet.ibm.com>
Cc:	acme@...nel.org, jolsa@...nel.org, dsahern@...il.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RFC V1]s390/perf: fix 'start' address of module's map

On Thu, Jul 07, 2016 at 09:49:36AM +0800, Song Shan Gong wrote:

SNIP

> +	hex2u64(sep + 1, &text_start);
> +
> +	*start = text_start;
> +out:
> +	free(line);
> +	fclose(file);
> +	free(module_name - 1);
> +	return err;
> +}
> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index b177218..e5c2721 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -1091,12 +1091,18 @@ static int machine__set_modules_path(struct machine *machine)
>  
>  	return map_groups__set_modules_path_dir(&machine->kmaps, modules_path, 0);
>  }
> +int __weak arch__fix_module_baseaddr(struct machine *machine __maybe_unused,
> +				u64 *start __maybe_unused, const char *name __maybe_unused)
> +{
> +	return 0;
> +}
>  
>  static int machine__create_module(void *arg, const char *name, u64 start)
>  {
>  	struct machine *machine = arg;
>  	struct map *map;
>  
> +	arch__fix_module_baseaddr(machine, &start, name);

you should check for its return value and fail if needed

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ