From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@digeo.com>
Cc: andyp@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [KEXEC][2.5.69] Re: Updated kexec diffs...
Date: 14 May 2003 06:50:18 -0600 [thread overview]
Message-ID: <m1el314rqt.fsf@frodo.biederman.org> (raw)
In-Reply-To: <20030513222343.74a3d817.akpm@digeo.com>
Andrew Morton <akpm@digeo.com> writes:
> ebiederm@xmission.com (Eric W. Biederman) wrote:
> >
> > And Andrew has it in 2.5.69-mm4 and is busy pestering me about compile
> > errors.
>
> I'm like that.
And I appreciate it. This was mostly an observation there was
something reminding me to get back and fix the issue.
> I've dropped out a lot of the NORET stuff. It generates warnings on all
> other architectures, because their machine_restart, machine_halt and
> machine_power_off definitions don't have necessary attributes and don't
> have the while(1); at the end.
Yes there is a big const correctness type problem here.
First for machine_restart it is 100% correct. And at least sys_reboot
assumes that machine_restart will not return, even before my patch.
And I don't know of a case where it makes sense for machine_halt and
machine_power_off to return. Hence I deliberately made those cases
the same. Especially as every real implementation I traced does not
return. It is only the stupid cases like on x86 where we don't do
anything that these routines actually return.
In the context of my patch stop_this_cpu needs to be marked noreturn.
As long as the fundamental routines get marked I don't expect to see
a lot of routines getting a while(1); I admit stop_apics also
needs a while(1); but only because gcc cannot trace it.
And since this also generates warnings on other architectures
it looks like someone (me) needs to go through the various
architectures and add a bunch of noreturn attributes to
the appropriate functions.
The basic question is for documenting and enforcing the noreturn
dependency. Is it more of a help or a hindrance to use gcc noreturn
tag?
And while I am pretty certain this is the correct thing to do I
should break this out from the reboot_on_bsp patch. With the
other architectures involved this is enough of a separate issue that a
second set of patches is needed to maintain this cleanly.
Eric
next prev parent reply other threads:[~2003-05-14 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3EBA626E.6040205@cyberone.com.au>
[not found] ` <20030508121211.532dcbcf.akpm@digeo.com>
[not found] ` <3EBC37C4.9090602@cyberone.com.au>
[not found] ` <20030509162911.2cd5321e.akpm@digeo.com>
[not found] ` <m1u1c37d2o.fsf@frodo.biederman.org>
[not found] ` <20030509201327.734caf9e.akpm@digeo.com>
[not found] ` <m1of2978ao.fsf@frodo.biederman.org>
[not found] ` <20030511121753.7a883afb.akpm@digeo.com>
2003-05-12 0:26 ` Updated kexec diffs Eric W. Biederman
2003-05-13 21:26 ` [KEXEC][2.5.69] " Andy Pfiffer
2003-05-14 5:11 ` Eric W. Biederman
2003-05-14 5:23 ` Andrew Morton
2003-05-14 12:50 ` Eric W. Biederman [this message]
2003-05-14 17:14 ` Andrew Morton
2003-05-14 13:30 ` Rolf Eike Beer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1el314rqt.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=akpm@digeo.com \
--cc=andyp@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox