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]
Message-ID: <20131127133500.GB1168@redhat.com>
Date:	Wed, 27 Nov 2013 14:35:01 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	Steven Rostedt <rostedt@...dmis.org>,
	Namhyung Kim <namhyung.kim@....com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, Jiri Olsa <jolsa@...hat.com>,
	linux-kernel@...r.kernel.org,
	"yrl.pp-manager.tt@...achi.com" <yrl.pp-manager.tt@...achi.com>
Subject: Re: modules, add_kallsyms() && DEFINE_PER_CPU

On 11/27, Masami Hiramatsu wrote:
>
> (2013/11/27 2:50), Oleg Nesterov wrote:
> > On 11/26, Oleg Nesterov wrote:
> >>
> >> Note: this doesn't work for modules, but module's per-cpu data is
> >> not visible for kallsyms_lookup_name() anyway.
> >
> > Rusty, I am just curious if it makes sense to change this or not...
> >
> > But DEFINE_PER_CPU'ed symbols are ignored by add_kallsyms(). I guess
> > this is because is_core_symbol() requires "sh_flags & SHF_ALLOC".
> > And probably because of INIT_OFFSET_MASK.
>
> Oleg, I think you can do it by using is_module_percpu_address(). :)

Not only is_module_percpu_address() can't help. We can solve the
is-it-percpu problem (although the check won't be cheap).

The problem is, sc->addr is always NULL if DEFINE_PER_CPU() was used
in a module. kallsyms_lookup_name() can never see it because it is
ignored by add_kallsyms(), it is nacked by is_core_symbol().

IOW, with or without this patch @modular_percpu_sym never reads the
memory.

Oleg.

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