From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=FROM_EXCESS_BASE64, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0C82C43144 for ; Wed, 27 Jun 2018 12:37:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B82026211 for ; Wed, 27 Jun 2018 12:37:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B82026211 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934370AbeF0MhO (ORCPT ); Wed, 27 Jun 2018 08:37:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:52940 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933884AbeF0MhK (ORCPT ); Wed, 27 Jun 2018 08:37:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 10C1DAF75; Wed, 27 Jun 2018 12:37:08 +0000 (UTC) Date: Wed, 27 Jun 2018 14:37:05 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: linux-kernel@vger.kernel.org Cc: Takashi Iwai , Andreas Schwab , Michal Kubecek , Masahiro Yamada , Michal Marek , Jonathan Corbet , Yoshinori Sato , Rich Felker , "David S. Miller" , Jeff Dike , Richard Weinberger , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Kees Cook , Philippe Ombredanne , Greg Kroah-Hartman , Ulf Magnusson , Jeff Mahoney , "Peter Zijlstra," , Mathieu Desnoyers , Frederic Weisbecker , Randy Dunlap , Dominik Brodowski , Nicholas Piggin , linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, Michal =?UTF-8?B?U3VjaMOhbmVr?= Subject: due to kconfig changes kernel config file is no longer sufficient for configuring the kernel Message-ID: <20180627143705.5a1fed1c@kitsune.suse.cz> Organization: SUSE Linux X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, in the x86 Kconfig we have this: # Select 32 or 64 bit config 64BIT bool "64-bit kernel" if "$(ARCH)" = "x86" default "$(ARCH)" != "i386" ---help--- Say yes to build a 64-bit kernel - formerly known as x86_64 Say no to build a 32-bit kernel - formerly known as i386 Since commit 104daea149c4 ("kconfig: reference environment variables directly and remove 'option env='") the value of ARCH is not saved in the kernel config. Since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the value of 64BIT is not saved if the ARCH is set i386 or x86_64 because the symbol is not visible. There is a number of ways to hack this particular case to work. However, there is a more general problem with this. Some config options may depend on the environment, may not be saved, and the environment is not saved either. So in the end all the infrastructure with symlinks from module directory pointing to the kernel source and object directory is useless. To interpret the config stored there you need the environment and that is not saved anywhere. So if you try to build out-of-tree module it might end up reconfiguring your kernel and producing useless modules. Is there any plan to fix this? Thanks Michal