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:	Thu, 28 Jan 2016 21:59:13 +0100 (CET)
From:	Jiri Kosina <jikos@...nel.org>
To:	Jessica Yu <jeyu@...hat.com>
cc:	Josh Poimboeuf <jpoimboe@...hat.com>,
	Seth Jennings <sjenning@...hat.com>,
	Vojtech Pavlik <vojtech@...e.com>,
	Miroslav Benes <mbenes@...e.cz>,
	Steven Rostedt <rostedt@...dmis.org>,
	live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [BUG] Incorrect ordering of klp and ftrace module notifier
 callbacks

On Thu, 28 Jan 2016, Jessica Yu wrote:

> So it doesn't look like a simple priority tweak will work, since we want a
> ftrace->klp->klp->ftrace ordering from module load->module unload. Perhaps we
> can split the ftrace and klp notifiers into separate coming and going handlers
> with the appropriate priorities set to enforce correct ordering (not terribly
> pretty, but it works). Is there a better solution?

Given the facts that:

- we want the ordering ftrace -> klp for load and klp -> ftrace for 
  unload

- we already do have separate klp_module_notify_coming() and 
  klp_module_notify_going(), and klp_module_notify() is just a stub that 
  decides which one to call

I'd suggest we keep just a single ftrace_module_notify() (with INT_MIN+1, 
priority), and then introduce separate notifiers

- klp_module_notify_going() with INT_MIN+2, that triggers action iff 
  action == MODULE_STATE_GOING

- klp_module_notify_going() with INT_MIN, that triggers action only iff 
  action == MODULE_STATE_COMING

Thanks,

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ