Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6410753imm; Wed, 27 Jun 2018 07:18:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIGToKjjk4Wu/ZgKkkKX55xeyr1qQyZlJqsy/3G7YzQuVn4AZQndOIJFNtCcMA6ysv2EtGx X-Received: by 2002:a17:902:8b8c:: with SMTP id ay12-v6mr6342214plb.74.1530109121370; Wed, 27 Jun 2018 07:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530109121; cv=none; d=google.com; s=arc-20160816; b=tifouJ9Ft5IMgbsYoJew2eWdxj3UjbeSjV7DrWQu15mQcii5m+WM6UUvQfyYd4/lLN pWXrZqrM9Wp03Rtzwn63ArX80nGdxlXfB+P3ZFCFnCieqguC2QvXpYqVjgi40H9keDdW 1Y9G6bQ6fBA2xdSsACdBb07zBxZnXZYPRdHejV5yKd4jfHXPmCOajyRl6Tr6GzKmYs7Z 95QdZbAFR/BSZYizWpp2voUs7M5mwZ1jkO9lW9I/+nQtqILAQEWcojqkPzXDgV0x9xaE 1mtPykSgb5PsDcrTnBTIsRjsduCuAZiAuWWStavzmOnQzSHjmpBl6Xlim3KcydtxTljR /NHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:dkim-filter:arc-authentication-results; bh=4tTQ/UAlhdq7BJOGvQ7ghf1e9mWu67LxJ92mf+RgWJM=; b=yAA9q4BvTGpRLrTDS0XTG+j2365VsJgOww88zMRcWTXwzHgi1hANMDPK9y4cYpmerL 6gqJ3uW9N/APKxjUkgNqLBt5J0WmJu+UqDGENFJFAkm491w+3kvuWXvisvcmX9+8PUUI 7ssi8awRnHIMr4Mm8rYOUSYvg1XgD3Nj6u7qGIuuKd86K4iAZws221VACjxk4Y3s5pMY g+D6rFebAqeMr484ayxTh7bQSO763OVkl8JwJgVzHqnMbrL4gVWxg1EBtk00bdF7QY+U YEA7yN16jmJmDtlEtgty4HbE36Aczw7xgqNc0k/a/iyEi8C0kArAjff5+C2mA9dG8gsn 49LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=r8BVh9WE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10-v6si3380771pgc.163.2018.06.27.07.18.26; Wed, 27 Jun 2018 07:18:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=r8BVh9WE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934682AbeF0OIN (ORCPT + 99 others); Wed, 27 Jun 2018 10:08:13 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:53185 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932166AbeF0OIL (ORCPT ); Wed, 27 Jun 2018 10:08:11 -0400 Received: from mail-ua0-f174.google.com (mail-ua0-f174.google.com [209.85.217.174]) (authenticated) by conssluserg-06.nifty.com with ESMTP id w5RE82Yf005101; Wed, 27 Jun 2018 23:08:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com w5RE82Yf005101 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1530108484; bh=4tTQ/UAlhdq7BJOGvQ7ghf1e9mWu67LxJ92mf+RgWJM=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=r8BVh9WEDX5bEYEPy+0py0XdtRLhyZRlFPR1087AQutTRj/uPqlU5hAgHNu7/SwDb ye8oroysgk7n5TeS/gghmKeeiO/SGHtwBLZFoEBpnOc/ClPgLcL5mmwuVEXLEEfSYq NmMYw3AtF+9Glbner/6rYiG7tkhdy9C19ubzanLqMCQI+mwVH7zSq8RYWrGHp7V7ap V6NA+/xLEWaNhRCIkiDJs4m8SMUH+5xvK2SuYakkAyt2Oov4M0kIfjOCIrO19uz7Py g3v9um6sgsZq3jPLX0pTyC/tQww7WcnMLwrMi2CpJg0h5UKi88zWXecsKc1SJPt4uT L7KF6PIwD7dNA== X-Nifty-SrcIP: [209.85.217.174] Received: by mail-ua0-f174.google.com with SMTP id r10-v6so1349287uao.1; Wed, 27 Jun 2018 07:08:03 -0700 (PDT) X-Gm-Message-State: APt69E1GxRIR0ISY5+RCkkJcV3e5s8429tSJnqr5zsoEzahdtAgJ5ZF3 tdrYldVhBOoLdirpCEuACV3jkETmPmopV9CZPX0= X-Received: by 2002:ab0:5061:: with SMTP id z30-v6mr3831599uaz.82.1530108482484; Wed, 27 Jun 2018 07:08:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:3308:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 07:07:21 -0700 (PDT) In-Reply-To: <20180627143705.5a1fed1c@kitsune.suse.cz> References: <20180627143705.5a1fed1c@kitsune.suse.cz> From: Masahiro Yamada Date: Wed, 27 Jun 2018 23:07:21 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: due to kconfig changes kernel config file is no longer sufficient for configuring the kernel To: =?UTF-8?Q?Michal_Such=C3=A1nek?= Cc: Linux Kernel Mailing List , Takashi Iwai , Andreas Schwab , Michal Kubecek , Michal Marek , Jonathan Corbet , Yoshinori Sato , Rich Felker , "David S. Miller" , Jeff Dike , Richard Weinberger , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , 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 mailing list , "open list:DOCUMENTATION" , Linux-sh list , sparclinux , linux-um@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi. 2018-06-27 21:37 GMT+09:00 Michal Such=C3=A1nek : > Hello, > > in the x86 Kconfig we have this: > > # Select 32 or 64 bit > config 64BIT > bool "64-bit kernel" if "$(ARCH)" =3D "x86" > default "$(ARCH)" !=3D "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=3D'") the value of ARCH is not saved in > the kernel config. I think this commit is unrelated. It was just a syntax change. Unless I am missing something, we have never saved ARCH in the .config in the past. > 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. This is correct. It was discussed a few weeks ago. https://lkml.org/lkml/2018/6/5/847 > 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. Which environment variables in particular are in your mind? As for ARCH, you need to pass the same ARCH as you used for building the ke= rnel. (For native building, you do not have to pass ARCH explicitly, though.) As for CC, HOSTCC, etc. yes, these are new 'unsaved' environments. CONFIG options now depend on the compiler. This is the concept suggested by Linus Torvalds. > 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. No. out-of-tree module building never ever re-configures the kernel. out-of-tree modules are built with exactly the same configuration as used for the kernel. There is one more assumption here. Greg-KH said: We don't ever support the system of loading a module built with anything other than the _exact_ same compiler than the kernel was. (https://lkml.org/lkml/2017/10/4/496) Based on that statement, CONFIG options depending on 'CC' are valid for out-of-tree modules as well. > Is there any plan to fix this? > > Thanks > > Michal > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" i= n > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --=20 Best Regards Masahiro Yamada