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  linux-hardening  linux-cve-announce  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]
Message-Id: <201112160940.20909.ptesarik@suse.cz>
Date:	Fri, 16 Dec 2011 09:40:20 +0100
From:	Petr Tesarik <ptesarik@...e.cz>
To:	Tejun Heo <tj@...nel.org>
Cc:	linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>,
	Vivek Goyal <vgoyal@...hat.com>, surovegin@...gle.com,
	gthelen@...gle.com
Subject: Re: [PATCH] Do not round per_cpu_ptr_to_phys to page boundary

Ignore my patch. I can see, a patch has already been accepted.

I only replied too fast (before I read the rest of the thread).

Petr

Dne Pá 16. prosince 2011 09:04:23 Petr Tesarik napsal(a):
> The phys_addr_t per_cpu_ptr_to_phys() function ignores the offset within a
> page, whenever not using a simple translation using __pa().
> 
> Without this patch /sys/devices/system/cpu/cpu*/crash_notes shows incorrect
> values, which breaks kdump. Other things may also be broken.
> 
> Signed-off-by: Petr Tesarik <ptesarik@...e.cz>
> 
> diff --git a/mm/percpu.c b/mm/percpu.c
> index 3bb810a..1a1b5ac 100644
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -998,6 +998,7 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr)
>  	bool in_first_chunk = false;
>  	unsigned long first_low, first_high;
>  	unsigned int cpu;
> +	phys_addr_t page_addr;
> 
>  	/*
>  	 * The following test on unit_low/high isn't strictly
> @@ -1023,9 +1024,10 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr)
>  		if (!is_vmalloc_addr(addr))
>  			return __pa(addr);
>  		else
> -			return page_to_phys(vmalloc_to_page(addr));
> +			page_addr = page_to_phys(vmalloc_to_page(addr));
>  	} else
> -		return page_to_phys(pcpu_addr_to_page(addr));
> +		page_addr = page_to_phys(pcpu_addr_to_page(addr));
> +	return page_addr + offset_in_page(addr);
>  }
> 
>  /**
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign
> http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@...ck.org">
> email@...ck.org </a>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ