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: <20091124124830.395115a0.akpm@linux-foundation.org>
Date:	Tue, 24 Nov 2009 12:48:30 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Ilya Loginov <isloginov@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, David Woodhouse <dwmw2@...radead.org>,
	linux-kernel@...r.kernel.org, Peter Horton <phorton@...box.co.uk>,
	"Ed L. Cashin" <ecashin@...aid.com>,
	Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [PATCH] mtd: fix mtd_blkdevs problem with caches on some
 architectures (2.6.31)

On Sun, 22 Nov 2009 23:55:39 +0300
Ilya Loginov <isloginov@...il.com> wrote:

> > > I tried this way from the beginning, and to avoid redefinitions I enclose
> > > everything in #if #endif in *.c files. I think it is not very good.
> > > So there are two possibilities.
> > > 
> 
> Ah. I think the first choice is always the best choise. =)
> 
> > In .h:
> > 
> > #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
> > extern void rq_flush_dcache_pages(struct request *rq);
> > #else
> > static inline void bio_flush_dcache_pages(struct bio *bi)
> > {
> > }
> > #endif
> > 
> > In .c:
> > 	
> > #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
> > void rq_flush_dcache_pages(struct request *rq)
> > {
> > 	struct req_iterator iter;
> > 	struct bio_vec* bvec;
> > 
> > 	rq_for_each_segment(bvec, rq, iter)
> > 		flush_dcache_page(bvec->bv_page);
> > }
> > EXPORT_SYMBOL(rq_flush_dcache_pages);
> > #endif
> 
> This is 2) =)
> 
> Thanks a lot for your help and comments!
> 
> Signed-off-by: Ilya Loginov <isloginov@...il.com>

Looks good to me, but...

Patch doesn't vaguely apply to linux-next because of arch/sh changes. 
I was going to fix that but afaict your assertion that sh doesn't
implement flush_dcache_page() appears to be untrue in linux-next and a
bit of thought is needed there.

Also, please provide a nice chagnelog whcih describes the change, and
our reasons for making it.

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