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: <20100105032715.GA1044@localhost>
Date:	Tue, 5 Jan 2010 11:27:15 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Andi Kleen <andi@...stfloor.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Quentin Barnes <qbarnes+nfs@...oo-inc.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	Nick Piggin <npiggin@...e.de>,
	Steven Whitehouse <swhiteho@...hat.com>,
	David Howells <dhowells@...hat.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Jonathan Corbet <corbet@....net>,
	Eric Paris <eparis@...hat.com>
Subject: Re: [RFC][PATCH v5] readahead: introduce O_RANDOM for
	POSIX_FADV_RANDOM

On Tue, Jan 05, 2010 at 11:18:01AM +0800, Wu Fengguang wrote:
>  
> +/*
> + * usage of open(O_RANDOM) is disabled: __dentry_open() will nuke this bit
> + */
> +#ifndef O_RANDOM
> +#define O_RANDOM	0200000000	/* random access pattern hint */
> +#endif
> +

Tested with this program, output is

        flags=0x9001 O_SYNC=0x1000 O_RANDOM=0

My user space O_SYNC is still the old O_DSYNC. But should be OK to
test the sparc O_SYNC.

------------------------------------------------------------------------------
#include <fcntl.h>
#include <stdio.h>

#define O_RANDOM       040000000       /* random access pattern hint */

int main (void)
{
	int fd, flags;

	fd = open("/tmp/fcntl-test",
		  O_WRONLY | O_CREAT | O_SYNC | O_RANDOM, 0666);
	flags = fcntl(fd, F_GETFL, 0);
	printf("flags=%#lx O_SYNC=%#lx O_RANDOM=%#lx\n",
	       flags, flags & O_SYNC, flags & O_RANDOM);
}
------------------------------------------------------------------------------

Thanks,
Fengguang
--
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