Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1189751 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2015-07-22 10:50 +0200 |
| Last post | 2015-07-22 10:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC PATCH 3/4] x86/mce: Add a wrapper around mce_log() for injection Borislav Petkov <bp@alien8.de> - 2015-07-22 10:50 +0200
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-07-22 10:50 +0200 |
| Subject | [RFC PATCH 3/4] x86/mce: Add a wrapper around mce_log() for injection |
| Message-ID | <pOXSW-1JX-17@gated-at.bofh.it> |
From: Borislav Petkov <bp@suse.de>
Will be used by an injector module in a following patch.
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/cpu/mcheck/mce-internal.h | 2 ++
arch/x86/kernel/cpu/mcheck/mce.c | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/arch/x86/kernel/cpu/mcheck/mce-internal.h b/arch/x86/kernel/cpu/mcheck/mce-internal.h
index 70d43f541bed..f5e507e6ae6f 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-internal.h
+++ b/arch/x86/kernel/cpu/mcheck/mce-internal.h
@@ -79,3 +79,5 @@ static inline int apei_clear_mce(u64 record_id)
return -EINVAL;
}
#endif
+
+void mce_inject_log(struct mce *m);
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 36c065e6fa94..64d1ae916428 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -199,6 +199,13 @@ void mce_log(struct mce *mce)
set_bit(0, &mce_need_notify);
}
+void mce_inject_log(struct mce *m)
+{
+ mutex_lock(&mce_chrdev_read_mutex);
+ mce_log(m);
+ mutex_unlock(&mce_chrdev_read_mutex);
+}
+
static struct notifier_block mce_srao_nb;
void mce_register_decode_chain(struct notifier_block *nb)
--
2.5.0.rc2.28.g6003e7f
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web