From: Suresh Siddha <suresh.b.siddha@intel.com>
To: mingo@elte.hu, hpa@zytor.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [patch 3/3] x86, xsave: use BUG_ON() instead of BUILD_BUG_ON()
Date: Wed, 13 Aug 2008 11:38:15 -0700 [thread overview]
Message-ID: <20080813183857.246823000@linux-os.sc.intel.com> (raw)
In-Reply-To: 20080813183856.964126000@linux-os.sc.intel.com
[-- Attachment #1: modify_build_bug_on.patch --]
[-- Type: text/plain, Size: 703 bytes --]
All these structure sizes are runtime determined. So use a runtime
bug check.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
Index: tip/arch/x86/kernel/xsave.c
===================================================================
--- tip.orig/arch/x86/kernel/xsave.c 2008-08-11 15:44:33.000000000 -0700
+++ tip/arch/x86/kernel/xsave.c 2008-08-11 15:45:09.000000000 -0700
@@ -82,8 +82,7 @@
if (!access_ok(VERIFY_WRITE, buf, sig_xstate_size))
return -EACCES;
- BUILD_BUG_ON(sizeof(struct user_i387_struct) !=
- sizeof(tsk->thread.xstate->fxsave));
+ BUG_ON(sig_xstate_size < xstate_size);
if ((unsigned long)buf % 64)
printk("save_i387_xstate: bad fpstate %p\n", buf);
--
next prev parent reply other threads:[~2008-08-13 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 18:38 [patch 1/3] x86, xsave: remove the redundant access_ok() in setup_rt_frame() Suresh Siddha
2008-08-13 18:38 ` [patch 2/3] x86, xsave: clear the user buffer before doing fxsave/xsave Suresh Siddha
2008-08-13 18:38 ` Suresh Siddha [this message]
2008-08-14 8:56 ` [patch 3/3] x86, xsave: use BUG_ON() instead of BUILD_BUG_ON() Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080813183857.246823000@linux-os.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox