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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E57AC4360C for ; Wed, 5 May 2021 17:00:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7418461426 for ; Wed, 5 May 2021 17:00:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237330AbhEEQ7x (ORCPT ); Wed, 5 May 2021 12:59:53 -0400 Received: from mga06.intel.com ([134.134.136.31]:17204 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236788AbhEEQuk (ORCPT ); Wed, 5 May 2021 12:50:40 -0400 IronPort-SDR: gi1n5t0nY4g1qzPaixI/H3i4gMiaKfLX+O2MPkwpuIDi7XDniZcRgsMqywulBDr4wWgYdVkGhb +VaLOOAy0VgQ== X-IronPort-AV: E=McAfee;i="6200,9189,9975"; a="259532499" X-IronPort-AV: E=Sophos;i="5.82,276,1613462400"; d="scan'208";a="259532499" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2021 09:48:59 -0700 IronPort-SDR: Yi0pqyiLHdZUJPiYaOEO9OzZCRUx5JnU+c6yPbfqsCoxO4w09k7+O5Tndp3LyQFURANRYVzkjF ZUTH/AGmpyXA== X-IronPort-AV: E=Sophos;i="5.82,276,1613462400"; d="scan'208";a="433911466" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.54.13]) ([10.209.54.13]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2021 09:48:59 -0700 Subject: Re: [PATCH] sched: Work around undefined behavior in sched class checking To: Nick Desaulniers Cc: Florian Weimer , Peter Zijlstra , LKML , Andi Kleen , linux-toolchains@vger.kernel.org References: <20210505033945.1282851-1-ak@linux.intel.com> <875yzxh8j8.fsf@oldenburg.str.redhat.com> <20210505143916.GS4032392@tassilo.jf.intel.com> From: Andi Kleen Message-ID: Date: Wed, 5 May 2021 09:48:58 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/5/2021 9:41 AM, Nick Desaulniers wrote: > On Wed, May 5, 2021 at 7:39 AM Andi Kleen wrote: >>> Would you please provide a >>> minimal test case? >> You can only reproduce it with a LTO build because it needs knowledge >> between different translation units for this specific case. >> >> But gcc will totally do the optimization even without LTO if it can >> prove the same inside a single TU. > It would be helpful to isolate a test case that doesn't rely on LTO, > if possible. Like I wrote earlier we used to see it all the time in __pa_symbol before it used RELOC_HIDE. I bet if you make RELOC_HIDE a nop you'll see multiple instances. But not sure why you want a test case? -Andi