[Crash-utility] [PATCH 2/2] mips: fix __PGD_ORDER for >4KiB pages
Dave Anderson
anderson at redhat.com
Mon Dec 5 18:58:08 UTC 2016
----- Original Message -----
> From: Rabin Vincent <rabinv at axis.com>
>
> PGD_ORDER expects __PGD_ORDER be signed, which it isn't now since
> pagesize is unsigned. Without this, loading fails on a dump with a
> kernel with 16 KiB pages:
>
> please wait... (gathering module symbol data)
> crash: invalid size request: 0 type: "pgd page"
> ---
> mips.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mips.c b/mips.c
> index 30e6255..f73dfad 100644
> --- a/mips.c
> +++ b/mips.c
> @@ -28,7 +28,7 @@ typedef ulong pte_t;
> #define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1)
> #define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1)
>
> -#define __PGD_ORDER (32 - 3 * PAGESHIFT() + PGD_T_LOG2 + PTE_T_LOG2)
> +#define __PGD_ORDER (32 - 3 * (int)PAGESHIFT() + PGD_T_LOG2 + PTE_T_LOG2)
> #define PGD_ORDER (__PGD_ORDER >= 0 ? __PGD_ORDER : 0)
> #define PGD_SIZE (PAGESIZE() << PGD_ORDER)
>
Rabin, thanks for your quick responses. Queued for crash-7.1.8:
https://github.com/crash-utility/crash/commit/ec02834f489a4bcc74eaedbaad61a9a6ce1c4ca9
Dave
More information about the Crash-utility
mailing list