From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92CF5EEB596 for ; Fri, 15 Sep 2023 14:44:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235839AbjIOOo4 (ORCPT ); Fri, 15 Sep 2023 10:44:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235789AbjIOOox (ORCPT ); Fri, 15 Sep 2023 10:44:53 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A6141BC7 for ; Fri, 15 Sep 2023 07:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=H8PZLMZCU0PDXbXjCCzMXnQDN3Es4h4xOXOxp4F6e+E=; t=1694789088; x=1695998688; b=ZtV/87QKtQxLhG4H9Mz0AgxT7PP2R4NplvZrYu+YC2zEsRz +Jhfc6OgKf8okjhwk97T5PVoncGOZok/Kf00ioBv7E+os2y11To0j44MQmLDi6SRqjo9fH/AjIuHc M8lFTHrKZHTzO6ouxUv//GBp390qc6l0tcs2oEFyr5QREp9Pbg6mG/MKgWkdksP1tx5gAVdjEohSM YY5cj4zWJvHZEFzvLFw6+ygpxzSvwR8CFwJ1Q9gV5xkop9fwRlYYnzFV6YpiSJjNH5BQa5xGvdYy6 T00XqTqUFNjQ2a+IlD8gtbkhTA3Au34TCooRbqm80pLG3QbY60LghLNYzw0swgBg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1qhA39-001WIR-0N; Fri, 15 Sep 2023 16:44:03 +0200 Message-ID: <115822422e97aac5ccd651681d74a2a4ae3cff89.camel@sipsolutions.net> Subject: Re: [PATCH v2] x86: Fix build of UML with KASAN From: Johannes Berg To: Ingo Molnar , Vincent Whitchurch Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Frederic Weisbecker , "Rafael J. Wysocki" , Peter Zijlstra , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, kernel@axis.com Date: Fri, 15 Sep 2023 16:44:01 +0200 In-Reply-To: References: <20230915-uml-kasan-v2-1-ef3f3ff4f144@axis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2023-09-15 at 11:32 +0200, Ingo Molnar wrote: >=20 > > ld: mm/kasan/shadow.o: in function `memset': > > shadow.c:(.text+0x40): multiple definition of `memset'; > > arch/x86/lib/memset_64.o:(.noinstr.text+0x0): first defined here > > ld: mm/kasan/shadow.o: in function `memmove': > > shadow.c:(.text+0x90): multiple definition of `memmove'; > > arch/x86/lib/memmove_64.o:(.noinstr.text+0x0): first defined here > > ld: mm/kasan/shadow.o: in function `memcpy': > > shadow.c:(.text+0x110): multiple definition of `memcpy'; > > arch/x86/lib/memcpy_64.o:(.noinstr.text+0x0): first defined here >=20 > So the breakage was ~9 months ago, and apparently nobody build-tested UML= ? Well, first of all, it's only with KASAN, and then I think we probably all did and applied a similar fix or this one ... I have a in my tree that simplies marks the three symbols as weak again, for instance, dating back to March 27th. Didn't publish it at the time, it probably got lost in the shuffle, don't remember. Also, a variant of this patch has been around for three months too. > Does UML boot with the fix? Sure, works fine as long as the symbols are marked weak _somehow_. johannes