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: <20080620114524.GH7439@elte.hu>
Date:	Fri, 20 Jun 2008 13:45:24 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Cliff Wickman <cpw@....com>
Cc:	andi@...stfloor.org, tglx@...utronix.de,
	linux-kernel@...r.kernel.org,
	the arch/x86 maintainers <x86@...nel.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [PATCH] X86: reboot-notify additions


* Cliff Wickman <cpw@....com> wrote:

> > > +#define SYS_INSANE	0x0004	/* Notify of system error/panic/oops */
> > > +/* For the SYS_INSANE case, no locks should be taken by the called-back
> > > + * function.  The kernel is ready for an immediate reboot.
> > > + */

please use standard comment blocks, something like this:

  /*
   * Notify of system error/panic/oops
   *
   * No locks should be taken by the called-back function.
   * The kernel is ready for an immediate reboot.
   */
  #define SYS_INSANE	0x0004

> > > +++ linux/kernel/kexec.c
> > > @@ -1001,6 +1001,9 @@ asmlinkage long sys_kexec_load(unsigned 
> > >  		if (result)
> > >  			goto out;
> > >  	}
> > > +
> > > +	blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, NULL);

this puts an extra blocking call into a kexec critical path.

>  			struct pt_regs fixed_regs;
> +        		struct raw_notifier_head rh;
> +        		rh.head = reboot_notifier_list.head;
> +        		raw_notifier_call_chain(&rh, SYS_EMERGENCY, NULL);

that's very nasty. Now callbacks which put themselves on a blocking list 
will be called without locking.

>  void emergency_restart(void)
>  {
> +	struct raw_notifier_head rh;
> +
> +	rh.head = reboot_notifier_list.head;
> +	raw_notifier_call_chain(&rh, SYS_EMERGENCY, NULL);

ditto.

this patch is still far from being acceptable.

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