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:	Tue, 9 Jan 2007 14:42:03 -0800
From:	Andrew Morton <akpm@...l.org>
To:	Michael Halcrow <mhalcrow@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, tshighla@...ibm.com,
	theotso@...ibm.com
Subject: Re: [PATCH 3/3] eCryptfs: Encrypted passthrough

On Tue, 9 Jan 2007 16:23:37 -0600
Michael Halcrow <mhalcrow@...ibm.com> wrote:

> +				page_virt = (char *)kmap(page);

Do we _have_ to use kmap here?  It's slow and theoretically deadlocky. 
kmap_atomic() is much preferred.

Can the other kmap() calls in ecryptfs be converted?

We'd actually like to remove kmap() one day.  Not much chance of that, but
it's an objective.

> +				if (!page_virt) {
> +					rc = -ENOMEM;
> +					printk(KERN_ERR "Error mapping page\n");
> +					goto out;
> +				}
> +				memset(page_virt, 0, PAGE_CACHE_SIZE);
> +				if (page->index == 0) {
> +					rc = ecryptfs_read_xattr_region(
> +						page_virt, file->f_path.dentry);

Are we assured that ecryptfs_read_xattr_region() cannot overrun the page?

> +					set_header_info(page_virt, crypt_stat);
> +				}

The kernel must always run flush_dcache_page() after modifying a pagecache
page by hand.  Please review all of ecryptfs for this.


> +				kunmap(page);
-
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