Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp214082pxy; Tue, 4 May 2021 23:49:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTJu2hgpi9pZTg2ryotiUL9MPKY9zP3G7T2WcxJbI75H5HmRZoz+aTwfieJRRfRSuUcMSI X-Received: by 2002:a17:90a:1708:: with SMTP id z8mr9912397pjd.51.1620197379054; Tue, 04 May 2021 23:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620197379; cv=none; d=google.com; s=arc-20160816; b=NBeZ/PrwUJw82hywNmQK1epfy/MIOmY/X+L6Ql4J/kbIWdsXwi7P8q8iepldUvqaVa TTkGzZo8wFDMigHd4+8ntvierKWv2ZCdWQOlO3521tMrCZH07JPVGgNBR3IWF6kJ3sNc OiSreUYL6sstR4pOMG7Ytg8Fw3PohSB4dABUZz26zoDENcP3QiRA5gJIz5ad/cznyI+u XmWzvV1JQjDQO3IcbV6dN5JRhFXvFra14vEaN2BgNbegsVEGip+rHUuQ72dXGWcaWLMF E55r2fl8PzJhvHtrsByPAw+gt1X4m/xvGzV7BIHAGxsoiVFXePw+1B0ELdRh5M+oU6Sc mCcQ== 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; bh=wdfE8HD3DQ5c0KXK23VL9XKreqvNmN2d0ptpwD2Z47s=; b=sBTz5zVg8fk/mnoGb4OH6w5NQ7P1RANoQmskPZZLNFbFApLRd8g2KYQrLIbyrjZ86k p92RaLAOCJf8iqHtxzgam8JS7nP6GOOYyD4u1uiAUeCYe25L9PRn6Ubw0By5yksQPzni 0TehtB+VfS9xySx+kU2AcLBhsNgwlzWn26fvohUpr9vZ+dp/ReWl64lSjDSJnr5CUE14 fnsGAqvrX865k0CgtU00Lb/mI8O8vpgVOdX5DkOgZkZbng65TZjmDFKUodsqlbjpz/83 7Y0zTsXG/j/e5s7Sxh3juXCGz2Ab/SYp5/VnDik1xsSuuCv2mn+yIX0P2hmZmXvX+te9 otQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=GSRFi2XZ; 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 c2si7173350plg.79.2021.05.04.23.49.26; Tue, 04 May 2021 23:49:39 -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=desiato.20200630 header.b=GSRFi2XZ; 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 S231650AbhEEGr3 (ORCPT + 99 others); Wed, 5 May 2021 02:47:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbhEEGr1 (ORCPT ); Wed, 5 May 2021 02:47:27 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5ACAC061574; Tue, 4 May 2021 23:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wdfE8HD3DQ5c0KXK23VL9XKreqvNmN2d0ptpwD2Z47s=; b=GSRFi2XZnQoaBPi4P6SgL8Hr00 L6WJjO7Sa6z/LZqCRnr3V/IEIzzzi3G/pKybnYNpJGooWIE0S1X5f+2zL8ycYF82Y4xk1CXn5A1Nx uQE/pPcxBi1NsIyr1qZPL5tDEMfMDXY1srlEgdywsUmvc1wKOxSSL2LoWGBviS3VxbtABQwXaf/JK BsNaS8k2rHlU1soaIyATgQNBOlqMdvaG1U2sC5gT3hEnDBowLr5DbVVPqodP0FTua+NSIZSKfChaG qK4lDu5WmUhH88SizOVl2odxeK9oyE84WvxdIGNOUTNNjy0RGISVbXvRVJ4/8ApjlzeF1WDg9RJU1 sasJ09VQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1leBIb-000NAm-UN; Wed, 05 May 2021 06:46:22 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 867C23001CD; Wed, 5 May 2021 08:46:19 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 23282234E713A; Wed, 5 May 2021 08:46:19 +0200 (CEST) Date: Wed, 5 May 2021 08:46:19 +0200 From: Peter Zijlstra To: Andi Kleen Cc: linux-kernel@vger.kernel.org, Andi Kleen , linux-toolchains@vger.kernel.org Subject: Re: [PATCH] sched: Work around undefined behavior in sched class checking Message-ID: References: <20210505033945.1282851-1-ak@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210505033945.1282851-1-ak@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 08:39:45PM -0700, Andi Kleen wrote: > From: Andi Kleen > > The scheduler initialization code checks that the scheduling > classes are consecutive in memory by comparing the end > addresses with the next address. > > Technically in ISO C comparing symbol addresseses outside different objects > is undefined. With LTO gcc 10 tries to exploits this and creates an > unconditional BUG_ON in the scheduler initialization, resulting > in a boot hang. > > Use RELOC_HIDE to make this work. This hides the symbols from gcc, > so the optimizer won't make these assumption. I also split > the BUG_ONs in multiple. Urgh, that insanity again :/ Can't we pretty please get a GCC flag to disable that?