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: <20091122023659.a9cf6980.isloginov@gmail.com>
Date:	Sun, 22 Nov 2009 02:36:59 +0300
From:	Ilya Loginov <isloginov@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	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)

> And then, in a .c file:
> 
> #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
> #error "you lose"
> #endif
> 
> and, of course:
> 
> #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
> <implement real code>
> #else
> <implement empty stubs>
> #endif
> 
> 
> This way
> 
> a) the definition site for ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE is
>    right next to the definition site for flush_dcache_page(), instead
>    of being in some random remote file and
> 
> b) people can't forget to implement ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE.
> 
> 
> Generally we prefer to avoid defining ARCH_HAS_FOO in header files and
> we prefer to control the definition in Kconfig.  But it sounds like we
> have a special case here..
> 

I agree. I think this is the best way. I will rewrite the patch.
Thank you!

-- 
Ilya Loginov <isloginov@...il.com>
--
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