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: <20120111203651.GR2618@outflux.net>
Date:	Wed, 11 Jan 2012 12:36:51 -0800
From:	Kees Cook <keescook@...omium.org>
To:	Tim Gardner <tim.gardner@...onical.com>
Cc:	linux-fsdevel@...r.kernel.org, tyler.hicks@...onical.com,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 1/2] ecryptfs: Improve metatdata read failure logging

On Wed, Jan 11, 2012 at 06:00:41PM +0100, Tim Gardner wrote:
> There are 3 read failure cases in ecryptfs_read_metadata(), but only 2
> of them are uniquely noted by kernel log messages. This patch
> identifies and logs each read failure case. It also correctly interprets
> a negative return value from ecryptfs_read_lower().
> 
> Removes unnecessary variable initialization.
> 
> Cc: linux-kernel@...r.kernel.org
> Cc: stable@...r.kernel.org
> Cc: Tyler Hicks <tyler.hicks@...onical.com>
> Signed-off-by: Tim Gardner <tim.gardner@...onical.com>

I always like more verbose error reporting. :)

Reviewed-by: Kees Cook <keescook@...omium.org>

> +		printk(KERN_ERR "%s: Could not read %u bytes\n",
> +			__func__, crypt_stat->extent_size);

I wonder if eCryptfs in general might want to consider using the "pr_fmt"
and "pr_*" macros to do printk handling:

#define pr_fmt(fmt) __func__ ": " fmt

...

	pr_err("Could not read %u bytes\n", crypt_stat->extent_size);


-Kees

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