Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1227980ybv; Fri, 7 Feb 2020 17:10:12 -0800 (PST) X-Google-Smtp-Source: APXvYqx5h0bCcjupMvXsI6ONaMiFRfRDVyB2vsX4uIt3yoweSUQB/QWeUrGabWKKHSb2Vj31zjw5 X-Received: by 2002:a05:6830:11c8:: with SMTP id v8mr1546514otq.330.1581124212578; Fri, 07 Feb 2020 17:10:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581124212; cv=none; d=google.com; s=arc-20160816; b=Yf8wTMCmhlfs6fvpqym5qMCrz+eKx2W6PyLubAJ6Uk07xl3u0KCrbW/V45iYZH6i4A c7wnH4gRhmq91uNciYydZcswiieIEkbasbYMUwWdjgvBvPtNW577JLSyDEAgiybX+lN7 ZTyE6DwgKcHlS6K4GzdkYmg5zVGUQ4jGzUwV8aSUFKJWA6qAPJ0OEogzmPQWZbAObS6M sIu0lN+qJc0EuLsKyBQUYjivB1PRYDDuoDgCceI273q8F95Mihugnoe3818DbHztKI63 ywefCu1bjK+Wt231jNdADEQQ5NZ9Zd/Kxp/lwoOeT6dy1ouMUS/KEjSqKHCq2Ez++2Sp CxMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c8Omrr9pFTToDd+rF07svRekidnIs/Si9O3nVW03Ilk=; b=HDRjQX+KDx9+s1TCUSFxAlYsL1Puj1JN03vcA5xl5+PtUJoyl0KeybznKH5bUq2wup pQOZUrFHsIiKSC/MoFTz4LYHXMLP3r2D5Plzy+sVXtj0ZPTfTHmWPFQ1Z09fcg23z8IX vFZQ3SSXSeAx5u9xOEdtRv3wLVeUVAAfPy7hyKb36CXbKOyISjAto7GLxMfsnWPSlWeH lfvS7uFHUWHohj6ce8FSHdbVKwx4PXtosA1oTBf+79v1G4T9j0yC4tc+BAdZHchlln4D Bn0PPISzXqiAX/3vR5AocBizzXtJRlTpDYDNhaiFTmCpKo/FlLelmp5eNSKKUJQhYs76 OGIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LJFc15Hh; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24si4673068oih.24.2020.02.07.17.09.54; Fri, 07 Feb 2020 17:10:12 -0800 (PST) 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=@google.com header.s=20161025 header.b=LJFc15Hh; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727347AbgBHBIH (ORCPT + 99 others); Fri, 7 Feb 2020 20:08:07 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43452 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727071AbgBHBIH (ORCPT ); Fri, 7 Feb 2020 20:08:07 -0500 Received: by mail-pl1-f194.google.com with SMTP id p11so426622plq.10 for ; Fri, 07 Feb 2020 17:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c8Omrr9pFTToDd+rF07svRekidnIs/Si9O3nVW03Ilk=; b=LJFc15HhLy700n54m2oq0f+y2nBxljFHS94MUSpBpJ5KGnTqFcKidi5pQsqqmiRNsT p5oKYa63oxRjZORIKogqkkMIMqoXaymQ6McBlDEeLsNDNep5MwUDnKcvuzmDvM1+N3K4 n/4Roy7lXr8+BQ0CpPjSXTYLrfIHk/X/aEAbUABFMw7UxT+/k0437V26lBDMCN8PVJyW QVEhABhoAfgabM2H3f6egFH9IvB02Cu/Pn+DJuIZRuh8TYwRmfaIdsDsqarAoQ4q6P63 vkhnXPx3jAuzM5xTds5NOgIMHMZsStYTNCTtEppKKKNCtuk2u+mC0ffPIK7ZCgi1udR0 MiRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c8Omrr9pFTToDd+rF07svRekidnIs/Si9O3nVW03Ilk=; b=bzKGk7XPUXu2b4GEchl+21X7oTj+OYc+qz8sMINKbIEhEDaGooaCUMPgjmHqQSU30c wxVRd6ZEP++u5PDU6n8iK/OtDZtuMGj0cnP0eIccO2sSCqP/M4PHm4zDTSPVxNle/jAH PSTsB2kMW7Zdr6wD9Ad4A2834sOEtcImgp+SCw8j+J4MfTXFoynK2+AIK8gC8YUYpn6r LqZWaDMwUzf5miZdyAi7hGKjKuF4zSYXy6Jx+5oeA3RzLy7i1D/e9PhhHEPzL/hhdlJy L2A5UsQqoZzvpl4mMOtYYv+qLPuNJcU/8Gzt1AmMNojwi/mhtYDupbeYuxBVCm6+EWkr 3Y7w== X-Gm-Message-State: APjAAAU0Y5glW/IrJ9XEHd96drOLbEwxJxCRGfsewvvhzr6x0lzzCih/ IiZ+vrgydxtkOI7hGLqNMbZyvmlUMySCog5YMT1bvw== X-Received: by 2002:a17:902:9a4c:: with SMTP id x12mr1098572plv.297.1581124086566; Fri, 07 Feb 2020 17:08:06 -0800 (PST) MIME-Version: 1.0 References: <20200124221401.210449-1-brendanhiggins@google.com> In-Reply-To: <20200124221401.210449-1-brendanhiggins@google.com> From: Brendan Higgins Date: Fri, 7 Feb 2020 17:07:54 -0800 Message-ID: Subject: Re: [PATCH v3] uml: make CONFIG_STATIC_LINK actually static To: Jeff Dike , Richard Weinberger , Anton Ivanov , Geert Uytterhoeven , James McMechan Cc: linux-um , Linux Kernel Mailing List , David Gow Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 24, 2020 at 2:14 PM Brendan Higgins wrote: > > Currently, CONFIG_STATIC_LINK can be enabled with options which cannot > be statically linked, namely UML_NET_VECTOR, UML_NET_VDE, and > UML_NET_PCAP; this is because glibc tries to load NSS which does not > support being statically linked. So make CONFIG_STATIC_LINK depend on > !UML_NET_VECTOR && !UML_NET_VDE && !UML_NET_PCAP. > > Link: https://lore.kernel.org/lkml/f658f317-be54-ed75-8296-c373c2dcc697@cambridgegreys.com/#t > Signed-off-by: Brendan Higgins > --- Ping. > arch/um/Kconfig | 8 +++++++- > arch/um/drivers/Kconfig | 3 +++ > 2 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/arch/um/Kconfig b/arch/um/Kconfig > index 0917f8443c285..28d62151fb2ed 100644 > --- a/arch/um/Kconfig > +++ b/arch/um/Kconfig > @@ -62,9 +62,12 @@ config NR_CPUS > > source "arch/$(HEADER_ARCH)/um/Kconfig" > > +config FORBID_STATIC_LINK > + bool > + > config STATIC_LINK > bool "Force a static link" > - default n > + depends on !FORBID_STATIC_LINK > help > This option gives you the ability to force a static link of UML. > Normally, UML is linked as a shared binary. This is inconvenient for > @@ -73,6 +76,9 @@ config STATIC_LINK > Additionally, this option enables using higher memory spaces (up to > 2.75G) for UML. > > + NOTE: This option is incompatible with some networking features which > + depend on features that require being dynamically loaded (like NSS). > + > config LD_SCRIPT_STATIC > bool > default y > diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig > index 72d4170557820..9160ead56e33c 100644 > --- a/arch/um/drivers/Kconfig > +++ b/arch/um/drivers/Kconfig > @@ -234,6 +234,7 @@ config UML_NET_DAEMON > config UML_NET_VECTOR > bool "Vector I/O high performance network devices" > depends on UML_NET > + select FORBID_STATIC_LINK > help > This User-Mode Linux network driver uses multi-message send > and receive functions. The host running the UML guest must have > @@ -245,6 +246,7 @@ config UML_NET_VECTOR > config UML_NET_VDE > bool "VDE transport (obsolete)" > depends on UML_NET > + select FORBID_STATIC_LINK > help > This User-Mode Linux network transport allows one or more running > UMLs on a single host to communicate with each other and also > @@ -292,6 +294,7 @@ config UML_NET_MCAST > config UML_NET_PCAP > bool "pcap transport (obsolete)" > depends on UML_NET > + select FORBID_STATIC_LINK > help > The pcap transport makes a pcap packet stream on the host look > like an ethernet device inside UML. This is useful for making > -- > 2.25.0.341.g760bfbb309-goog >