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] [day] [month] [year] [list]
Date:	Wed, 30 Oct 2013 16:50:47 +0200
From:	Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH rebased] sysfs: return correct error code on unimplemented
 mmap()

Greg,

On 10/30/13 14:08, Vladimir Zapolskiy wrote:
> Both POSIX.1-2008 and Linux Programmer's Manual have a dedicated return
> error code for a case, when a file doesn't support mmap(), it's ENODEV.
>
> This change replaces overloaded EINVAL with ENODEV in a situation
> described above for sysfs binary files.
>
> Signed-off-by: Vladimir Zapolskiy<vladimir_zapolskiy@...tor.com>
> Cc: Greg Kroah-Hartman<gregkh@...uxfoundation.org>
> ---
>   fs/sysfs/file.c |    1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index 0d7368d4..382db3c 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -477,7 +477,6 @@ static int sysfs_bin_mmap(struct file *file, struct vm_area_struct *vma)
>   	if (!sysfs_get_active(of->sd))
>   		goto out_unlock;
>
> -	rc = -EINVAL;
>   	if (!battr->mmap)
>   		goto out_put;
>

as you asked the patch is rebased on top of linux-next, if you encounter 
any problems related to the change, please let me know.

Thanks,
Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ