Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5427974pxu; Thu, 22 Oct 2020 01:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuF9+J0XlqRvTfT+c9tJGan0sOuV1b0nHPWNQM0fHfMzFTQGgq7vuzkRF7u6bX59RM5SGm X-Received: by 2002:a50:dacf:: with SMTP id s15mr1292109edj.71.1603356810361; Thu, 22 Oct 2020 01:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603356810; cv=none; d=google.com; s=arc-20160816; b=wgD89CaHeZGgFvo6Orjfhm599nh1/Jr/ZhdRCGoj0pgLJZ/fblc2W9gLSQvmkU57hi PY9SkSnb1NR1aWpUkk0So9rLLGZwa9h8NYyEJxLJ6vbF2D/OxsaYInhpZbv/rMbtZRFI 3LiymjlzPfCxPVTomphYBnrqAZsWH2O8h6+jLgvDLMEwNjSyJHkPOVf1MVlBfUPJrGp5 VHWQyYctenE0rG9/hAzmACrCZuvcAPfTpE8CcyoExuEGGaYJRoA9jpFqG8cbWiN+EZzM 6O+AAgzsSAmSc5DyjQvMYoFg75UVkbDDLu4TL4PdjXADRq20B2416UGRJopws3mdq+JJ Q4CA== 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=RfFhSbN11m3IitK97y6a7NzS38Ioj0KULanL8a1Qb1g=; b=n/yoPDOMI1hXMLqWsCj2RysgSEfRxA8osLuIWbeRLKB/vmGAa7np6Sd3ZBoDc+Qo5i F3xklUUGu8esbDG1N07V4M7jgrtzj8aijqss0ixagg/m0MJGN0tnUAElBOJFiAG6sPTv qAMexAfOJgca7/GujUhohJ++E/sxNr9NXn54VqFTc+WjQWy3l6Es1loqryS4JEbmTxQ2 P5ClgORBvt0INWY/FpVCuOQ5IF5RKXEa13fbAD7PfJBcVrywdnVm2OKuOmg7U0Jcz8ki nmvVsEHxgRbS8qMI3No8yjl3FMe5qvNWv4xWrBxE7axtPpvjD4MTCv/HUm9zn3baL1f3 FK1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=J6K1M0sZ; 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 h10si533982edn.193.2020.10.22.01.53.08; Thu, 22 Oct 2020 01:53:30 -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=merlin.20170209 header.b=J6K1M0sZ; 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 S2506698AbgJVHih (ORCPT + 99 others); Thu, 22 Oct 2020 03:38:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506642AbgJVHih (ORCPT ); Thu, 22 Oct 2020 03:38:37 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2982FC0613CE; Thu, 22 Oct 2020 00:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; 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=RfFhSbN11m3IitK97y6a7NzS38Ioj0KULanL8a1Qb1g=; b=J6K1M0sZPimUvXPrKztX0TlegH AH+DBbWHCdWcwcCvmioBKrnsQsRCXwcArtPEOlG1GfSppLCn/uRGjd+pYgeXiNVN2eTnSn2Yn+i0/ XOxv8QbuwN8nvMT5ab+v5yfwYwAR5gjU+pi9ez4xw0tGaEOm8yX6aEt072WCU90caMRZtL2xWfP6s VHky+hFx9Rnja7nd6N0k565GMD3F1uPsvpEVHTwe6k2k/7Z06jmENm2bLnZJLzw3MYY/0wAo1oxjP Li6GyPsWND5HE40XKKV/BDs20COontaEBFHhRhfyK6OlOAjyJmTzn3rnEuPA5z1d18ap9f3KMz2by Eca2gNVw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVVAw-0005Li-7r; Thu, 22 Oct 2020 07:38:18 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7C7583010D2; Thu, 22 Oct 2020 09:38:16 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5DE1C200D4C3C; Thu, 22 Oct 2020 09:38:16 +0200 (CEST) Date: Thu, 22 Oct 2020 09:38:16 +0200 From: Peter Zijlstra To: Nick Desaulniers Cc: Jakub Jelinek , Florian Fainelli , kernel test robot , Steven Rostedt , LKML , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKP , Kees Cook , "H.J. Lu" , Rasmus Villemoes , linux-toolchains@vger.kernel.org, Miguel Ojeda Subject: Re: GCC section alignment, and GCC-4.9 being a weird one Message-ID: <20201022073816.GQ2628@hirez.programming.kicks-ass.net> References: <20200629003127.GB5535@shao2-debian> <20200630124628.GV4817@hirez.programming.kicks-ass.net> <20200630144905.GX4817@hirez.programming.kicks-ass.net> <58ff47cc-dc55-e383-7a5b-37008d145aba@gmail.com> <20201021080031.GY2628@hirez.programming.kicks-ass.net> <20201021131806.GA2176@tucnak> <20201021134436.GJ2628@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 10:42:01AM -0700, Nick Desaulniers wrote: > On Wed, Oct 21, 2020 at 6:45 AM Peter Zijlstra wrote: > > > > Ah, thanks! > > > > In that case something like the below ought to make it good. > > > > I'll go feed it to the robots, see if anything falls over. > > > > --- > > kernel/sched/deadline.c | 4 +++- > > kernel/sched/fair.c | 4 +++- > > kernel/sched/idle.c | 4 +++- > > kernel/sched/rt.c | 4 +++- > > kernel/sched/sched.h | 3 +-- > > kernel/sched/stop_task.c | 3 ++- > > 6 files changed, 15 insertions(+), 7 deletions(-) > > > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > index 6d93f4518734..f4855203143d 100644 > > --- a/kernel/sched/deadline.c > > +++ b/kernel/sched/deadline.c > > @@ -2504,7 +2504,9 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p, > > } > > > > const struct sched_class dl_sched_class > > - __attribute__((section("__dl_sched_class"))) = { > > + __attribute__((section("__dl_sched_class"))) > > + __attribute__((aligned(__alignof__(struct sched_class)))) = { > > If you used some of the macros from > include/linux/compiler_attributes.h like __section and __aligned, I > would prefer it. Please consider spelling out __attribute__(()) an > antipattern. Feh, and then suffer more patches because someone doesn't like how __section uses # :/