Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1576197ybt; Thu, 18 Jun 2020 11:55:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHoDJp4NkspRuB2ec7Anir2561w3GNe0JXTTn5zxxBgA+IHfFlsILe/A6eyXNJ/WIp/BWY X-Received: by 2002:a17:907:20f4:: with SMTP id rh20mr83450ejb.55.1592506538681; Thu, 18 Jun 2020 11:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592506538; cv=none; d=google.com; s=arc-20160816; b=Ygmwp9ecuG9u+AXj5y8DUcBdrAEcn5zp3ONnbnxD4qGCZuLC/YV3LznMRvuQ3310jw V/Ob0ixXM6g5PIgaMZRMVSOJ4OlSa04ZX+o5x0gC5egU7ewG20Qm77QEuCy3/M2cW/6h UWg58QZC9bb6bIV0GXcTDQw8jPfUkAwSe+evFyesiLcpnUzpyQdCPjkr3Znif+qq56p6 q6aVep8u/vu79vkTDN7K8AhszbCSkb9nSHwiLmU7zg2XYHoEssQeVqxFXzUhFbwxtl9e 3e4ql8eSD+5cClc6fq2knna7efjCH36gUHqiW7Z30tNKVCzRvcJkYPKXtgs0sg9avzNv nQWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8OH26QiG5DXvYCF+O2JaAmKpPuqSyNAaFl3JqZ2jUDY=; b=iRD1D/th+4/uXa2S8uQiUHQ37za8hkFFz3A/MzQ+nAH7ORAYMBib5qPEHYpw0yAbVu WzbpVi4e+KJO8lxZvIf/1qFeieUr/sxN3a9fjUsQ2DEhrbZTXvlCinL1loeK/CwBZSQY hPWaUf9cQIA3T2CNO749HQqiePQqXaPdq7eVRPANgzOzkUuSVXfsdhkvTbjXqsHRCLFZ hyHCXY2Zma3ajhcYPk+LMMJxzN3fVGKDBE9LeCp/BNNLEzxnQaD9nuCB0Qr4zsK8nuy+ hdPMNGOfUMhHAazgOQtrNov3bJLiDqmkDKWtOYFSRIFBjo7eBqJWZvv9Gz2Zrd8lAuiH 3Rtg== ARC-Authentication-Results: i=1; mx.google.com; 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 pg7si2390286ejb.411.2020.06.18.11.55.16; Thu, 18 Jun 2020 11:55:38 -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; 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 S1729336AbgFRR5l (ORCPT + 99 others); Thu, 18 Jun 2020 13:57:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:34778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729255AbgFRR5l (ORCPT ); Thu, 18 Jun 2020 13:57:41 -0400 Received: from home.goodmis.org (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3E2F020734; Thu, 18 Jun 2020 17:57:40 +0000 (UTC) Date: Thu, 18 Jun 2020 13:57:33 -0400 From: Steven Rostedt To: Guenter Roeck Cc: Eric Biggers , Peter Zijlstra , tglx@linutronix.de, frederic@kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, cai@lca.pw, mgorman@techsingularity.net Subject: Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list Message-ID: <20200618175733.GA26895@home.goodmis.org> References: <20200526161057.531933155@infradead.org> <20200526161908.129371594@infradead.org> <20200604141837.GA179816@roeck-us.net> <20200605002433.GA148196@sol.localdomain> <20200605074154.GB2750@hirez.programming.kicks-ass.net> <20200605161532.GD1373@sol.localdomain> <53318971-561c-b445-0408-530b3d3ba44e@roeck-us.net> <20200609202134.GA1105@sol.localdomain> <20200609212509.GA239889@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200609212509.GA239889@roeck-us.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 09, 2020 at 02:25:09PM -0700, Guenter Roeck wrote: > > > > Still occurring on Linus' tree. This needs to be fixed. (And not by removing > > support for randstruct; that's not a "fix"...) > > > > How about the hack below ? My test suite failed due to this bug (on my allmodconfig test). Your hack appears to fix it. I've applied it to my "fixes" patches applied to my test suite before building my kernels. Thanks! -- Steve > > Guenter > > --- > diff --git a/include/linux/sched.h b/include/linux/sched.h > index c5d96e3e7fff..df1cbb04f9b3 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -629,6 +629,15 @@ struct wake_q_node { > struct wake_q_node *next; > }; > > +/* > + * Hack around assumption that wake_entry_type follows wake_entry even with > + * CONFIG_GCC_PLUGIN_RANDSTRUCT=y. > + */ > +struct _wake_entry { > + struct llist_node wake_entry; > + unsigned int wake_entry_type; > +}; > + > struct task_struct { > #ifdef CONFIG_THREAD_INFO_IN_TASK > /* > @@ -653,8 +662,9 @@ struct task_struct { > unsigned int ptrace; > > #ifdef CONFIG_SMP > - struct llist_node wake_entry; > - unsigned int wake_entry_type; > + struct _wake_entry _we; > +#define wake_entry _we.wake_entry > +#define wake_entry_type _we.wake_entry_type > int on_cpu; > #ifdef CONFIG_THREAD_INFO_IN_TASK > /* Current CPU: */