Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread yalin wang
> On Aug 5, 2015, at 05:18, Dave Hansen wrote: > > On 08/03/2015 08:37 PM, yalin wang wrote: >> This change kcore_read() to use __copy_from_user_inatomic() to >> copy data from kernel address, because kern_addr_valid() just make sure >> page table is valid during call it, whne it return, the

Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread yalin wang
> On Aug 5, 2015, at 06:38, Andrew Morton wrote: > > On Tue, 4 Aug 2015 11:37:57 +0800 yalin wang wrote: > >> This change kcore_read() to use __copy_from_user_inatomic() to >> copy data from kernel address, because kern_addr_valid() just make sure >> page table is valid during call it, whne

Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread Andrew Morton
On Tue, 4 Aug 2015 11:37:57 +0800 yalin wang wrote: > This change kcore_read() to use __copy_from_user_inatomic() to > copy data from kernel address, because kern_addr_valid() just make sure > page table is valid during call it, whne it return, the page table may > change, for example, like

Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread Dave Hansen
On 08/03/2015 08:37 PM, yalin wang wrote: > This change kcore_read() to use __copy_from_user_inatomic() to > copy data from kernel address, because kern_addr_valid() just make sure > page table is valid during call it, whne it return, the page table may > change, for example, like set_fixmap()

Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread yalin wang
On Aug 5, 2015, at 05:18, Dave Hansen d...@sr71.net wrote: On 08/03/2015 08:37 PM, yalin wang wrote: This change kcore_read() to use __copy_from_user_inatomic() to copy data from kernel address, because kern_addr_valid() just make sure page table is valid during call it, whne it return,

Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread Andrew Morton
On Tue, 4 Aug 2015 11:37:57 +0800 yalin wang yalin.wang2...@gmail.com wrote: This change kcore_read() to use __copy_from_user_inatomic() to copy data from kernel address, because kern_addr_valid() just make sure page table is valid during call it, whne it return, the page table may change,

Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread yalin wang
On Aug 5, 2015, at 06:38, Andrew Morton a...@linux-foundation.org wrote: On Tue, 4 Aug 2015 11:37:57 +0800 yalin wang yalin.wang2...@gmail.com wrote: This change kcore_read() to use __copy_from_user_inatomic() to copy data from kernel address, because kern_addr_valid() just make sure

Re: [RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-04 Thread Dave Hansen
On 08/03/2015 08:37 PM, yalin wang wrote: This change kcore_read() to use __copy_from_user_inatomic() to copy data from kernel address, because kern_addr_valid() just make sure page table is valid during call it, whne it return, the page table may change, for example, like set_fixmap()

[RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-03 Thread yalin wang
This change kcore_read() to use __copy_from_user_inatomic() to copy data from kernel address, because kern_addr_valid() just make sure page table is valid during call it, whne it return, the page table may change, for example, like set_fixmap() function will change kernel page table, then maybe

[RFC] kcore:change kcore_read to make sure the kernel read is safe

2015-08-03 Thread yalin wang
This change kcore_read() to use __copy_from_user_inatomic() to copy data from kernel address, because kern_addr_valid() just make sure page table is valid during call it, whne it return, the page table may change, for example, like set_fixmap() function will change kernel page table, then maybe