Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19407751rwd; Wed, 28 Jun 2023 08:57:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uEq+lD9NWGJJkPvtRWolsWcPElUFAukotOIqMHtqaAGImpzNOWFbIZOiPcmOXek1/OZXD X-Received: by 2002:a17:907:7243:b0:988:fb2f:274e with SMTP id ds3-20020a170907724300b00988fb2f274emr22513604ejc.27.1687967855515; Wed, 28 Jun 2023 08:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687967855; cv=none; d=google.com; s=arc-20160816; b=c9kVA+f0GPrIaNQ3nhReIUV8YuJax3H3fA9fiIX1GD2maJePhoQc2zrhe29asmPFUS mBPLPyReLHjPQL948gv8LZQpy2JRioT2tTnTfYOZ7U7C+G1hZTjTzx1H7aYaCmUoZNpI F4bgic1WFJiLjJuU6wxebZtoNlc+Ezs9t90A2lMbNafjcJxzWLe7AVJRaSG4YIOGslZo +fKC7t4z/KBwO5h8Na7Xig4T5znODNDvO2FxO/nNPjXch0HfoRgHTN0dzNkJn0RQqPFO 6TUcZZ9kQOI7sti0K+PWzqld8X+UTYdBeeAgt6zuONueG1GbHwbzVszfJ/MoIFSgv7W8 UyBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=1iJuHJHB1EdBNj+ROyjXEOKp8k7bQvo5TeQDvRwemT4=; fh=nCHqR+kYJplZWIDXQqpf11pzUfOiFDPxeJVegClgIhE=; b=UUfzepD16BZtKrH1sHbSIl0aU2uRisLBcHgJhrc/GUhMM+rj12n1eiZ0AIxyMcwuWq A6xmQ5hJ9XecFI6fyk2TOvAMnGOd94wHmhVQwK1MX503A14KJiCsy6jBgo3+AuWJDF7K KQ0KNZYckGw9W1vSbzCOv4Cs9egESyyXurz2dl7eJuabyZBTYTmjDcwRrzeKVfW466Uc wI0xlQFrp6xzkUrH9K+9ee1sEWq/tR13PB6dY26i99PYCbP7sbHuOKjgsqyjcSYMAX4W XpXXrf9auFO5lflP9TWtxbKNWNglWO7KH7JJ1spLAnyIWPQxMH1qaT7Dlha9zkTtF7Jv AN1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=IUlBkFhl; dkim=neutral (no key) header.i=@ravnborg.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a170906c30c00b0099270bd1b10si1070953ejz.208.2023.06.28.08.57.10; Wed, 28 Jun 2023 08:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=IUlBkFhl; dkim=neutral (no key) header.i=@ravnborg.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231453AbjF1Pvg (ORCPT + 99 others); Wed, 28 Jun 2023 11:51:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232109AbjF1PvM (ORCPT ); Wed, 28 Jun 2023 11:51:12 -0400 Received: from mailrelay3-1.pub.mailoutpod2-cph3.one.com (mailrelay3-1.pub.mailoutpod2-cph3.one.com [IPv6:2a02:2350:5:402::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3F3B1FEB for ; Wed, 28 Jun 2023 08:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=1iJuHJHB1EdBNj+ROyjXEOKp8k7bQvo5TeQDvRwemT4=; b=IUlBkFhlxCsnL2+euX2Z+/5DQRPqF67IaLqj7JfOT9enbKQRSkwz8dHUvHuykAWX8DI+UO6E5Hfh8 AxGovHNPFYSWg/duZTi4xSsDL1O3oSV3Ze5+76MjRl8N3He4O5j+dhYviwTL0JTFCvqsiu38oeg2Sc qCtuOLJv5b1JpmmVEiLfwGAq+0T2vmrp6MizxRx4JS6rxf1JWxzw247/wZdPsa3ucX8F7hO0BJ5/PR wJR5Oh2WvCs70FJJr8PsuSFUsDmJb+r4rCXbfV0eahCNQLeJTMWo+jMmfI7/QhHjkDlwi0c4ftoiEl BlC89IpM1NVfm4vYMzZvysCPAQlHqKQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=1iJuHJHB1EdBNj+ROyjXEOKp8k7bQvo5TeQDvRwemT4=; b=n/WmLL6foHVUCi+3yWrwkWVXfGv1W1PKPZZhIF9GPDDyB1SXVJui6d/LJxM7lCLs4cHKh6BX7Dori +daPrX/Dg== X-HalOne-ID: 95c56ae6-15cb-11ee-a2f3-b90637070a9d Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay3 (Halon) with ESMTPSA id 95c56ae6-15cb-11ee-a2f3-b90637070a9d; Wed, 28 Jun 2023 15:51:05 +0000 (UTC) Date: Wed, 28 Jun 2023 17:51:03 +0200 From: Sam Ravnborg To: Arnd Bergmann Cc: "David S. Miller" , Kees Cook , Mark Rutland , "Peter Zijlstra (Intel)" , Arnd Bergmann , Guenter Roeck , Geert Uytterhoeven , Ingo Molnar , Andi Shyti , Andrzej Hajda , Palmer Dabbelt , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sparc: mark __arch_xchg() as __always_inline Message-ID: <20230628155103.GA214400@ravnborg.org> References: <20230628094938.2318171-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628094938.2318171-1-arnd@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 28, 2023 at 11:49:18AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > An otherwise correct change to the atomic operations uncovered an > existing bug in the sparc __arch_xchg() function, which is calls > __xchg_called_with_bad_pointer() when its arguments are unknown at > compile time: > > ERROR: modpost: "__xchg_called_with_bad_pointer" [lib/atomic64_test.ko] undefined! > > This now happens because gcc determines that it's better to not inline the > function. Avoid this by just marking the function as __always_inline > to force the compiler to do the right thing here. > > Reported-by: Guenter Roeck > Link: https://lore.kernel.org/all/c525adc9-6623-4660-8718-e0c9311563b8@roeck-us.net/ > Fixes: d12157efc8e08 ("locking/atomic: make atomic*_{cmp,}xchg optional") > Signed-off-by: Arnd Bergmann Reviewed-by: Sam Ravnborg I assume you will find a way to apply the patch. Sam