From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761762AbcIPKd5 (ORCPT ); Fri, 16 Sep 2016 06:33:57 -0400 Received: from foss.arm.com ([217.140.101.70]:52660 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753058AbcIPKdt (ORCPT ); Fri, 16 Sep 2016 06:33:49 -0400 Date: Fri, 16 Sep 2016 11:33:26 +0100 From: Mark Rutland To: Andy Lutomirski Cc: "linux-arm-kernel@lists.infradead.org" , Andrew Morton , Ard Biesheuvel , Catalin Marinas , james.morse@arm.com, Kees Cook , "linux-kernel@vger.kernel.org" , lorenzo.pieralisi@arm.com, Andrew Lutomirski , suzuki.poulose@arm.com, Takahiro Akashi , Will Deacon , "kernel-hardening@lists.openwall.com" Subject: Re: [RFC PATCH 2/8] thread_info: allow custom in-task thread_info Message-ID: <20160916103101.GA21702@leverpostej> References: <1473947349-14521-1-git-send-email-mark.rutland@arm.com> <1473947349-14521-3-git-send-email-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 15, 2016 at 11:37:47AM -0700, Andy Lutomirski wrote: > On Thu, Sep 15, 2016 at 6:49 AM, Mark Rutland wrote: > > Currently, task_struct is defined in , which (indirectly) > > pulls in a number of low-level arch headers such as > > through a number of other headers. Thus, code and structures in these > > headers can't rely on the definition of task_struct. Some of these > > headers are necessary for the definition of task_struct, so moving > > task_struct into its own header is insufficient tio avoid circular > > includes. > > The flippant answer is to fix the headers, but I tried that myself and > gave up :( Agreed; likewise (though I gave up quicker, I suspect). :( Longer-term I'd still hope that we can do this. > But how about this slightly less duplicative alternative: > > struct thread_info { > #ifdef arch_thread_info > struct arch_thread_info arch_ti; > #endif > }; I'm happy to have an arch_thread_info. Just to check, what do you mean to happen with the flags field? Should that always be in the generic thread_info? e.g. struct thread_info { u32 flags; #ifdef arch_thread_info struct arch_thread_info arch_ti; #endif }; Thanks, Mark,