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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 3 Jul 2018 17:18:30 +0530
From:   Souptick Joarder <jrdr.linux@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Andy Lutomirski <luto@...capital.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
        linux-kernel@...r.kernel.org, brajeswar.linux@...il.com,
        Sabyasachi Gupta <sabyasachi.linux@...il.com>
Subject: Re: [PATCH v2] x86/vdso: Change return type to vm_fault_t for fault handlers

On Tue, Jul 3, 2018 at 4:47 PM, Matthew Wilcox <willy@...radead.org> wrote:
> On Mon, Jun 25, 2018 at 11:27:37PM +0530, Souptick Joarder wrote:
>> Use new return type vm_fault_t for both fault handler
>> vdso_fault() and vvar_fault(). Previously vm_insert_pfn()
>> returns err which has to mapped into VM_FAULT_* type.
>> The new function vmf_insert_pfn() will replace this
>> inefficiency by returning correct VM_FAULT_* type.
>
>> @@ -105,10 +105,10 @@ static int vvar_fault(const struct vm_special_mapping *sm,
>>        * the page past the end of the vvar mapping.
>>        */
>>       if (sym_offset == 0)
>> -             return VM_FAULT_SIGBUS;
>> +             return ret;
>>
>>       if (sym_offset == image->sym_vvar_page) {
>> -             ret = vm_insert_pfn(vma, vmf->address,
>> +             ret = vmf_insert_pfn(vma, vmf->address,
>>                                   __pa_symbol(&__vvar_page) >> PAGE_SHIFT);
>>       } else if (sym_offset == image->sym_pvclock_page) {
>>               struct pvclock_vsyscall_time_info *pvti =
>> @@ -124,14 +124,11 @@ static int vvar_fault(const struct vm_special_mapping *sm,
>
> Haven't you missed converting vm_insert_pfn_prot() at line 117?
> Did you test-compile this?
>

I left it intentionally in this patch. When we will be replacing
vm_insert_foo() with new API vmf_insert_foo(), vm_insert_pfn_prot
need to be changed to return vm_fault_t type.

I will change the return type of vm_insert_pfn_prot() in that patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ