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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 6 Apr 2023 20:32:38 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Jane Chu <jane.chu@...cle.com>
Cc:     dan.j.williams@...el.com, vishal.l.verma@...el.com,
        dave.jiang@...el.com, ira.weiny@...el.com, viro@...iv.linux.org.uk,
        brauner@...nel.org, nvdimm@...ts.linux.dev,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] dax: enable dax fault handler to report VM_FAULT_HWPOISON

On Thu, Apr 06, 2023 at 11:55:56AM -0600, Jane Chu wrote:
>  static vm_fault_t dax_fault_return(int error)
>  {
>  	if (error == 0)
>  		return VM_FAULT_NOPAGE;
> -	return vmf_error(error);
> +	else if (error == -ENOMEM)
> +		return VM_FAULT_OOM;
> +	else if (error == -EHWPOISON)
> +		return VM_FAULT_HWPOISON;
> +	return VM_FAULT_SIGBUS;
>  }

Why would we want to handle it here instead of changing vmf_error()?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ