Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533792
| Path | csiph.com!news.redatomik.org!enother.net!enother.net!enother.net!news.unit0.net!news.panservice.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Dave Young <dyoung@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv4 07/10] kexec: Switch to __pa_symbol |
| Date | Thu, 01 Dec 2016 05:30:02 +0100 |
| Message-ID | <sJraq-7jF-3@gated-at.bofh.it> (permalink) |
| References | <sIVNf-3Mq-3@gated-at.bofh.it> <sIVNf-3Mq-1@gated-at.bofh.it> <sJpBE-6at-3@gated-at.bofh.it> <sJq4F-6F6-1@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.7.1 (2016-10-04) |
| X-Scanned-By | MIMEDefang 2.68 on 10.5.11.22 |
| X-Greylist | Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 01 Dec 2016 04:27:17 +0000 (UTC) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 72 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Laura Abbott <labbott@redhat.com>, Mark Rutland <mark.rutland@arm.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Will Deacon <will.deacon@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Thomas Gleixner <tglx@linutronix.de>, Andrew Morton <akpm@linux-foundation.org>, linux-arm-kernel@lists.infradead.org, Marek Szyprowski <m.szyprowski@samsung.com> |
| X-Original-Date | Thu, 1 Dec 2016 12:27:03 +0800 |
| X-Original-Message-ID | <20161201042703.GA13113@dhcp-128-65.nay.redhat.com> |
| X-Original-References | <1480445729-27130-1-git-send-email-labbott@redhat.com> <1480445729-27130-8-git-send-email-labbott@redhat.com> <20161201024103.GA32438@dhcp-128-65.nay.redhat.com> <87polc7357.fsf@xmission.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1533792 |
Show key headers only | View raw
On 11/30/16 at 09:13pm, Eric W. Biederman wrote:
> Dave Young <dyoung@redhat.com> writes:
>
> > Hi, Laura
> > On 11/29/16 at 10:55am, Laura Abbott wrote:
> >>
> >> __pa_symbol is the correct api to get the physical address of kernel
> >> symbols. Switch to it to allow for better debug checking.
> >>
> >
> > I assume __pa_symbol is faster than __pa, but it still need some testing
> > on all arches which support kexec.
> >
> > But seems long long ago there is a commit e3ebadd95cb in the commit log
> > I see below from:
> > "we should deprecate __pa_symbol(), and preferably __pa() too - and
> > just use "virt_to_phys()" instead, which is is more readable and has
> > nicer semantics."
> >
> > But maybe in modern code __pa_symbol is prefered I may miss background.
> > virt_to_phys still sounds more readable now for me though.
>
> There has been a lot of history with the various definitions.
> __pa_symbol used to be x86 specific.
>
> Now what we have is that __pa_symbol is just __pa(RELOC_HIDE(x));
>
> Now arguably that whole reloc hide thing should happen by architectures
> having a non-inline version of __pa as was done in the commit you
> mention. But at this point there appears to be nothing wrong with
> changing a __pa to a __pa_symbol it might make things a tad more
> reliable depending on the implementation of __pa.
Then it is safe and reasonable, thanks for the clarification.
>
> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
>
>
> Eric
>
> >> Signed-off-by: Laura Abbott <labbott@redhat.com>
> >> ---
> >> Found during review of the kernel. Untested.
> >> ---
> >> kernel/kexec_core.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
> >> index 5616755..e1b625e 100644
> >> --- a/kernel/kexec_core.c
> >> +++ b/kernel/kexec_core.c
> >> @@ -1397,7 +1397,7 @@ void __weak arch_crash_save_vmcoreinfo(void)
> >>
> >> phys_addr_t __weak paddr_vmcoreinfo_note(void)
> >> {
> >> - return __pa((unsigned long)(char *)&vmcoreinfo_note);
> >> + return __pa_symbol((unsigned long)(char *)&vmcoreinfo_note);
> >> }
> >>
> >> static int __init crash_save_vmcoreinfo_init(void)
> >> --
> >> 2.7.4
> >>
> >>
> >> _______________________________________________
> >> kexec mailing list
> >> kexec@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/kexec
> >
> > Thanks
> > Dave
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCHv4 07/10] kexec: Switch to __pa_symbol Laura Abbott <labbott@redhat.com> - 2016-11-29 20:00 +0100
Re: [PATCHv4 07/10] kexec: Switch to __pa_symbol Dave Young <dyoung@redhat.com> - 2016-12-01 03:50 +0100
Re: [PATCHv4 07/10] kexec: Switch to __pa_symbol ebiederm@xmission.com (Eric W. Biederman) - 2016-12-01 04:20 +0100
Re: [PATCHv4 07/10] kexec: Switch to __pa_symbol Dave Young <dyoung@redhat.com> - 2016-12-01 05:30 +0100
csiph-web