[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090402192755.GD2455@elte.hu>
Date: Thu, 2 Apr 2009 21:27:55 +0200
From: Ingo Molnar <mingo@...e.hu>
To: markus.t.metzger@...el.com
Cc: tglx@...utronix.de, hpa@...or.com, markus.t.metzger@...il.com,
roland@...hat.com, eranian@...glemail.com, oleg@...hat.com,
juan.villacis@...el.com, ak@...ux.jf.intel.com,
linux-kernel@...r.kernel.org
Subject: Re: [patch 13/18] x86, ds: add leakage warning
* markus.t.metzger@...el.com <markus.t.metzger@...el.com> wrote:
> +static inline void ds_warn_leak(struct task_struct *tsk)
> +{
> + WARN(tsk->thread.ds_ctx, "leaking DS context\n");
> +}
> + ds_warn_leak(tsk);
since we normally expect X86_DS enabled i'd suggest this
simplification: always have thread.ds_ctx around so the WARN_ON can
go there unconditionally. (it wont trigger in the !DS case)
> struct task_struct;
> struct mm_struct;
> +struct ds_context;
why is this needed in processor.h?
ds.h should be split into ds_types.h and ds_api.h, with the pure
data type definitions in ds_types.h. processor.h (which needs to
know about the DS context type) then includes ds_types.h - which
is a lightweight header.
Actual DS using facilities also disable ds_api.h.
This keeps data types nicely separated from methods and inlines.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists