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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 5 Nov 2007 15:24:13 +0100
From:	Christoph Raisch <RAISCH@...ibm.com>
To:	Michael Neuling <mikey@...ling.org>
Cc:	Jan-Bernd Themann <THEMANN@...ibm.com>,
	Jeff Garzik <jeff@...zik.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-ppc <linuxppc-dev@...abs.org>,
	Marcus Eder <MEDER@...ibm.com>, michael@...erman.id.au,
	netdev <netdev@...r.kernel.org>, ossthema@...ux.vnet.ibm.com,
	Stefan Roscher <stefan.roscher@...ibm.com>,
	Thomas Q Klein <TKLEIN@...ibm.com>
Subject: Re: [PATCH] ehea: add kexec support


Michael Neuling <mikey@...ling.org> wrote on 03.11.2007 07:06:31:

> > DD allocates HEA resources and gets firmware_handles for these
resources.
> > To free the resources DD needs to use exactly these handles.
> > There's no generic firmware call "clean out all resources".
> > Allocating the same resources twice does not work.
>
> Can we get a new firmware call to do this?

Well, there's no simple answer to this. I'm not working on firmware.
I'm trying to get an answer... but don't expect anything "real soon".

>
> > So a new kernel can't free the resources allocated by an old kernel,
> > because the numeric values of the handles aren't known anymore.
>
> How many possible handles are there?

Depends on system configuration, between
4 and 64 per port.

>
> If the handles are lost, is the only way to clear out the HEA resources
> is to reset the partition?

Yes, that's exactly the problem.

>
> > Potential Solution:
> > Hea driver cleanup function hooks into ppc_md.machine_crash_shutdown
> > and frees all firmware resources at shutdown time of the crashed
kernel.
>
> This means the crashed kernel now has to be trusted to shut down and
> free up the resources.  Isn't trusting the crashing kernel in this way
> against the whole kdump idea?

I would hope that if the cleanup routine only does hcalls
and does not change any kernel memory areas, then the risk to damage
anything
else  in kernel should be pretty small. This should allow to catch most
cases,
but as always you can imagine situations where the kernel memory is broken
beyond hope to even restart the kdump kernel.


>
> > crash_kexec continues and loads new kernel.
> > The new kernel restarts the HEA driver within kdump kernel, which will
work
> > because resources have been freed before.
> >
> > Michael, would this work?

Is ppc_md.machine_crash_shutdown the right hook?

Gruss/Regards
Christoph R


-
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