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-next>] [day] [month] [year] [list]
Message-Id: <20080326201428.95b4a3f6.akpm@linux-foundation.org>
Date:	Wed, 26 Mar 2008 20:14:28 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jens Axboe <jens.axboe@...cle.com>,
	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: set relay file can not be read by pread(2)

On Wed, 26 Mar 2008 18:59:06 GMT Linux Kernel Mailing List <linux-kernel@...r.kernel.org> wrote:

> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=37529fe9f62835e1c11895a1895064748b032dc1
> Commit:     37529fe9f62835e1c11895a1895064748b032dc1
> Parent:     05dda977f2574c3341abef9b74c27d2b362e1e3a
> Author:     Lai Jiangshan <laijs@...fujitsu.com>
> AuthorDate: Wed Mar 26 12:01:28 2008 +0100
> Committer:  Jens Axboe <jens.axboe@...cle.com>
> CommitDate: Wed Mar 26 12:01:28 2008 +0100
> 
>     set relay file can not be read by pread(2)
>     
>     I found that relay files can be read by pread(2). I fix it,
>     for relay files are not capable of seeking.
>     
>     Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
>     Signed-off-by: Jens Axboe <jens.axboe@...cle.com>
> ---
>  kernel/relay.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/relay.c b/kernel/relay.c
> index 4c035a8..ed3f6cf 100644
> --- a/kernel/relay.c
> +++ b/kernel/relay.c
> @@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
>  	kref_get(&buf->kref);
>  	filp->private_data = buf;
>  
> -	return 0;
> +	return nonseekable_open(inode, filp);
>  }

Does pread(..., ..., ..., offset=0) work correctly now?

Because if it does, then applications might be using that, and we just
broke them.

--
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