Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp927837ybt; Wed, 24 Jun 2020 15:04:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOgiYRD6SUwExQbc4b68/2gC6CUn0TJQClH8P0oPKedt2frKamczO0TVXObTohJqaLay8U X-Received: by 2002:aa7:d3cd:: with SMTP id o13mr14713329edr.176.1593036289916; Wed, 24 Jun 2020 15:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593036289; cv=none; d=google.com; s=arc-20160816; b=oNY8bHKNyS6SitzBVdcTDJsc2Jweea+22s4YMIJPvbvnPF7jJJ5Zs9BvA6UvJqqpfI dWUz0ZDthmLvluAUWklJBQLNF5Hb70wScs9tPTUSxn9LcAk15GQTVTQY//En4k5F7sib CsvrsCnUdigd+b3dRG5lZnGmZCCKO6UgC8k6HubIh5nL8C+jjLXsFStWhffvG9sc/fCX SgIhmuaM1mcqygLf07+bvtBEtNee4dCnv/s+gCTJTsG0eDCIX51yY1bVyGMeMAUWDXs5 OItV4OhXELLDADoZ+TFcJzSRtOIBTmgvDhutPW+J0Y1AN2jwFtZ/Ovz/ZScdbsX4l9i3 3NJA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OU9hxPukewkXRvLde3vGecBRHA8j0VV+Jg90d1DOcXc=; b=O9GhGCUvuq9xrEvydruEy2rRZlX7++SChxGxosSIrOfLi6pq1XS+SYknakv1/RHUzu HEIQaoAouVow/e8mkaNavfAyRIjvtx9fBpfDD7bNROtNf13/b/dhu3JtfMwdqjQ2n38E WOi80TdpLd1ypSC+expLShgrw6c5SZ1YTxcZpGTS+M3ynfI9P9zgSQmXFsL+GzTqjtK+ JuJb6hBNiVHis0ce+FGThYVLGluX2xYa2qo/gx/7j5yTNLiHthP457nyefZQ1lHRx0gh mq2vQ9YFGbR7veWa5YK/MENMiI2xc8WedgRHmfTlD6bQJ/rqwxltlmERfmKczBwSnXXA CDKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=pz4Gwz36; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s6si8447927ejo.502.2020.06.24.15.04.26; Wed, 24 Jun 2020 15:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=pz4Gwz36; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390652AbgFXVXk (ORCPT + 99 others); Wed, 24 Jun 2020 17:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390601AbgFXVXj (ORCPT ); Wed, 24 Jun 2020 17:23:39 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D60F3C061573 for ; Wed, 24 Jun 2020 14:23:37 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id a6so3700493wrm.4 for ; Wed, 24 Jun 2020 14:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OU9hxPukewkXRvLde3vGecBRHA8j0VV+Jg90d1DOcXc=; b=pz4Gwz36EmbLLeBqzMzfnP1XnxcMmgpvXGa+t2k6RhXPR65sMMYzJ0SEBfLj4Eg9Zn uZ6vFE0dd0jCjFcQpfN/MKVo4tY3c5LvBjdXqKFq/F/YPpDzX1eUUbPhVqzCee7KWzsD bwmuccx0BNMY7d+/ZQv2PVOINeBJvALCj8u20= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OU9hxPukewkXRvLde3vGecBRHA8j0VV+Jg90d1DOcXc=; b=P1aZ+qzYRAv1k966OqxqJuNYadXzAGNvwgUsLypc1t3O8xaGvuHl+BozKc3Vxn4jYY dX7wEFZ9Ss3TOiA1bCbRBwWsg+L6n1P2vVJIxZkqFcJjNzwH7aFY56kar25SYDCy479T lamkKKuMjHkCBK9uV8mDE6/s4bpj+lVUH7Mq6LtdR7CzLAfp24Hm6m9tY2EKiZcd2JfZ /BtN+t4/pLeDxhCqyZwOwLUmIB41EVL7x9R19iycIKVhoPW9yvTOJVg72Ikr0mE3yGYu nUu+XnR+14vPMSTJrnKzuPd7D91KT77stDtN5w9Fztka8ARcOxKRYxD2VsEeyGU06CmD 2f3A== X-Gm-Message-State: AOAM530FcKcClM1wFhFFOrCnFDk9nY3VP2nR/BI7jef+5LEUgVmHAh7z 6e5YtLLUTV6uKjuSkSqbBIjLt1u39XNRkQ== X-Received: by 2002:adf:ef89:: with SMTP id d9mr19574699wro.124.1593033816238; Wed, 24 Jun 2020 14:23:36 -0700 (PDT) Received: from localhost.localdomain (88-144-169-85.host.pobb.as13285.net. [88.144.169.85]) by smtp.gmail.com with ESMTPSA id f17sm8241261wrq.3.2020.06.24.14.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 14:23:35 -0700 (PDT) From: Ignat Korchagin To: jdike@addtoit.com, richard@nod.at, anton.ivanov@cambridgegreys.com, brendanhiggins@google.com, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Ignat Korchagin Subject: [RFC PATCH] Revert "um: Make CONFIG_STATIC_LINK actually static" Date: Wed, 24 Jun 2020 22:23:19 +0100 Message-Id: <20200624212319.403689-1-ignat@cloudflare.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 3363179385629c1804ea846f4e72608c2201a81e. This change is too restrictive. I've been running UML statically linked kernel with UML_NET_VECTOR networking in a docker "FROM: scratch" container just fine. As long as we don't reference network peers by hostname and use only IP addresses, NSS is not needed, so not used. In other words, it is possible to have statically linked UML and UML_NET_VECTOR (and other networking types) and use it, although with some restrictions, so let's not disable it. Additionally, it should be at least theoretically possible to use another libc (like musl, bionic etc) for static linking. I was able with some hacks to compile UML against musl, although the executable segfaults for now. But this option prevents even the research to be done. Signed-off-by: Ignat Korchagin --- arch/um/Kconfig | 8 +------- arch/um/drivers/Kconfig | 3 --- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 96ab7026b037..817a4c838a06 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -62,12 +62,9 @@ config NR_CPUS source "arch/$(HEADER_ARCH)/um/Kconfig" -config FORBID_STATIC_LINK - bool - config STATIC_LINK bool "Force a static link" - depends on !FORBID_STATIC_LINK + default n 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 @@ -76,9 +73,6 @@ 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 9160ead56e33..72d417055782 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -234,7 +234,6 @@ 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 @@ -246,7 +245,6 @@ 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 @@ -294,7 +292,6 @@ 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.20.1