Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-14 Thread Chen Gang
On 11/14/2013 03:33 PM, Chen Gang wrote: > On 11/14/2013 02:48 PM, Chen Gang wrote: >>> >From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-14 Thread Chen Gang
On 11/14/2013 03:55 PM, Richard Weinberger wrote: > Am 14.11.2013 08:33, schrieb Chen Gang: >> > On 11/14/2013 02:48 PM, Chen Gang wrote: >>> >From the look of it, if an error did occur in init_stub_pte(), > then the special mapping of STUB_CODE and STUB_DATA would not > be

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-14 Thread Chen Gang
On 11/14/2013 03:55 PM, Richard Weinberger wrote: Am 14.11.2013 08:33, schrieb Chen Gang: On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-14 Thread Chen Gang
On 11/14/2013 03:33 PM, Chen Gang wrote: On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and with your patch

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 14.11.2013 08:33, schrieb Chen Gang: > On 11/14/2013 02:48 PM, Chen Gang wrote: >>> >From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Chen Gang
On 11/14/2013 02:48 PM, Chen Gang wrote: >> >From the look of it, if an error did occur in init_stub_pte(), >> > then the special mapping of STUB_CODE and STUB_DATA would not >> > be installed, so this area would be invisible to munmap and exit, >> > and with your patch then the pages allocated

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Chen Gang
Firstly, thank you for spending your time resources to reply so many details. On 11/14/2013 01:20 PM, Hugh Dickins wrote: > On Wed, 13 Nov 2013, Chen Gang wrote: > >> Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() >> succeed, they may be used, so in the next failure,

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Hugh Dickins
On Wed, 13 Nov 2013, Chen Gang wrote: > Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() > succeed, they may be used, so in the next failure, we have to skip them > to let exit_mmap() or do_munmap() to process it. > > According to "Documentation/vm/locking",

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Chen Gang
On 11/13/2013 05:07 PM, Richard Weinberger wrote: > Am 13.11.2013 06:06, schrieb Chen Gang: >> Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() >> succeed, they may be used, so in the next failure, we have to skip them >> to let exit_mmap() or do_munmap() to process it. >>

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 13.11.2013 06:06, schrieb Chen Gang: > Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() > succeed, they may be used, so in the next failure, we have to skip them > to let exit_mmap() or do_munmap() to process it. > > According to "Documentation/vm/locking",

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 13.11.2013 06:06, schrieb Chen Gang: Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() succeed, they may be used, so in the next failure, we have to skip them to let exit_mmap() or do_munmap() to process it. According to Documentation/vm/locking, 'mm-page_table_lock'

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Chen Gang
On 11/13/2013 05:07 PM, Richard Weinberger wrote: Am 13.11.2013 06:06, schrieb Chen Gang: Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() succeed, they may be used, so in the next failure, we have to skip them to let exit_mmap() or do_munmap() to process it. According

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Hugh Dickins
On Wed, 13 Nov 2013, Chen Gang wrote: Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() succeed, they may be used, so in the next failure, we have to skip them to let exit_mmap() or do_munmap() to process it. According to Documentation/vm/locking, 'mm-page_table_lock'

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Chen Gang
Firstly, thank you for spending your time resources to reply so many details. On 11/14/2013 01:20 PM, Hugh Dickins wrote: On Wed, 13 Nov 2013, Chen Gang wrote: Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() succeed, they may be used, so in the next failure, we have

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Chen Gang
On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and with your patch then the pages allocated likely to be

Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 14.11.2013 08:33, schrieb Chen Gang: On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and with your patch