Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp139652pxb; Fri, 9 Apr 2021 21:16:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp1WI0md3RsDYKWAKd9zQKm9buKounjmKmhxAUUJrdq1wU89VOpopKCwVZbVdOZiuvKKKq X-Received: by 2002:a17:906:7c4a:: with SMTP id g10mr16310819ejp.293.1618028192278; Fri, 09 Apr 2021 21:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618028192; cv=none; d=google.com; s=arc-20160816; b=RDobZ0up09ZPOitPnj8lwuIH8ZupxStr/H0tHev6DWHcsYv3LqAt0f2bBSsV+Z9dkD lwRqSfP3pC6tWTMDI0D8+A1AnwHGIPK+2JffgGdublHxC3hon7MjUhm8fYGTEFhrTX0G Yxc3yxK9tdpig3b5RNMZYVYV160qqFE1KsuS518UBB21CGO8XchJtym1wrl82JBlS/UI MpOivS+VUZ489IyEDmRxcrzXp8h4q3aAFluvgh+J8y6/TKmb4JQvOlrryA1FYySGOvui 1M5VkkkefnNy2mYqx/SBAW0PZ7Xy1NEVt/DIF31UOjiZvY7VC8pTW3yQCNL2029iHTqC paAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=3bB+m0fbtX3OhtdFNOgtTWp1ZNIwh6ik4e61/uqX+1Q=; b=nlekT9wXb5I8wPS+1CPw9Z1TPmIbMz0V4/cxUC7UhKvjmtXjpQq44z/F5q9zgkY9Bu 1nQSEWik4HKV7bF+G999gHutFZzp+FUm/+lgfbDR4sO/dHbljR6IuXFBEKbU/ZVIbE5i kddTSSQYAmJzWEBTRzUv3wi8xfEEDSkXbnx8IKn1rY1YsXsFvzoTjbnRmky8ZnzYzf9q xwiqT5++10xXyF8HTr5Z2HbZXOpgJxUEwxLmiPbsMEH1P0PMRItRTfkStX7lQNp9IUGd /6wHNRz4DmtSWY5DS3ASvXEZq/xGQSbXcQ7Z0Yg1IQQo2+/gCFgMFrqBDkFGn51Qqv9s zggw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uVOMEBzY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si3394189ejs.551.2021.04.09.21.16.08; Fri, 09 Apr 2021 21:16:32 -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=@infradead.org header.s=casper.20170209 header.b=uVOMEBzY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbhDJEPB (ORCPT + 99 others); Sat, 10 Apr 2021 00:15:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbhDJEPA (ORCPT ); Sat, 10 Apr 2021 00:15:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 672B1C061762 for ; Fri, 9 Apr 2021 21:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=3bB+m0fbtX3OhtdFNOgtTWp1ZNIwh6ik4e61/uqX+1Q=; b=uVOMEBzYkT6VmFOA9oLuTssCmk 8N3JkFlt2shGL9sds12Bge87VDKeD1GPZAQWgAX1/WS6HjvUOk0NSqDZgxB206JGHt0QkjtXDdI5a NF1ViY4S+pZs48hVjdP6rPvbgZZ8mpymEtRdH9L+bcZ8GqSYbycUObkDiFG0O6n0klZC5Rhe+ros/ Kovj8MGjiJi/vg7/vReZPGktDUv7e2sucNenwJlDLMS+sdRURXGUbQIBcJyF/EW31ZzrsT4T50r4o kQxXkEGbdbDoXwdnuY8RnZRQ3pDFQAcBy6AgkJnGl9UIAszQ7kwxHpEY6min+JCOtTCh5n2mMDR2m lYMsKKUA==; Received: from [2601:1c0:6280:3f0::e0e1] by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lV50G-001Ixr-LS; Sat, 10 Apr 2021 04:13:58 +0000 Subject: Re: [PATCH] um: add 2 missing libs to fix various build errors To: linux-kernel@vger.kernel.org Cc: kernel test robot , Brendan Jackman , Alexei Starovoitov , kbuild-all@lists.01.org, Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Johannes Berg , Johannes Berg References: <20210404182044.9918-1-rdunlap@infradead.org> From: Randy Dunlap Message-ID: <9f7eeb70-8ddc-fb04-a378-5f1e80d485e6@infradead.org> Date: Fri, 9 Apr 2021 21:13:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210404182044.9918-1-rdunlap@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/4/21 11:20 AM, Randy Dunlap wrote: > Fix many build errors (at least 18 build error reports) for uml on i386 > by adding 2 more library object files. All missing symbols are > either cmpxchg8b_emu or atomic*386. > > Here are a few examples of the build errors that are eliminated: > > /usr/bin/ld: core.c:(.text+0xd83): undefined reference to `cmpxchg8b_emu' > /usr/bin/ld: core.c:(.text+0x2bb2): undefined reference to `atomic64_add_386' > /usr/bin/ld: core.c:(.text+0x2c5d): undefined reference to `atomic64_xchg_386' > syscall.c:(.text+0x2f49): undefined reference to `atomic64_set_386' > /usr/bin/ld: syscall.c:(.text+0x2f54): undefined reference to `atomic64_set_386' > syscall.c:(.text+0x33a4): undefined reference to `atomic64_inc_386' > /usr/bin/ld: syscall.c:(.text+0x33ac): undefined reference to `atomic64_inc_386' > /usr/bin/ld: net/ipv4/inet_timewait_sock.o: in function `inet_twsk_alloc': > inet_timewait_sock.c:(.text+0x3d1): undefined reference to `atomic64_read_386' > /usr/bin/ld: inet_timewait_sock.c:(.text+0x3dd): undefined reference to `atomic64_set_386' > /usr/bin/ld: net/ipv4/inet_connection_sock.o: in function `inet_csk_clone_lock': > inet_connection_sock.c:(.text+0x1d74): undefined reference to `atomic64_read_386' > /usr/bin/ld: inet_connection_sock.c:(.text+0x1d80): undefined reference to `atomic64_set_386' > /usr/bin/ld: net/ipv4/tcp_input.o: in function `inet_reqsk_alloc': > tcp_input.c:(.text+0xa345): undefined reference to `atomic64_set_386' > /usr/bin/ld: net/mac80211/wpa.o: in function `ieee80211_crypto_tkip_encrypt': > wpa.c:(.text+0x739): undefined reference to `atomic64_inc_return_386' > > Signed-off-by: Randy Dunlap > Reported-by: kernel test robot > Cc: Brendan Jackman > Cc: Alexei Starovoitov > Cc: kbuild-all@lists.01.org > Cc: Jeff Dike > Cc: Richard Weinberger > Cc: Anton Ivanov > Cc: linux-um@lists.infradead.org > Cc: Johannes Berg > Cc: Johannes Berg > --- > My UML on i386 build environment is br0ken so this is not tested other > than to see that the .o files are built as expected. > If someone can test/verify it, please respond. Thanks. Hi, Instead of trying to build this on x86_64, I powered up my 32-bit x86 laptop and verified that this patch fixes the build errors of undefined references to cmpxchg8b_emu() and atomic64_*_386() functions. There are still some build errors in 2 object files: /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM2' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x22): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x2f): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x3c): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x49): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x56): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x63): more undefined references to `X86_FEATURE_XMM' follow and /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM2' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x22): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x2f): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x3c): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x49): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x56): undefined reference to `X86_FEATURE_XMM' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x63): undefined reference to `X86_FEATURE_XMM2' /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x70): undefined reference to `X86_FEATURE_XMM2' I don't know what to do about these or what is causing them (other than "alternatives"). > arch/x86/um/Makefile | 1 + > 1 file changed, 1 insertion(+) > > --- lnx-512-rc5.orig/arch/x86/um/Makefile > +++ lnx-512-rc5/arch/x86/um/Makefile > @@ -21,6 +21,7 @@ obj-y += checksum_32.o syscalls_32.o > obj-$(CONFIG_ELF_CORE) += elfcore.o > > subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o > +subarch-y += ../lib/cmpxchg8b_emu.o ../lib/atomic64_386_32.o > subarch-y += ../kernel/sys_ia32.o > > else > -- ~Randy