Thread (17 messages) 17 messages, 3 authors, 2011-09-02

Re: linux-next: Tree for Aug 22 (evm)

From: Arnaud Lacombe <hidden>
Date: 2011-08-22 20:18:04
Also in: linux-next, lkml

Hi,

On Mon, Aug 22, 2011 at 3:53 PM, Randy Dunlap [off-list ref] wrote:
On Mon, 22 Aug 2011 14:53:04 +1000 Stephen Rothwell wrote:
quoted
Hi all,

[The kernel.org mirroring is a bit low today]
(on x86_64:)

When CONFIG_EVM=y, CONFIG_CRYPTO_HASH2=m, CONFIG_TRUSTED_KEYS=m,
CONFIG_ENCRYPTED_KEYS=m, the build fails with:

(.text+0x378aa): undefined reference to `key_type_encrypted'
evm_crypto.c:(.text+0x37992): undefined reference to `crypto_alloc_shash'
evm_crypto.c:(.text+0x37a24): undefined reference to `crypto_shash_setkey'
evm_crypto.c:(.text+0x37ad9): undefined reference to `crypto_shash_update'
evm_crypto.c:(.text+0x37aeb): undefined reference to `crypto_shash_final'
(.text+0x37b4b): undefined reference to `crypto_shash_update'
(.text+0x37c61): undefined reference to `crypto_shash_update'
(.text+0x37cb9): undefined reference to `crypto_shash_update'

even though EVM (Kconfig) selects ENCRYPTED_KEYS and TRUSTED_KEYS..
and even after I add "select CRYPTO_HASH2".

Is this because EVM is bool and kconfig is confused about 'select's
when a bool is selecting tristates?  Shouldn't the tristates become
'y' instead of 'm' if they are selected by a bool that is 'y'?
hum, I'd say that it should:

% cat Kconfig
config MOD
        bool
        default y
        option modules

config B
        tristate "B"
        default m

config A
        tristate "A"
        default y
        select B

% make alldefconfig
scripts/kconfig/conf --alldefconfig Kconfig
#
# configuration written to .config
#

% cat .config
#
# Automatically generated file; DO NOT EDIT.
# Linux Kernel Configuration
#
CONFIG_MOD=y
CONFIG_B=y
CONFIG_A=y

now, if A defaults to 'm', we have:

% cat .config
#
# Automatically generated file; DO NOT EDIT.
# Linux Kernel Configuration
#
CONFIG_MOD=y
CONFIG_B=m
CONFIG_A=m

Could you please produce a reduced testcase showing the problem ?

Thanks,
 - Arnaud
xconfig shows these symbol values:

Symbol: EVM [=y]
Type : boolean
Prompt: EVM support
Defined at security/integrity/evm/Kconfig:1
Depends on: SECURITY [=y] && KEYS [=y] && TCG_TPM [=m]
Location:
-> Security options
Selects: CRYPTO_HMAC [=m] && CRYPTO_MD5 [=m] && CRYPTO_SHA1 [=m] && CRYPTO_HASH2 [=m] && ENCRYPTED_KEYS [=m] && TRUSTED_KEYS [=m]


Hm, changing TCG_TPM to =y also changes TRUSTED_KEYS and ENCRYPTED_KEYS and
lots of CRYPTO_ symbols from =m to =y.  There must be some kind of min/max
symbol checking that is confused?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help