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: Mon, 23 Mar 2015 08:55:09 +0900 From: Namhyung Kim <namhyung@...nel.org> To: Arnaldo Carvalho de Melo <acme@...hat.com> Cc: Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org, Adrian Hunter <adrian.hunter@...el.com>, Corey Ashford <cjashfor@...ux.vnet.ibm.com>, David Ahern <dsahern@...il.com>, Frederic Weisbecker <fweisbec@...il.com>, Ingo Molnar <mingo@...nel.org>, Paul Mackerras <paulus@...ba.org>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, Stephane Eranian <eranian@...gle.com>, acme@...nel.org Subject: Re: [PATCH 08/14] perf tools: Use kmod_path__parse in map_groups__set_modules_path_dir Hi Arnaldo, On Sat, Mar 21, 2015 at 03:20:43PM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Mar 06, 2015 at 12:13:56PM +0100, Jiri Olsa escreveu: > > Replacing the file name parsing with kmod_path__parse > > and moving the dso update into new separate function. > > > > --- > > tools/perf/util/machine.c | 65 ++++++++++++++++++++++++++++++----------------- > > 1 file changed, 41 insertions(+), 24 deletions(-) > > > > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c > > > +static int map_groups__set_module_path(struct map_groups *mg, const char *path, > > + struct kmod_path *m) > > +{ > > + struct map *map; > > + char *long_name; > > + > > + map = map_groups__find_by_name(mg, MAP__FUNCTION, m->name); > > + if (map == NULL) > > + return 0; > > + > > + long_name = strdup(path); > > + if (long_name == NULL) > > + return -ENOMEM; > > + > > + dso__set_long_name(map->dso, long_name, true); > > + dso__kernel_module_get_build_id(map->dso, ""); > > + > > + /* > > + * Full name could reveal us kmod compression, so > > + * we need to update the symtab_type if needed. > > + */ > > + if (m->comp && is_kmod_dso(map->dso)) > > + map->dso->symtab_type++; > > Ouch, does this assumes this is a: > > DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE Nope, it's one of _SYSTEM_PATH_KMODULE or _GUEST_KMODULE. > > And that, because in the dso_binary_type enum > DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP comes right after it, and thus > this cryptic increment is equivalent to: > > map->dso->symtab_type = DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP; Again, _SYSTEM_PATH_KMODULE_COMP or _GUEST_KMODULE_COMP. Thanks, Namhyung > > ? > > Also, this part: > > ---- > Replacing the file name parsing with kmod_path__parse and moving the > dso update into new separate function. > ---- > > Indicates that this probably would be best done in two separate patches, > one that introduces the new function, but is equivalent to the existing > code, and the next one adding the new logic? > > Processed all the patches up to this one, stopping now ;-) > > - Arnaldo > -- > 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/ -- 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