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
| ||
|
Date: Wed, 4 Dec 2013 17:06:30 -0300 From: Arnaldo Carvalho de Melo <acme@...radead.org> To: Ingo Molnar <mingo@...nel.org> Cc: linux-kernel@...r.kernel.org, Dongsheng Yang <yangds.fnst@...fujitsu.com>, David Ahern <dsahern@...il.com>, Ingo Molnar <mingo@...hat.com>, Jiri Olsa <jolsa@...hat.com>, Paul Mackerras <paulus@...ba.org>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, Arnaldo Carvalho de Melo <acme@...hat.com> Subject: [PATCH 06/38] perf tools: Remove condition in machine__get_kernel_start_addr. From: Dongsheng Yang <yangds.fnst@...fujitsu.com> In machine__get_kernel_start_addr, the code, which is using machine->root_dir to build filename, works for both host and guests initialized from guestmount, as root_dir is set to "" for the host machine in the machine__init() function. So this patch remove the branch for machine__is_host. Signed-off-by: Dongsheng Yang <yangds.fnst@...fujitsu.com> Cc: David Ahern <dsahern@...il.com> Cc: Ingo Molnar <mingo@...hat.com> Cc: Jiri Olsa <jolsa@...hat.com> Cc: Paul Mackerras <paulus@...ba.org> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl> Link: http://lkml.kernel.org/r/0a81645dd0b384a12cb4f962cf193ef8c3ce2010.1386197481.git.yangds.fnst@cn.fujitsu.com [ Clarified changeset mentioning root_dir setup in machine__init() ] Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com> --- tools/perf/util/machine.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 84cdb072ac83..bac817ab2068 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -502,15 +502,11 @@ static u64 machine__get_kernel_start_addr(struct machine *machine) char path[PATH_MAX]; struct process_args args; - if (machine__is_host(machine)) { - filename = "/proc/kallsyms"; - } else { - if (machine__is_default_guest(machine)) - filename = (char *)symbol_conf.default_guest_kallsyms; - else { - sprintf(path, "%s/proc/kallsyms", machine->root_dir); - filename = path; - } + if (machine__is_default_guest(machine)) + filename = (char *)symbol_conf.default_guest_kallsyms; + else { + sprintf(path, "%s/proc/kallsyms", machine->root_dir); + filename = path; } if (symbol__restricted_filename(filename, "/proc/kallsyms")) -- 1.8.1.4 -- 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