From patchwork Fri Jan 13 04:49:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Foley X-Patchwork-Id: 1725686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KUqHgZ91; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=pefoley.com header.i=@pefoley.com header.a=rsa-sha256 header.s=google header.b=oSg0uTIK; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NtTV63PxNz23fp for ; Fri, 13 Jan 2023 15:49:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b4BKDSwLnuDlEM0QdUL4x6bj0QS9hISLNF5BHiHQoh8=; b=KUqHgZ91udH5vw 8uXSYojZcqkkwYXUxybSEnWWzYsgufwJA7MroMyZRYv1RQTBX5jG39iZUEgRJpY0RWgq5znUbVyq0 YHuTBCI2ZPgE1WbBaSreY4FeHDl+TRybYyjDgTfC+TE4MctsyTZHscJT8qxdV315WlW1TxlYdgbIC h//XfZ3wt+2G+9WMcHy+6K/0TVSXk6ZLWTOuFKdCoO3T3gpxaF4/CWWbO80VBJBcTUtX90IJr0t1z gZTJBPXcbR7kwvQCRIvG6dZqg77E90Vk1pM4H4/mjmZML5cW+Rs9maR360qAfNM2eB4H53oOYM5Un oE/8kUUFmjhw4VkF3Bag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0I-000RN8-KO; Fri, 13 Jan 2023 04:49:22 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0E-000RLD-3s for linux-um@lists.infradead.org; Fri, 13 Jan 2023 04:49:19 +0000 Received: by mail-qt1-x82f.google.com with SMTP id g9so3641843qtu.2 for ; Thu, 12 Jan 2023 20:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pefoley.com; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lVbqtFvEqcEY6PTmCOfzPzIYvqXqj8MQaEjPBYbJAVg=; b=oSg0uTIKfexVL+8ythAlt7gKQD/HGKHc+xpRHILJIbXc/Q6TtTwAm9x3UWR9dlzThP PjoCNQjMofO/IuVqMEF74cp1PkNogOp+PcpAFL2pivlh//Mz+FnEt/Zc80N/JXgNln/A 8mcDcquFzM7ANPNCVQiN/Bsv6C2yDAJnlJf6o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lVbqtFvEqcEY6PTmCOfzPzIYvqXqj8MQaEjPBYbJAVg=; b=f/g06w9hXiibh6LX34G6DJUzoCZyKPEs8whEWzST4y7+K9XB50E5RJ1nIwm4ne3b3Z Awaicb/5vDLAxHO1JBxjORh7YywteyLhGnxiLPt+rsZScda9QHD7rGpEJdIO8TaW/Wea Plf/2PODE8yW6JL/zz8Hh+/0lg4w1P7Wqn5OTi5RBUO7c4bAWLyAE7Pk0ijl1UOrYZVt Tiu3VPVDQ/e+jm9OGzGaU15eYQoCgjX18E7kvp3ueLCfz+MgIdPAUdN7jDPQPED6FAwM xsjQlCY9hlPfpQKuXe0U7abZnH+2mqYdG6CDnilZcjII+RqPbdsjOeuiiPUe0j9BhBaK Ijhg== X-Gm-Message-State: AFqh2kpAU14kpOnjDytRQJkO75dPHQd3pUeHc3vexWnzv9wytY0/A6JK rG7ruDNkAuUG4m2gzSIGHExpaA== X-Google-Smtp-Source: AMrXdXs+4Q/0riaBJeBu43Ip9QqbHlVe2IR4rPwv7GEQW2g23YhJETxm7QMFvfo07vTpZzy0lcWyfA== X-Received: by 2002:a05:622a:1750:b0:3ad:d7a6:76d8 with SMTP id l16-20020a05622a175000b003add7a676d8mr30209523qtk.38.1673585355266; Thu, 12 Jan 2023 20:49:15 -0800 (PST) Received: from [192.168.1.3] ([2600:4040:29fb:d300:887b:7eff:fe74:68b2]) by smtp.gmail.com with ESMTPSA id s11-20020a05620a0bcb00b00704a9942708sm12099472qki.73.2023.01.12.20.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:49:14 -0800 (PST) From: Peter Foley Date: Thu, 12 Jan 2023 23:49:07 -0500 Subject: [PATCH 1/4] um: Make the definition of cpu_data more compatible MIME-Version: 1.0 Message-Id: <20230112-um-v1-1-6bec9e97ad13@pefoley.com> References: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> In-Reply-To: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> To: Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Peter Foley X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1673585354; l=1683; i=pefoley2@pefoley.com; s=20230111; h=from:subject:message-id; bh=aGrL0ysPMYznOqdL0cA76sdMuDBI2JGj/mTkJStMEDk=; b=N2azVPGy0zYLU0iU3/UHyqtpzJsGGCVO2bIRlbOLxNGtGUyvZZ/Jdj31qhwLcIqfA33a965MpYY5 tv/1TV+mARDuKlsafc554to1VTS6vsw1ltMTV8PZOe4nzSx4GHum X-Developer-Key: i=pefoley2@pefoley.com; a=ed25519; pk=DCQqIdN6rHnvfQH58WQiQzJFfGUo1HyWSvdYG8vnO5o= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_204918_198580_E6E83E20 X-CRM114-Status: GOOD ( 10.53 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Match the x86 implementation to improve build errors. Noticed when building allyesconfig. e.g. ../arch/um/include/asm/processor-generic.h:94:19: error: called object is not a function or function pointer 94 | #define cpu_data (&boot_cpu_data) | ~^~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgp [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:82f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Match the x86 implementation to improve build errors. Noticed when building allyesconfig. e.g. ../arch/um/include/asm/processor-generic.h:94:19: error: called object is not a function or function pointer 94 | #define cpu_data (&boot_cpu_data) | ~^~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:16: note: in expansion of macro ‘cpu_data’ 2157 | return cpu_data(first_cpu_of_numa_node).apicid; Signed-off-by: Peter Foley --- arch/um/include/asm/processor-generic.h | 2 +- arch/um/kernel/um_arch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index bb5f06480da9..7414154b8e9a 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h @@ -91,7 +91,7 @@ struct cpuinfo_um { extern struct cpuinfo_um boot_cpu_data; -#define cpu_data (&boot_cpu_data) +#define cpu_data(cpu) boot_cpu_data #define current_cpu_data boot_cpu_data #define cache_line_size() (boot_cpu_data.cache_alignment) diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 786b44dc20c9..8dcda617b8bf 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -96,7 +96,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) static void *c_start(struct seq_file *m, loff_t *pos) { - return *pos < nr_cpu_ids ? cpu_data + *pos : NULL; + return *pos < nr_cpu_ids ? &boot_cpu_data + *pos : NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) From patchwork Fri Jan 13 04:49:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Foley X-Patchwork-Id: 1725687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=NYh3hUDt; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=pefoley.com header.i=@pefoley.com header.a=rsa-sha256 header.s=google header.b=ThajRpZi; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NtTV66S2Qz23g9 for ; Fri, 13 Jan 2023 15:49:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zCrQWoWX3kwpEnsX/d1KoXaODnVpopHpgvGanQX1raI=; b=NYh3hUDtQjh3w7 AfzbhKqsVTD3zCp1z/VnHYKaSQzcB/xHHolUEu+EbWqbmTKe2VpPWacXF/COVcXFnau+fHHI88sH6 qhpi/eVj66u2INoKggTq+B9pEY2WlByGkTRkOg5PrJwIWKOdaBtrz9xdOa+HG2IxQ5nCRHR4jUu62 zwRJtHr1r7yPuBp+dfulZ69jPRUHdMiAUD3znm7VvzhaP9hdFzlnwxTv0ggPq/uSZWsaJHJ+VBtIf 6mKK53E1JRW2NYUvfFUEVTZxton2He5FHz7YViq8MiyzXFiQDY27lcGVaCvns1wulkQRfsgXIKBxl gJ4jqWQdQMaOmRV4doFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0J-000RNI-8P; Fri, 13 Jan 2023 04:49:23 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0E-000RLF-98 for linux-um@lists.infradead.org; Fri, 13 Jan 2023 04:49:20 +0000 Received: by mail-qt1-x82e.google.com with SMTP id j15so12796578qtv.4 for ; Thu, 12 Jan 2023 20:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pefoley.com; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zKL+FkRBVGdlcDPsmoeX6zsOGWo6bw9MhMVT8FhJJdU=; b=ThajRpZiQS+ExcexJ90RPZlFJIxRsZQjG67taK6tWkRw9iMA3nan6BucM5DTe4h9zw VuF25zZYkp7yPwo26kEeiPLtEHt+4ZiKwSJ0sKf16Bdcuoz1Q04Sm6usexU2OigzL5Yi /iGZLdM4lZHliaMCBWlR1YYumF/AWcpL/1ZUE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zKL+FkRBVGdlcDPsmoeX6zsOGWo6bw9MhMVT8FhJJdU=; b=vZUxy3D/ILu2uO/VViB8KltKl1BGsTIWddLhbRfqzlViMVKbtt6Wepa9p6N7mJ/3tY DR28xBWcVrgEf3Rd3HU8IMmxhI50OOpZrlTf58oS+WqIcn8a4Qobsnc3bphD7IIXiBrl JXM7SiFUD5pLR+9nQBEwAW2ZFRnRJiat+NcpR73g2ckEtRGTQnr3cbHbZNHoaQSj6EkG h0YZ1cR4zabnOJoP4CJELddt3TByO50dN66rwRx/QGqsnYXlqqGDuWSND3JCYFVkYXNE nvEDhPKBMCiwSMgQlnGGR0kRdo5vAWzKEs0YftRk8nAEAR7DeLOoawXrYRiaH5uV50sm tjGg== X-Gm-Message-State: AFqh2kqKlmgx2jSdnqLZeKv4o4fqWn4atNhxnLEHXjDytp4TQl5PPbg0 OkGKCq9z3QpHlV9zINwzpY8g8Hy3CF+KofLGLbk= X-Google-Smtp-Source: AMrXdXu6WsXDkaK3qQyqiRnnE21ZhANn7yzKVtm6zCjaqywxitsRsQfF5r/SyGQmxC6Ta4YBcz0Ddg== X-Received: by 2002:a05:622a:1e8c:b0:3ad:14d0:e8b8 with SMTP id bz12-20020a05622a1e8c00b003ad14d0e8b8mr27510609qtb.26.1673585355803; Thu, 12 Jan 2023 20:49:15 -0800 (PST) Received: from [192.168.1.3] ([2600:4040:29fb:d300:887b:7eff:fe74:68b2]) by smtp.gmail.com with ESMTPSA id s11-20020a05620a0bcb00b00704a9942708sm12099472qki.73.2023.01.12.20.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:49:15 -0800 (PST) From: Peter Foley Date: Thu, 12 Jan 2023 23:49:08 -0500 Subject: [PATCH 2/4] um: Avoid pcap multiple definition errors MIME-Version: 1.0 Message-Id: <20230112-um-v1-2-6bec9e97ad13@pefoley.com> References: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> In-Reply-To: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> To: Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Peter Foley X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1673585354; l=1145; i=pefoley2@pefoley.com; s=20230111; h=from:subject:message-id; bh=6+vpUXmt9fMS9wiEsw48LBnr2Y8Q2+1VbsxVT5rxS4s=; b=ivWCsOmTeN9z2HCdfQL6ie4FA5ZbD21inE4lJMPPNuOfy5kT9In2CLmOBuwihABF5gX12oK1JB1R IxexZ61xBZ6QMNZ2ZjMihtKqGDBkWxJbBR7xVqq7XtCA1LMymnK9 X-Developer-Key: i=pefoley2@pefoley.com; a=ed25519; pk=DCQqIdN6rHnvfQH58WQiQzJFfGUo1HyWSvdYG8vnO5o= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_204918_348385_A5E72E1D X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Change the function name in pcap_kern to avoid conflicting with libpcap.a. e.g. ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/libpcap.a(pcap.o): in function `pcap_init': (.text+0x7f0): multiple definition of `pcap_init'; arch/um/drivers/pcap_kern.o:pcap_kern.c:(. [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:82e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Change the function name in pcap_kern to avoid conflicting with libpcap.a. e.g. ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/libpcap.a(pcap.o): in function `pcap_init': (.text+0x7f0): multiple definition of `pcap_init'; arch/um/drivers/pcap_kern.o:pcap_kern.c:(.text.unlikely+0x0): first defined here --- arch/um/drivers/pcap_kern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c index cfe4cb17694c..25ee2c97ca21 100644 --- a/arch/um/drivers/pcap_kern.c +++ b/arch/um/drivers/pcap_kern.c @@ -15,7 +15,7 @@ struct pcap_init { char *filter; }; -void pcap_init(struct net_device *dev, void *data) +void pcap_init_kern(struct net_device *dev, void *data) { struct uml_net_private *pri; struct pcap_data *ppri; @@ -44,7 +44,7 @@ static int pcap_write(int fd, struct sk_buff *skb, struct uml_net_private *lp) } static const struct net_kern_info pcap_kern_info = { - .init = pcap_init, + .init = pcap_init_kern, .protocol = eth_protocol, .read = pcap_read, .write = pcap_write, From patchwork Fri Jan 13 04:49:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Foley X-Patchwork-Id: 1725688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=eqesMNpN; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=pefoley.com header.i=@pefoley.com header.a=rsa-sha256 header.s=google header.b=qIlrOw+9; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NtTV66r5Vz23gQ for ; Fri, 13 Jan 2023 15:49:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PjoUksG+DJ+T5sdAXVLgenmO6crBDwCbzEpHXA3rofQ=; b=eqesMNpNrumv6j Qc45ghLzuUk/wV9vdosFxc9KsgnFmJs3TaLsKW6tNi0SIKfjdYGZ42ZFFlcxLtqyV46939MqXKTBj mewWont23ru6FkKTV/mcCh/F2sK1DB/6t4u74m0UZ2LNFb7956PDzDdglkpi3RBBflORwE7Vs1mQ1 2v/6xCWBUQ0YtGfPIY+IamDTN/JMcodQgQuiVYPiDExgOpIsE2jiY/ctPr5JGuNMeX4bPD3cmQvPU RhkcdE/LeicteUn1qCxIuZO1GDnE5GpdFRyuQ+D3dJKSISCdAs4Rkhw0kkA23xJ+RjSJOeg7KGjjo y/W9cix8wHayiYuqsdSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0J-000RNZ-Sy; Fri, 13 Jan 2023 04:49:23 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0E-000RLI-Sg for linux-um@lists.infradead.org; Fri, 13 Jan 2023 04:49:21 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id qb7so14149671qvb.5 for ; Thu, 12 Jan 2023 20:49:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pefoley.com; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RK7kwtLoTwXiQFYRKLpCqcerUjpCY+ogtPq7BCj8+Hc=; b=qIlrOw+9p5xPgPCq1YNGHwqIEgQIf/DgPOyvmzsar4YJ9G5sfVEvxYZKfHNF4TQlXi jWiFvLk1mUXDR7jV+h6izxD02BdDrxm3+JykT+7Mhvl6Wo9cwfp1LSd2RkT34oA/GtpR IQbRWWBtBLVpDj2uVEac5zh4zg2u2X3i/XBLk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RK7kwtLoTwXiQFYRKLpCqcerUjpCY+ogtPq7BCj8+Hc=; b=hIkLJ6ojWpSGNi10ZDEavLhnOuNXwJ+eO1D1WOY+rsF8Nqfd08qyGoXubzlyQOLoQn IJD/nuysfnIW5cmUgCzrdSHiPsXBSOj9Qb2N+shKhmg+8oVFcgI2d83ZZVqsCIuMPbi8 xX7Gn05N05ETHOvmRR7Ah3C2VVWRfE78rfDhYC9DXm2U/+scPUi8+hNpGbxf8uiGwdhi gttdGsJfxvU7n34rOAK9rEh62q/C2vQ9RiRlvrA08eskG29ScgX7+8RfdI/+tIIVQuOF 6cklPW9CTn/JFxq2GYGZ9n/JBV3YyvVirKMc+zuzExEsX7Ygon+JHhIblAhVxzyIRnMO ek8w== X-Gm-Message-State: AFqh2koVjsrnOUa+xP9P1zKMhFRJGPtbCiFtSGbuYMSqlJs4PnRzzIJ+ 2BhYlZCSkqBGw/IzHwZGtoNp0A== X-Google-Smtp-Source: AMrXdXvhcCBymtegmA0hJJTKnIFA4a0V7g7Xo1HJuf4+3ZsSmCtYNvt3OYiufYaE9/3b9c4dUtNBWQ== X-Received: by 2002:a05:6214:5811:b0:532:2daa:eb0b with SMTP id mk17-20020a056214581100b005322daaeb0bmr24788992qvb.41.1673585356388; Thu, 12 Jan 2023 20:49:16 -0800 (PST) Received: from [192.168.1.3] ([2600:4040:29fb:d300:887b:7eff:fe74:68b2]) by smtp.gmail.com with ESMTPSA id s11-20020a05620a0bcb00b00704a9942708sm12099472qki.73.2023.01.12.20.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:49:16 -0800 (PST) From: Peter Foley Date: Thu, 12 Jan 2023 23:49:09 -0500 Subject: [PATCH 3/4] um: Prevent building modules incompatible with MODVERSIONS MIME-Version: 1.0 Message-Id: <20230112-um-v1-3-6bec9e97ad13@pefoley.com> References: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> In-Reply-To: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> To: Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Peter Foley X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1673585354; l=1046; i=pefoley2@pefoley.com; s=20230111; h=from:subject:message-id; bh=FK3QdJgb2KG4YuegWgxOs5tSOgx0C0ibecAQpmjyv/4=; b=IGNaz9VC2rw8NP2KkkaEAY4fe7KpAqDmWHvDImkLzXWrJl+aSMWsOUVNlSoMzxdCgVnz5Ydz8wb3 0g4oXSsQAU8n9zrUnEZHnK3Wm14IJuXioSKD8EoQjn0crlRzH+Pu X-Developer-Key: i=pefoley2@pefoley.com; a=ed25519; pk=DCQqIdN6rHnvfQH58WQiQzJFfGUo1HyWSvdYG8vnO5o= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_204918_951899_BD1FF758 X-CRM114-Status: UNSURE ( 9.36 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The manual ld invocation in arch/um/drivers doesn't play nicely with genksyms. Given the problematic modules are deprecated anyway, just prevent building them when using MODVERSIONS. e.g. MODPOST Module.symvers arch/um/drivers/.pcap.o.cmd: No such file or directory --- arch/um/drivers/Kconfig | 2 ++ 1 file changed, 2 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f2c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The manual ld invocation in arch/um/drivers doesn't play nicely with genksyms. Given the problematic modules are deprecated anyway, just prevent building them when using MODVERSIONS. e.g. MODPOST Module.symvers arch/um/drivers/.pcap.o.cmd: No such file or directory --- arch/um/drivers/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig index a4f0a19fbe14..36911b1fddcf 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -261,6 +261,7 @@ config UML_NET_VECTOR config UML_NET_VDE bool "VDE transport (obsolete)" depends on UML_NET + depends on !MODVERSIONS select MAY_HAVE_RUNTIME_DEPS help This User-Mode Linux network transport allows one or more running @@ -309,6 +310,7 @@ config UML_NET_MCAST config UML_NET_PCAP bool "pcap transport (obsolete)" depends on UML_NET + depends on !MODVERSIONS select MAY_HAVE_RUNTIME_DEPS help The pcap transport makes a pcap packet stream on the host look From patchwork Fri Jan 13 04:49:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Foley X-Patchwork-Id: 1725690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ICkENNcx; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=pefoley.com header.i=@pefoley.com header.a=rsa-sha256 header.s=google header.b=YXjyet8M; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NtTV72PmGz23gT for ; Fri, 13 Jan 2023 15:49:35 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZxEtBL8b/s3uecx5VNaexCy7Rekgdng3D+4gAyinNcA=; b=ICkENNcxTQxdFH sjuxOAv8IhxXuGae3E//YiHkCJJXXFOnFih+j7Wzce+yZ5+o3QvmktWl4QwicDlKqWiww7vu1OrZC LaBhoMoQLaPzdGtsE+vJ7ZJQL5K8I1f+1QqcrmI8g5E6lo6bVrmbOGUbVk2PhmAivxL6aLxX46iW9 UEAdBYSw52JEyp5B3mlV8ou+FGu0NCuLlVrHyDTeXdcFskl4sc4Vs25ZYz0PH+eNJ6+dhi285M3Qj 9i+he0wTR1rbIOQ1YO75E1D/J7ZJeR733f17o7pyQ6rvfhd3Gyj9J9YizRDoiuL+y7Spob2eFypUo /j2b1i/mc5WkVLCaqQjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0J-000RNQ-K6; Fri, 13 Jan 2023 04:49:23 +0000 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGC0E-000RLK-W7 for linux-um@lists.infradead.org; Fri, 13 Jan 2023 04:49:20 +0000 Received: by mail-qv1-xf2d.google.com with SMTP id qb7so14149681qvb.5 for ; Thu, 12 Jan 2023 20:49:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pefoley.com; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DPMupWzHNPM6tliJ7ayw5rMWVqQwAd6pjpU1pINArHw=; b=YXjyet8MNQ2JQUCfrp7UKKGt5gpB8ooxSYCa0QNBfVZRIUTYTtCo4xXl6bVxWeOaRj LLiFzXEKLEK7vVVUgDlNKqDg+kOnR25Z4nmLzou+JYtMwDMLmqmpuEEUDKCqESW5wuYe 5i6dKzGCSeFXv7uMaNH57yqz2+m5RwsyCUdXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DPMupWzHNPM6tliJ7ayw5rMWVqQwAd6pjpU1pINArHw=; b=7PDJ3xpi3XlWMyIiC2dL3NlZKFgPdByCy74+dTvkW43mtsphbZLib6JDA9Dv2Va79s ttimxh4E/PZwzL9CHOGF7wcgpChePhN5RdLEEAbelKItK6I6Dd+E+dBAvXD7DQr5duB4 lYyYBZfKFr/yRtwsHtfbndUWupFkH4bhUQThqNsmhqD2ynssgtongHEM8erGxZSBFt4m I/gvpqT+rVnU+9jbocBsDrAmdHpoMpAFq9OG0GmlPiSfs2VGGfp/2BoNcKD0VlPrZCSf Jmkw7RdcuAfzQVrifG2YjlQhJnzJVELIA0/67mLGNJjuB1KbKCsazzYbgTN5V1xDXx0R 3hng== X-Gm-Message-State: AFqh2krcD7kPydxOgAVZgCd3N+iBBv8GqStILAEhCi5n3ORKqd/Bs+m2 ttfcQ2NE17qa+YDgSEXBhYSfvw== X-Google-Smtp-Source: AMrXdXuM910sA8krtlGCRk7bXLXQVDHtbL3ipS+GLem6e3saTcMoMX+cK05cfi29sMNpAMMw8rAQ4A== X-Received: by 2002:ad4:51ce:0:b0:532:2112:69fc with SMTP id p14-20020ad451ce000000b00532211269fcmr29637646qvq.0.1673585356939; Thu, 12 Jan 2023 20:49:16 -0800 (PST) Received: from [192.168.1.3] ([2600:4040:29fb:d300:887b:7eff:fe74:68b2]) by smtp.gmail.com with ESMTPSA id s11-20020a05620a0bcb00b00704a9942708sm12099472qki.73.2023.01.12.20.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:49:16 -0800 (PST) From: Peter Foley Date: Thu, 12 Jan 2023 23:49:10 -0500 Subject: [PATCH 4/4] um: Use CFLAGS_vmlinux MIME-Version: 1.0 Message-Id: <20230112-um-v1-4-6bec9e97ad13@pefoley.com> References: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> In-Reply-To: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> To: Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Peter Foley X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1673585354; l=1469; i=pefoley2@pefoley.com; s=20230111; h=from:subject:message-id; bh=Vga2hFswscRKGQdpjgKxlTRwGsFMXJP0qX9HRn8ewW0=; b=0LeNmvxk7JUmCA7g5p1WH5uLkngDkEtMpHqFTr3iIMnkJ3t8F/K1s88I2n29F1YUYOP5mVtHiTv6 DCHga229B6V+hXzhodm0o4DHuW143R7+9NcGBTQj8+35ZTkVzrJZ X-Developer-Key: i=pefoley2@pefoley.com; a=ed25519; pk=DCQqIdN6rHnvfQH58WQiQzJFfGUo1HyWSvdYG8vnO5o= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_204919_071560_2A3F2D96 X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: link-vmlinux.sh doesn't use LDFLAGS_vmlinux when linking the kernel for UML. Move the LDFLAGS_EXESTACK options into CFLAGS_vmlinux so they're actually respected. e.g. /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: warning: .tmp_vmlinux.kallsyms3.o: missing .note.GNU-stack section implies executable stack /usr/lib/gcc/x86_64-pc-linu [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f2d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org link-vmlinux.sh doesn't use LDFLAGS_vmlinux when linking the kernel for UML. Move the LDFLAGS_EXESTACK options into CFLAGS_vmlinux so they're actually respected. e.g. /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: warning: .tmp_vmlinux.kallsyms3.o: missing .note.GNU-stack section implies executable stack /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: warning: vmlinux has a LOAD segment with RWX permissions Reviewed-by: David Gow --- arch/um/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/um/Makefile b/arch/um/Makefile index f1d4d67157be..93dfb23bd263 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -139,11 +139,10 @@ ifeq ($(CONFIG_LD_IS_BFD),y) LDFLAGS_EXECSTACK += $(call ld-option,--no-warn-rwx-segments) endif -LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt)) +LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS) $(LDFLAGS_EXECSTACK),-Wl,$(opt)) # Used by link-vmlinux.sh which has special support for um link export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) -export LDFLAGS_vmlinux := $(LDFLAGS_EXECSTACK) # When cleaning we don't include .config, so we don't include # TT or skas makefiles and don't clean skas_ptregs.h.