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] [day] [month] [year] [list]
Message-Id: <20141103.112947.963725164144191898.davem@davemloft.net>
Date:	Mon, 03 Nov 2014 11:29:47 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	clemens@...isch.de
Cc:	sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sparc64: Add preprocessor symbols for PAGE_* pgprot_t
 values.

From: Clemens Ladisch <clemens@...isch.de>
Date: Mon, 03 Nov 2014 10:44:40 +0100

> David Miller wrote:
>> I'd also rather the kernel use Kconfig based symbols to detect for
>> arch availability of feature X or Y, assuming things are CPP symbols
>> is very fragile at best.
> 
> It is certainly possible to use Kconfig-based symbols.  However, this
> would have its own fragility: adding, e.g., PAGE_KERNEL_SO to an arch
> requires that one remembers to update Kconfig, and if one forgets,
> a check like this:
> 
> #ifndef CONFIG_ARCH_HAS_PAGE_KERNEL_RO
> #define PAGE_KERNEL_RO PAGE_KERNEL /* fallback for this code */
> #endif
> 
> will not detect the error on sparc64 (if PAGE_KERNEL_RO were a CPP
> symbol, the compiler would complain about the redefinition).
> 
> So even if PAGE_KERNEL_RO is a variable, making it into a CPP symbol
> is beneficial.  And once it is a CPP symbol, introducing a separate
> Kconfig-based symbol is not necessary and just increases the chances
> of an error.

I'd rather code then use the symbol unconditionally, and we declare that
it's something every architecture must provide in some shape or form.

This CPP check business is fragile as hell and I'm not going to promote
it in the architectures I maintainer by applying patches like your's.

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