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]
Message-ID: <20180529145055.GA15148@bombadil.infradead.org>
Date:   Tue, 29 May 2018 07:50:55 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Souptick Joarder <jrdr.linux@...il.com>
Cc:     viro@...iv.linux.org.uk, hughd@...gle.com,
        akpm@...ux-foundation.org, mhocko@...e.com,
        ross.zwisler@...ux.intel.com, zi.yan@...rutgers.edu,
        kirill.shutemov@...ux.intel.com, dan.j.williams@...el.com,
        gregkh@...uxfoundation.org, mark.rutland@....com, riel@...hat.com,
        pasha.tatashin@...cle.com, jschoenh@...zon.de,
        kstewart@...uxfoundation.org, rientjes@...gle.com,
        tglx@...utronix.de, peterz@...radead.org, mgorman@...e.de,
        yang.s@...baba-inc.com, minchan@...nel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH] mm: Change return type to vm_fault_t

On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote:
> Use new return type vm_fault_t for fault handler. For
> now, this is just documenting that the function returns
> a VM_FAULT value rather than an errno. Once all instances
> are converted, vm_fault_t will become a distinct type.

I don't believe you've checked this with sparse.

> @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
>  		     bool *unlocked)
>  {
>  	struct vm_area_struct *vma;
> -	int ret, major = 0;
> +	int major = 0;
> +	vm_fault_t ret;
>  
>  	if (unlocked)
>  		fault_flags |= FAULT_FLAG_ALLOW_RETRY;

...
        major |= ret & VM_FAULT_MAJOR;

That should be throwing a warning.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ