Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1750355pxa; Thu, 6 Aug 2020 15:15:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQ63wmi104pDj3joU32M2+tBgH8MsthdEA0WgW3HSiWk6QpI7KXLJ44Quz7k45HZV9yQ5L X-Received: by 2002:a05:6402:74a:: with SMTP id p10mr6095389edy.348.1596752116892; Thu, 06 Aug 2020 15:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596752116; cv=none; d=google.com; s=arc-20160816; b=NRsygvzWDXDy22n3JEorj70+j2LTMO7oToOTppfmNRkNW9uLouCt4k9wSRw/tfvGCA QCWY9zYd68Z3eF7RpyNAValBv8B5DkwM048pd1nb9IR3jjAVB0hnnWGuYMY6xORrTCOl rAD/dypl68AqoWmUqnOlIUAoLyWVVK2gftluUhdVZGtdwMp++E+aeZ/XpJsItY91T0CC +gccrWmGv9INGzutyYc3vi96syCdayunW5XUglht1TeMybxLDn7SaZ1UQyLHrLa97O0e aonKA/LfC3NtZLHh0rHz0nS6++W4dGfxxxlpsCXMI8T5fzOfGg3ZFsl6ioW0gD92KQpo I8TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=LP3eXKkhQT+uVGZyZBVGAcBptR0qjU15+7WUxkvMxZA=; b=akHZIFEcHrOT/M0OLkAb6RwM80W83YL6fH7pcJNnYo1NGJ3DBPxE3fv1zU44GLvIE4 v+cmkJvCMTeLsP9mVbALt6NNJTP1DE26eTu+StrVv017mhCDengakl4UjCundjhrw03M lysN+Lmi9pzux6VB4WxbpRCG5r3IbDDO0TXp/kjgQpodFetNudRP2fD7rsWGlMNcUFBT LpaH3PIwuyBrktO6tKvmYiqMKkK6o8/PQ+Qc2Jsu2X3OkvHvy3s33y1J3Exm2pa1VZiQ lwbMplVpuOsWyGMwZ05cuhaMS839HreVL6hbr9SgmnSiSyIRiu8u4R2VWFlEedDUFGwA 4RmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=RM9tinec; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=RoTG50Wg; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k27si3478194ejc.447.2020.08.06.15.14.53; Thu, 06 Aug 2020 15:15:16 -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=@linutronix.de header.s=2020 header.b=RM9tinec; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=RoTG50Wg; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728558AbgHFWLl (ORCPT + 99 others); Thu, 6 Aug 2020 18:11:41 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:60462 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgHFWLl (ORCPT ); Thu, 6 Aug 2020 18:11:41 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1596751898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LP3eXKkhQT+uVGZyZBVGAcBptR0qjU15+7WUxkvMxZA=; b=RM9tinecELmqpzagbxC0vGibPLqnkHV/ZEh+MKJKvauCxAKyRyV1YDIvKt+fedFEDi0GJz xXhp8Jy3ZJWFX/7d/d2J2zD8ZVt5kKdiqAidRUg344fhdbezl1hIaf1VpqHscaQeLkIcIG cfKwpx5htIAWw1rys1VX4CTzKdw+AxPd2+bYKGy5rJ5uoHRzB1BjtfaAfQFCtmDnufq1mG y+wo98LoYN+G+vZMteQveUK2JgsgJ8U46eHFXqf0+ltSCnBgGI80UytKInziheumLUh07B lXtq72zay5DOBz7ad2kBqkNvDqElofqdn/lho2gQRsveIlsUOSFQDIGiIVK6Dw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1596751898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LP3eXKkhQT+uVGZyZBVGAcBptR0qjU15+7WUxkvMxZA=; b=RoTG50WgGzRBvHPy9R9e44YbK02gl79OeRSbNP76IjIKiz5ID7hqiI1cZPNZMcw+UFvg78 tANbj0UxPLiyNhAQ== To: Arnd Bergmann , Ingo Molnar , Borislav Petkov , x86@kernel.org Cc: Arnd Bergmann , "H. Peter Anvin" , "Kirill A. Shutemov" , Zhenzhong Duan , Kees Cook , Peter Zijlstra , Juergen Gross , Andy Lutomirski , Andrew Cooper , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] x86: work around clang IAS bug referencing __force_order In-Reply-To: <20200527135329.1172644-1-arnd@arndb.de> References: <20200527135329.1172644-1-arnd@arndb.de> Date: Fri, 07 Aug 2020 00:11:38 +0200 Message-ID: <878serh1b9.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann writes: > When using the clang integrated assembler, we get a reference > to __force_order that should normally get ignored in a few > rare cases: > > ERROR: modpost: "__force_order" [drivers/cpufreq/powernow-k6.ko] undefined! > > Add a 'static' definition so any file in which this happens can > have a local copy. That's a horrible hack. And the only reason why it does not trigger -Wunused-variable warnings all over the place is because it's "referenced" in unused inline functions and then optimized out along with the unused inlines. > * It is not referenced from the code, but GCC < 5 with -fPIE would fail > * due to an undefined symbol. Define it to make these ancient GCCs > work. Bah, we really should have moved straight to GCC5 instead of upping it just to 4.9 > + * > + * Clang sometimes fails to kill the reference to the dummy variable, so > + * provide an actual copy. Can that compiler be fixed instead? Aside of that is there a reason to make this 'static' thing wrapped in #ifdeffery? A quick check with GCC8.3 just works. But maybe 4.9 gets unhappy. Can't say due to: -ENOANCIENTCOMPILER :) Thanks, tglx