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: <1306922609.4405.88.camel@localhost>
Date:	Wed, 01 Jun 2011 13:03:29 +0300
From:	Artem Bityutskiy <dedekind1@...il.com>
To:	Ben Gardiner <bengardiner@...ometrics.ca>
Cc:	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
	"Matthew L. Creech" <mlcreech@...il.com>
Subject: Re: [PATCH 1/3] UBIFS: assert no fixup when writing a node

On Mon, 2011-05-30 at 14:56 -0400, Ben Gardiner wrote:
> The current free space fixup can result in some writing to the UBI volume
> when the space_fixup flag is set.
> 
> To catch instances where UBIFS is writing to the NAND while the space_fixup
> flag is set, add an assert to ubifs_write_node().
> 
> Signed-off-by: Ben Gardiner <bengardiner@...ometrics.ca>
> 
> ---
>  fs/ubifs/io.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
> index 166951e..db298de 100644
> --- a/fs/ubifs/io.c
> +++ b/fs/ubifs/io.c
> @@ -763,6 +763,8 @@ int ubifs_write_node(struct ubifs_info *c, void *buf, int len, int lnum,
>  	if (c->ro_error)
>  		return -EROFS;
>  
> +	ubifs_assert(!c->space_fixup);
> +

I've moved this assert upper to where all other assertions are placed.

I've also added this assertion to 'ubifs_wbuf_write_nolock()' because it
is the other often used write path.

And pushed to the UBIFS tree, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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