Discussion:
[PATCHv6 08/11] kexec: Switch to __pa_symbol
Laura Abbott
2017-01-03 17:21:50 UTC
Permalink
__pa_symbol is the correct api to get the physical address of kernel
symbols. Switch to it to allow for better debug checking.

Reviewed-by: Mark Rutland <***@arm.com>
Tested-by: Mark Rutland <***@arm.com>
Acked-by: "Eric W. Biederman" <***@xmission.com>
Signed-off-by: Laura Abbott <***@redhat.com>
---
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 5617cc4..a01974e 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1399,7 +1399,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
Florian Fainelli
2017-01-03 22:56:49 UTC
Permalink
Happy New Year!
This is a very minor rebase from v5. It only moves a few headers around.
I think this series should be ready to be queued up for 4.11.
FWIW:

Tested-by: Florian Fainelli <***@gmail.com>

How do we get this series included? I would like to get the ARM 32-bit
counterpart included as well (will resubmit rebased shortly), but I have
no clue which tree this should be going through.

Thanks!
Thanks,
Laura
lib/Kconfig.debug: Add ARCH_HAS_DEBUG_VIRTUAL
mm/cma: Cleanup highmem check
arm64: Move some macros under #ifndef __ASSEMBLY__
arm64: Add cast for virt_to_pfn
mm: Introduce lm_alias
arm64: Use __pa_symbol for kernel symbols
drivers: firmware: psci: Use __pa_symbol for kernel symbol
kexec: Switch to __pa_symbol
mm/kasan: Switch to using __pa_symbol and lm_alias
mm/usercopy: Switch to using lm_alias
arm64: Add support for CONFIG_DEBUG_VIRTUAL
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/kvm_mmu.h | 4 +-
arch/arm64/include/asm/memory.h | 66 +++++++++++++++++++++----------
arch/arm64/include/asm/mmu_context.h | 6 +--
arch/arm64/include/asm/pgtable.h | 2 +-
arch/arm64/kernel/acpi_parking_protocol.c | 3 +-
arch/arm64/kernel/cpu-reset.h | 2 +-
arch/arm64/kernel/cpufeature.c | 3 +-
arch/arm64/kernel/hibernate.c | 20 +++-------
arch/arm64/kernel/insn.c | 2 +-
arch/arm64/kernel/psci.c | 3 +-
arch/arm64/kernel/setup.c | 9 +++--
arch/arm64/kernel/smp_spin_table.c | 3 +-
arch/arm64/kernel/vdso.c | 8 +++-
arch/arm64/mm/Makefile | 2 +
arch/arm64/mm/init.c | 12 +++---
arch/arm64/mm/kasan_init.c | 22 +++++++----
arch/arm64/mm/mmu.c | 33 ++++++++++------
arch/arm64/mm/physaddr.c | 30 ++++++++++++++
arch/x86/Kconfig | 1 +
drivers/firmware/psci.c | 2 +-
include/linux/mm.h | 4 ++
kernel/kexec_core.c | 2 +-
lib/Kconfig.debug | 5 ++-
mm/cma.c | 15 +++----
mm/kasan/kasan_init.c | 15 +++----
mm/usercopy.c | 4 +-
27 files changed, 180 insertions(+), 99 deletions(-)
create mode 100644 arch/arm64/mm/physaddr.c
--
Florian
Laura Abbott
2017-01-03 23:25:53 UTC
Permalink
Post by Florian Fainelli
Happy New Year!
This is a very minor rebase from v5. It only moves a few headers around.
I think this series should be ready to be queued up for 4.11.
Thanks!
Post by Florian Fainelli
How do we get this series included? I would like to get the ARM 32-bit
counterpart included as well (will resubmit rebased shortly), but I have
no clue which tree this should be going through.
I was assuming this would go through the arm64 tree unless Catalin/Will
have an objection to that.
Post by Florian Fainelli
Thanks!
Thanks,
Laura
lib/Kconfig.debug: Add ARCH_HAS_DEBUG_VIRTUAL
mm/cma: Cleanup highmem check
arm64: Move some macros under #ifndef __ASSEMBLY__
arm64: Add cast for virt_to_pfn
mm: Introduce lm_alias
arm64: Use __pa_symbol for kernel symbols
drivers: firmware: psci: Use __pa_symbol for kernel symbol
kexec: Switch to __pa_symbol
mm/kasan: Switch to using __pa_symbol and lm_alias
mm/usercopy: Switch to using lm_alias
arm64: Add support for CONFIG_DEBUG_VIRTUAL
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/kvm_mmu.h | 4 +-
arch/arm64/include/asm/memory.h | 66 +++++++++++++++++++++----------
arch/arm64/include/asm/mmu_context.h | 6 +--
arch/arm64/include/asm/pgtable.h | 2 +-
arch/arm64/kernel/acpi_parking_protocol.c | 3 +-
arch/arm64/kernel/cpu-reset.h | 2 +-
arch/arm64/kernel/cpufeature.c | 3 +-
arch/arm64/kernel/hibernate.c | 20 +++-------
arch/arm64/kernel/insn.c | 2 +-
arch/arm64/kernel/psci.c | 3 +-
arch/arm64/kernel/setup.c | 9 +++--
arch/arm64/kernel/smp_spin_table.c | 3 +-
arch/arm64/kernel/vdso.c | 8 +++-
arch/arm64/mm/Makefile | 2 +
arch/arm64/mm/init.c | 12 +++---
arch/arm64/mm/kasan_init.c | 22 +++++++----
arch/arm64/mm/mmu.c | 33 ++++++++++------
arch/arm64/mm/physaddr.c | 30 ++++++++++++++
arch/x86/Kconfig | 1 +
drivers/firmware/psci.c | 2 +-
include/linux/mm.h | 4 ++
kernel/kexec_core.c | 2 +-
lib/Kconfig.debug | 5 ++-
mm/cma.c | 15 +++----
mm/kasan/kasan_init.c | 15 +++----
mm/usercopy.c | 4 +-
27 files changed, 180 insertions(+), 99 deletions(-)
create mode 100644 arch/arm64/mm/physaddr.c
Will Deacon
2017-01-04 11:44:50 UTC
Permalink
Post by Florian Fainelli
Post by Florian Fainelli
Happy New Year!
This is a very minor rebase from v5. It only moves a few headers around.
I think this series should be ready to be queued up for 4.11.
Thanks!
Post by Florian Fainelli
How do we get this series included? I would like to get the ARM 32-bit
counterpart included as well (will resubmit rebased shortly), but I have
no clue which tree this should be going through.
I was assuming this would go through the arm64 tree unless Catalin/Will
have an objection to that.
Yup, I was planning to pick it up for 4.11.

Florian -- does your series depend on this? If so, then I'll need to
co-ordinate with Russell (probably via a shared branch that we both pull)
if you're aiming for 4.11 too.

Will
Florian Fainelli
2017-01-04 22:30:50 UTC
Permalink
Post by Will Deacon
Post by Florian Fainelli
Post by Florian Fainelli
Happy New Year!
This is a very minor rebase from v5. It only moves a few headers around.
I think this series should be ready to be queued up for 4.11.
Thanks!
Post by Florian Fainelli
How do we get this series included? I would like to get the ARM 32-bit
counterpart included as well (will resubmit rebased shortly), but I have
no clue which tree this should be going through.
I was assuming this would go through the arm64 tree unless Catalin/Will
have an objection to that.
Yup, I was planning to pick it up for 4.11.
Florian -- does your series depend on this? If so, then I'll need to
co-ordinate with Russell (probably via a shared branch that we both pull)
if you're aiming for 4.11 too.
Yes, pretty much everything in Laura's patch series is relevant, except
the arm64 bits.

I will get v6 out now addressing Laura's and Hartley's feedback and
then, if you could holler when and where you have applied these, I can
coordinate with Russell about how to get these included.

Thanks and happy new year!
--
Florian
Will Deacon
2017-01-10 12:41:05 UTC
Permalink
Post by Florian Fainelli
Post by Will Deacon
Post by Florian Fainelli
Post by Florian Fainelli
Happy New Year!
This is a very minor rebase from v5. It only moves a few headers around.
I think this series should be ready to be queued up for 4.11.
Thanks!
Post by Florian Fainelli
How do we get this series included? I would like to get the ARM 32-bit
counterpart included as well (will resubmit rebased shortly), but I have
no clue which tree this should be going through.
I was assuming this would go through the arm64 tree unless Catalin/Will
have an objection to that.
Yup, I was planning to pick it up for 4.11.
Florian -- does your series depend on this? If so, then I'll need to
co-ordinate with Russell (probably via a shared branch that we both pull)
if you're aiming for 4.11 too.
Yes, pretty much everything in Laura's patch series is relevant, except
the arm64 bits.
Ok, then. Laura -- could you please reorder your patches so that the
non-arm64 bits come first? That way, I can put those on a separate branch
and have it pulled by both arm64 and rmk, so that the prequisities are
shared between the architectures.

Thanks,

Will

Loading...