All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Build fixes for liblockdep
@ 2018-08-28 23:56 Ben Hutchings
  2018-08-28 23:57 ` [PATCH 1/2] liblockdep: Stub NMI watchdog reset Ben Hutchings
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ben Hutchings @ 2018-08-28 23:56 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

In addition to the patch I recently sent for lockdep itself, the
following fixes are also needed to make liblockdep build.

Ben.

Bastian Blank (1):
  liblockdep: Stub NMI watchdog reset

Ben Hutchings (1):
  liblockdep: Stub task_struct::state

 tools/include/linux/lockdep.h |  4 ++++
 tools/include/linux/nmi.h     | 12 ++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 tools/include/linux/nmi.h


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] liblockdep: Stub NMI watchdog reset
  2018-08-28 23:56 [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
@ 2018-08-28 23:57 ` Ben Hutchings
  2018-08-28 23:57 ` [PATCH 2/2] liblockdep: Stub task_struct::state Ben Hutchings
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2018-08-28 23:57 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-kernel, Bastian Blank

From: Bastian Blank <waldi@debian.org>

lockdep.c now includes <linux/nmi.h> and requires touch_nmi_watchdog(),
so provide those for liblockdep.

Fixes: 88f1c87de11a ("locking/lockdep: Avoid triggering hardlockup from ...")
[bwh: Write a longer description]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 tools/include/linux/nmi.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 tools/include/linux/nmi.h

diff --git a/tools/include/linux/nmi.h b/tools/include/linux/nmi.h
new file mode 100644
index 000000000000..81ffb39343cc
--- /dev/null
+++ b/tools/include/linux/nmi.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ *  linux/include/linux/nmi.h
+ */
+#ifndef LINUX_NMI_H
+#define LINUX_NMI_H
+
+static inline void touch_nmi_watchdog(void)
+{
+}
+
+#endif


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] liblockdep: Stub task_struct::state
  2018-08-28 23:56 [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
  2018-08-28 23:57 ` [PATCH 1/2] liblockdep: Stub NMI watchdog reset Ben Hutchings
@ 2018-08-28 23:57 ` Ben Hutchings
  2018-08-28 23:59 ` [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
  2018-08-29  0:19 ` Sasha Levin
  3 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2018-08-28 23:57 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

lockdep_print_held_locks() now checks task_struct::state.  Define it
so that all tasks are assumed to be running, since we have no
reasonble way to tell in user-space.

Fixes: 8cc05c71ba5f ("locking/lockdep: Move sanity check to inside ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 tools/include/linux/lockdep.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/include/linux/lockdep.h b/tools/include/linux/lockdep.h
index 6b0c36a58fcb..8e84609afb04 100644
--- a/tools/include/linux/lockdep.h
+++ b/tools/include/linux/lockdep.h
@@ -31,12 +31,16 @@ struct task_struct {
 	gfp_t lockdep_reclaim_gfp;
 	int pid;
 	char comm[17];
+	long state;
 };
 
 extern struct task_struct *__curr(void);
 
 #define current (__curr())
 
+/* lockdep checks task_struct::state == TASK_RUNNING */
+#define TASK_RUNNING 0
+
 static inline int debug_locks_off(void)
 {
 	return 1;

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Build fixes for liblockdep
  2018-08-28 23:56 [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
  2018-08-28 23:57 ` [PATCH 1/2] liblockdep: Stub NMI watchdog reset Ben Hutchings
  2018-08-28 23:57 ` [PATCH 2/2] liblockdep: Stub task_struct::state Ben Hutchings
@ 2018-08-28 23:59 ` Ben Hutchings
  2018-08-29  0:19 ` Sasha Levin
  3 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2018-08-28 23:59 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Also, please update your address in MAINTAINERS.

Ben.

On Wed, Aug 29, 2018 at 12:56:56AM +0100, Ben Hutchings wrote:
> In addition to the patch I recently sent for lockdep itself, the
> following fixes are also needed to make liblockdep build.
> 
> Ben.
> 
> Bastian Blank (1):
>   liblockdep: Stub NMI watchdog reset
> 
> Ben Hutchings (1):
>   liblockdep: Stub task_struct::state
> 
>  tools/include/linux/lockdep.h |  4 ++++
>  tools/include/linux/nmi.h     | 12 ++++++++++++
>  2 files changed, 16 insertions(+)
>  create mode 100644 tools/include/linux/nmi.h
> 



-- 
Ben Hutchings
For every complex problem
there is a solution that is simple, neat, and wrong.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Build fixes for liblockdep
  2018-08-28 23:56 [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
                   ` (2 preceding siblings ...)
  2018-08-28 23:59 ` [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
@ 2018-08-29  0:19 ` Sasha Levin
  3 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2018-08-29  0:19 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: linux-kernel

On Wed, Aug 29, 2018 at 12:56:57AM +0100, Ben Hutchings wrote:
>In addition to the patch I recently sent for lockdep itself, the
>following fixes are also needed to make liblockdep build.

Thanks Ben. I've already sent patches similar to this as well as a
MAINTAINERS update a few weeks ago to Ingo, but he didn't merge it in
yet (https://lkml.org/lkml/2018/8/13/480). Let me follow up with him.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/2] Build fixes for liblockdep
@ 2018-08-28 23:36 Ben Hutchings
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2018-08-28 23:36 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

In addition to the patch I recently sent for lockdep itself, the
following fixes are also needed to make liblockdep build.

Ben.

Bastian Blank (1):
  liblockdep: Stub NMI watchdog reset

Ben Hutchings (1):
  liblockdep: Stub task_struct::state

 tools/include/linux/lockdep.h |  4 ++++
 tools/include/linux/nmi.h     | 12 ++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 tools/include/linux/nmi.h


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-29  0:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 23:56 [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
2018-08-28 23:57 ` [PATCH 1/2] liblockdep: Stub NMI watchdog reset Ben Hutchings
2018-08-28 23:57 ` [PATCH 2/2] liblockdep: Stub task_struct::state Ben Hutchings
2018-08-28 23:59 ` [PATCH 0/2] Build fixes for liblockdep Ben Hutchings
2018-08-29  0:19 ` Sasha Levin
  -- strict thread matches above, loose matches on Subject: below --
2018-08-28 23:36 Ben Hutchings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.