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]
Date:	Sat, 6 Nov 2010 11:16:27 +0000
From:	James Hogan <james@...anarts.com>
To:	Marco Stornelli <marco.stornelli@...il.com>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>,
	Linux Embedded <linux-embedded@...r.kernel.org>,
	Linux FS Devel <linux-fsdevel@...r.kernel.org>,
	Tim Bird <tim.bird@...sony.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 02/16 v2] pramfs: super block operations

Hi Marco,

On Sat, Nov 06, 2010 at 09:56:39AM +0100, Marco Stornelli wrote:
> From: Marco Stornelli <marco.stornelli@...il.com>
> +static void pram_set_blocksize(struct super_block *sb, unsigned long size)
> +{
> +	int bits;
> +
> +	/*
> +	* We've already validated the user input and the value here must be
> +	* between PRAM_MAX_BLOCK_SIZE and PRAM_MIN_BLOCK_SIZE
> +	* and it must be a power of 2.
> +	*/

Should this comment have spaces after the tabs to be consistent with the
other multiline comments (pram_ioremap) and the coding style?

> +	bits = fls(size) - 1;
> +	sb->s_blocksize_bits = bits;
> +	sb->s_blocksize = (1<<bits);
> +}
> +
> +static inline void *pram_ioremap(phys_addr_t phys_addr, ssize_t size)
> +{
> +	void *retval;
> +
> +	/*
> +	 * NOTE: Userland may not map this resource, we will mark the region so
> +	 * /dev/mem and the sysfs MMIO access will not be allowed. This
> +	 * restriction depends on STRICT_DEVMEM option. If this option is
> +	 * disabled or not available we mark the region only as busy.
> +	 */
> +	retval = request_mem_region_exclusive(phys_addr, size, "pramfs");
> +	if (!retval)
> +		goto fail;
> +
> +	retval = ioremap_nocache(phys_addr, size);
> +
> +	if (retval)
> +		wrprotect(retval, size);
> +fail:
> +	return retval;
> +}

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