The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [for-next][PATCH 0/6] tracing: Updates for 6.7
@ 2023-10-20 22:27 Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 1/6] eventfs: Use ERR_CAST() in eventfs_create_events_dir() Steven Rostedt
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-10-20 22:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton

  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/for-next

Head SHA1: 845e31e1101fc8533be52aff42d8f1ff48636024


Dan Carpenter (1):
      tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir()

Jiapeng Chong (1):
      tracefs/eventfs: Modify mismatched function name

Jonathan Corbet (1):
      seq_buf: fix a misleading comment

Matthew Wilcox (Oracle) (1):
      tracing: Move readpos from seq_buf to trace_seq

Nathan Chancellor (1):
      eventfs: Use ERR_CAST() in eventfs_create_events_dir()

Steven Rostedt (Google) (1):
      eventfs: Fix failure path in eventfs_create_events_dir()

----
 fs/tracefs/event_inode.c    |  7 ++++---
 include/linux/seq_buf.h     |  7 ++-----
 include/linux/trace_seq.h   |  2 ++
 kernel/trace/trace.c        | 10 +++++-----
 kernel/trace/trace_events.c |  2 +-
 kernel/trace/trace_seq.c    |  6 +++++-
 lib/seq_buf.c               | 22 ++++++++++------------
 7 files changed, 29 insertions(+), 27 deletions(-)

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

* [for-next][PATCH 1/6] eventfs: Use ERR_CAST() in eventfs_create_events_dir()
  2023-10-20 22:27 [for-next][PATCH 0/6] tracing: Updates for 6.7 Steven Rostedt
@ 2023-10-20 22:27 ` Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 2/6] eventfs: Fix failure path " Steven Rostedt
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-10-20 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton, Kees Cook,
	Nathan Chancellor

From: Nathan Chancellor <nathan@kernel.org>

When building with clang and CONFIG_RANDSTRUCT_FULL=y, there is an error
due to a cast in eventfs_create_events_dir():

  fs/tracefs/event_inode.c:734:10: error: casting from randomized structure pointer type 'struct dentry *' to 'struct eventfs_inode *'
    734 |                 return (struct eventfs_inode *)dentry;
        |                        ^
  1 error generated.

Use the ERR_CAST() function to resolve the error, as it was designed for
this exact situation (casting an error pointer to another type).

Link: https://lore.kernel.org/linux-trace-kernel/20231018-ftrace-fix-clang-randstruct-v1-1-338cb214abfb@kernel.org

Closes: https://github.com/ClangBuiltLinux/linux/issues/1947
Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode")
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/tracefs/event_inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index 1ccd100bc565..9f19b6608954 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -731,7 +731,7 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry
 		return NULL;
 
 	if (IS_ERR(dentry))
-		return (struct eventfs_inode *)dentry;
+		return ERR_CAST(dentry);
 
 	ei = kzalloc(sizeof(*ei), GFP_KERNEL);
 	if (!ei)
-- 
2.42.0

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

* [for-next][PATCH 2/6] eventfs: Fix failure path in eventfs_create_events_dir()
  2023-10-20 22:27 [for-next][PATCH 0/6] tracing: Updates for 6.7 Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 1/6] eventfs: Use ERR_CAST() in eventfs_create_events_dir() Steven Rostedt
@ 2023-10-20 22:27 ` Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 3/6] tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir() Steven Rostedt
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-10-20 22:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton, Julia Lawall

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The failure path of allocating ei goes to a path that dereferences ei.
Add another label that skips over the ei dereferences to do the rest of
the clean up.

Link: https://lore.kernel.org/all/70e7bace-561c-95f-1117-706c2c220bc@inria.fr/
Link: https://lore.kernel.org/linux-trace-kernel/20231019204132.6662fef0@gandalf.local.home

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode")
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/tracefs/event_inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index 9f19b6608954..1885f1f1f339 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -735,7 +735,7 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry
 
 	ei = kzalloc(sizeof(*ei), GFP_KERNEL);
 	if (!ei)
-		goto fail;
+		goto fail_ei;
 
 	inode = tracefs_get_inode(dentry->d_sb);
 	if (unlikely(!inode))
@@ -781,6 +781,7 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry
  fail:
 	kfree(ei->d_children);
 	kfree(ei);
+ fail_ei:
 	tracefs_failed_creating(dentry);
 	return ERR_PTR(-ENOMEM);
 }
-- 
2.42.0

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

* [for-next][PATCH 3/6] tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir()
  2023-10-20 22:27 [for-next][PATCH 0/6] tracing: Updates for 6.7 Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 1/6] eventfs: Use ERR_CAST() in eventfs_create_events_dir() Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 2/6] eventfs: Fix failure path " Steven Rostedt
@ 2023-10-20 22:27 ` Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 4/6] tracefs/eventfs: Modify mismatched function name Steven Rostedt
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-10-20 22:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton, Dan Carpenter

From: Dan Carpenter <dan.carpenter@linaro.org>

The eventfs_create_dir() function returns error pointers, it never returns
NULL.  Update the check to reflect that.

Link: https://lore.kernel.org/linux-trace-kernel/ff641474-84e2-46a7-9d7a-62b251a1050c@moroto.mountain

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 kernel/trace/trace_events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index db46d2116500..f9e3e24d8796 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -2354,7 +2354,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
 		nr_entries = ARRAY_SIZE(system_entries);
 
 	ei = eventfs_create_dir(name, parent, system_entries, nr_entries, dir);
-	if (!ei) {
+	if (IS_ERR(ei)) {
 		pr_warn("Failed to create system directory %s\n", name);
 		__put_system(system);
 		goto out_free;
-- 
2.42.0

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

* [for-next][PATCH 4/6] tracefs/eventfs: Modify mismatched function name
  2023-10-20 22:27 [for-next][PATCH 0/6] tracing: Updates for 6.7 Steven Rostedt
                   ` (2 preceding siblings ...)
  2023-10-20 22:27 ` [for-next][PATCH 3/6] tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir() Steven Rostedt
@ 2023-10-20 22:27 ` Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 5/6] tracing: Move readpos from seq_buf to trace_seq Steven Rostedt
  2023-10-20 22:27 ` [for-next][PATCH 6/6] seq_buf: fix a misleading comment Steven Rostedt
  5 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-10-20 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton, Abaci Robot,
	Jiapeng Chong

From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

No functional modification involved.

fs/tracefs/event_inode.c:864: warning: expecting prototype for eventfs_remove(). Prototype was for eventfs_remove_dir() instead.

Link: https://lore.kernel.org/linux-trace-kernel/20231019031353.73846-1-jiapeng.chong@linux.alibaba.com

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6939
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/tracefs/event_inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index 1885f1f1f339..09ab93357957 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -856,7 +856,7 @@ static void unhook_dentry(struct dentry **dentry, struct dentry **list)
 	}
 }
 /**
- * eventfs_remove - remove eventfs dir or file from list
+ * eventfs_remove_dir - remove eventfs dir or file from list
  * @ei: eventfs_inode to be removed.
  *
  * This function acquire the eventfs_mutex lock and call eventfs_remove_rec()
-- 
2.42.0

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

* [for-next][PATCH 5/6] tracing: Move readpos from seq_buf to trace_seq
  2023-10-20 22:27 [for-next][PATCH 0/6] tracing: Updates for 6.7 Steven Rostedt
                   ` (3 preceding siblings ...)
  2023-10-20 22:27 ` [for-next][PATCH 4/6] tracefs/eventfs: Modify mismatched function name Steven Rostedt
@ 2023-10-20 22:27 ` Steven Rostedt
  2023-10-23  9:57   ` Andy Shevchenko
  2023-10-20 22:27 ` [for-next][PATCH 6/6] seq_buf: fix a misleading comment Steven Rostedt
  5 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2023-10-20 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton, Kees Cook,
	Justin Stitt, Kent Overstreet, Petr Mladek, Andy Shevchenko,
	Rasmus Villemoes, Sergey Senozhatsky, Matthew Wilcox (Oracle),
	Christoph Hellwig, Greg Kroah-Hartman

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

To make seq_buf more lightweight as a string buf, move the readpos member
from seq_buf to its container, trace_seq.  That puts the responsibility
of maintaining the readpos entirely in the tracing code.  If some future
users want to package up the readpos with a seq_buf, we can define a
new struct then.

Link: https://lore.kernel.org/linux-trace-kernel/20231020033545.2587554-2-willy@infradead.org

Cc: Kees Cook <keescook@chromium.org>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/linux/seq_buf.h   |  5 +----
 include/linux/trace_seq.h |  2 ++
 kernel/trace/trace.c      | 10 +++++-----
 kernel/trace/trace_seq.c  |  6 +++++-
 lib/seq_buf.c             | 22 ++++++++++------------
 5 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h
index 515d7fcb9634..a0fb013cebdf 100644
--- a/include/linux/seq_buf.h
+++ b/include/linux/seq_buf.h
@@ -14,19 +14,16 @@
  * @buffer:	pointer to the buffer
  * @size:	size of the buffer
  * @len:	the amount of data inside the buffer
- * @readpos:	The next position to read in the buffer.
  */
 struct seq_buf {
 	char			*buffer;
 	size_t			size;
 	size_t			len;
-	loff_t			readpos;
 };
 
 static inline void seq_buf_clear(struct seq_buf *s)
 {
 	s->len = 0;
-	s->readpos = 0;
 }
 
 static inline void
@@ -143,7 +140,7 @@ extern __printf(2, 0)
 int seq_buf_vprintf(struct seq_buf *s, const char *fmt, va_list args);
 extern int seq_buf_print_seq(struct seq_file *m, struct seq_buf *s);
 extern int seq_buf_to_user(struct seq_buf *s, char __user *ubuf,
-			   int cnt);
+			   size_t start, int cnt);
 extern int seq_buf_puts(struct seq_buf *s, const char *str);
 extern int seq_buf_putc(struct seq_buf *s, unsigned char c);
 extern int seq_buf_putmem(struct seq_buf *s, const void *mem, unsigned int len);
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
index 6be92bf559fe..3691e0e76a1a 100644
--- a/include/linux/trace_seq.h
+++ b/include/linux/trace_seq.h
@@ -14,6 +14,7 @@
 struct trace_seq {
 	char			buffer[PAGE_SIZE];
 	struct seq_buf		seq;
+	size_t			readpos;
 	int			full;
 };
 
@@ -22,6 +23,7 @@ trace_seq_init(struct trace_seq *s)
 {
 	seq_buf_init(&s->seq, s->buffer, PAGE_SIZE);
 	s->full = 0;
+	s->readpos = 0;
 }
 
 /**
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4383be8fa1b0..d629065c2383 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1731,15 +1731,15 @@ static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
 {
 	int len;
 
-	if (trace_seq_used(s) <= s->seq.readpos)
+	if (trace_seq_used(s) <= s->readpos)
 		return -EBUSY;
 
-	len = trace_seq_used(s) - s->seq.readpos;
+	len = trace_seq_used(s) - s->readpos;
 	if (cnt > len)
 		cnt = len;
-	memcpy(buf, s->buffer + s->seq.readpos, cnt);
+	memcpy(buf, s->buffer + s->readpos, cnt);
 
-	s->seq.readpos += cnt;
+	s->readpos += cnt;
 	return cnt;
 }
 
@@ -7008,7 +7008,7 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
 
 	/* Now copy what we have to the user */
 	sret = trace_seq_to_user(&iter->seq, ubuf, cnt);
-	if (iter->seq.seq.readpos >= trace_seq_used(&iter->seq))
+	if (iter->seq.readpos >= trace_seq_used(&iter->seq))
 		trace_seq_init(&iter->seq);
 
 	/*
diff --git a/kernel/trace/trace_seq.c b/kernel/trace/trace_seq.c
index bac06ee3b98b..7be97229ddf8 100644
--- a/kernel/trace/trace_seq.c
+++ b/kernel/trace/trace_seq.c
@@ -370,8 +370,12 @@ EXPORT_SYMBOL_GPL(trace_seq_path);
  */
 int trace_seq_to_user(struct trace_seq *s, char __user *ubuf, int cnt)
 {
+	int ret;
 	__trace_seq_init(s);
-	return seq_buf_to_user(&s->seq, ubuf, cnt);
+	ret = seq_buf_to_user(&s->seq, ubuf, s->readpos, cnt);
+	if (ret > 0)
+		s->readpos += ret;
+	return ret;
 }
 EXPORT_SYMBOL_GPL(trace_seq_to_user);
 
diff --git a/lib/seq_buf.c b/lib/seq_buf.c
index 45c450f423fa..b7477aefff53 100644
--- a/lib/seq_buf.c
+++ b/lib/seq_buf.c
@@ -324,23 +324,24 @@ int seq_buf_path(struct seq_buf *s, const struct path *path, const char *esc)
  * seq_buf_to_user - copy the sequence buffer to user space
  * @s: seq_buf descriptor
  * @ubuf: The userspace memory location to copy to
+ * @start: The first byte in the buffer to copy
  * @cnt: The amount to copy
  *
  * Copies the sequence buffer into the userspace memory pointed to
- * by @ubuf. It starts from the last read position (@s->readpos)
- * and writes up to @cnt characters or till it reaches the end of
- * the content in the buffer (@s->len), which ever comes first.
+ * by @ubuf. It starts from @start and writes up to @cnt characters
+ * or until it reaches the end of the content in the buffer (@s->len),
+ * whichever comes first.
  *
  * On success, it returns a positive number of the number of bytes
  * it copied.
  *
  * On failure it returns -EBUSY if all of the content in the
  * sequence has been already read, which includes nothing in the
- * sequence (@s->len == @s->readpos).
+ * sequence (@s->len == @start).
  *
  * Returns -EFAULT if the copy to userspace fails.
  */
-int seq_buf_to_user(struct seq_buf *s, char __user *ubuf, int cnt)
+int seq_buf_to_user(struct seq_buf *s, char __user *ubuf, size_t start, int cnt)
 {
 	int len;
 	int ret;
@@ -350,20 +351,17 @@ int seq_buf_to_user(struct seq_buf *s, char __user *ubuf, int cnt)
 
 	len = seq_buf_used(s);
 
-	if (len <= s->readpos)
+	if (len <= start)
 		return -EBUSY;
 
-	len -= s->readpos;
+	len -= start;
 	if (cnt > len)
 		cnt = len;
-	ret = copy_to_user(ubuf, s->buffer + s->readpos, cnt);
+	ret = copy_to_user(ubuf, s->buffer + start, cnt);
 	if (ret == cnt)
 		return -EFAULT;
 
-	cnt -= ret;
-
-	s->readpos += cnt;
-	return cnt;
+	return cnt - ret;
 }
 
 /**
-- 
2.42.0

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

* [for-next][PATCH 6/6] seq_buf: fix a misleading comment
  2023-10-20 22:27 [for-next][PATCH 0/6] tracing: Updates for 6.7 Steven Rostedt
                   ` (4 preceding siblings ...)
  2023-10-20 22:27 ` [for-next][PATCH 5/6] tracing: Move readpos from seq_buf to trace_seq Steven Rostedt
@ 2023-10-20 22:27 ` Steven Rostedt
  5 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-10-20 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Andrew Morton, Jonathan Corbet

From: Jonathan Corbet <corbet@lwn.net>

The comment for seq_buf_has_overflowed() says that an overflow condition is
marked by len == size, but that's not what the code is testing.  Make the
comment match reality.

Link: https://lkml.kernel.org/r/87pm19kp0m.fsf@meer.lwn.net

Fixes: 8cd709ae7658a ("tracing: Have seq_buf use full buffer")
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/linux/seq_buf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h
index a0fb013cebdf..8483e4b2d0d2 100644
--- a/include/linux/seq_buf.h
+++ b/include/linux/seq_buf.h
@@ -36,7 +36,7 @@ seq_buf_init(struct seq_buf *s, char *buf, unsigned int size)
 
 /*
  * seq_buf have a buffer that might overflow. When this happens
- * the len and size are set to be equal.
+ * len is set to be greater than size.
  */
 static inline bool
 seq_buf_has_overflowed(struct seq_buf *s)
-- 
2.42.0

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

* Re: [for-next][PATCH 5/6] tracing: Move readpos from seq_buf to trace_seq
  2023-10-20 22:27 ` [for-next][PATCH 5/6] tracing: Move readpos from seq_buf to trace_seq Steven Rostedt
@ 2023-10-23  9:57   ` Andy Shevchenko
  2023-10-23 14:43     ` Steven Rostedt
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2023-10-23  9:57 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Masami Hiramatsu, Mark Rutland, Andrew Morton,
	Kees Cook, Justin Stitt, Kent Overstreet, Petr Mladek,
	Rasmus Villemoes, Sergey Senozhatsky, Matthew Wilcox (Oracle),
	Christoph Hellwig, Greg Kroah-Hartman

On Fri, Oct 20, 2023 at 06:27:18PM -0400, Steven Rostedt wrote:
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> 
> To make seq_buf more lightweight as a string buf, move the readpos member
> from seq_buf to its container, trace_seq.  That puts the responsibility
> of maintaining the readpos entirely in the tracing code.  If some future
> users want to package up the readpos with a seq_buf, we can define a
> new struct then.

> Link: https://lore.kernel.org/linux-trace-kernel/20231020033545.2587554-2-willy@infradead.org
> 

If we want Link: to be recognized as a tag, we probably should remove the blank
line. Maybe new versions of b4 support that, but not all maintainers use it and
AFAIK the convention was to have no blank lines in the tag block.

> Cc: Kees Cook <keescook@chromium.org>
> Cc: Justin Stitt <justinstitt@google.com>
> Cc: Kent Overstreet <kent.overstreet@linux.dev>
> Cc: Petr Mladek <pmladek@suse.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>


-- 
With Best Regards,
Andy Shevchenko



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

* Re: [for-next][PATCH 5/6] tracing: Move readpos from seq_buf to trace_seq
  2023-10-23  9:57   ` Andy Shevchenko
@ 2023-10-23 14:43     ` Steven Rostedt
  0 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-10-23 14:43 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, Masami Hiramatsu, Mark Rutland, Andrew Morton,
	Kees Cook, Justin Stitt, Kent Overstreet, Petr Mladek,
	Rasmus Villemoes, Sergey Senozhatsky, Matthew Wilcox (Oracle),
	Christoph Hellwig, Greg Kroah-Hartman

On Mon, 23 Oct 2023 12:57:53 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Fri, Oct 20, 2023 at 06:27:18PM -0400, Steven Rostedt wrote:
> > From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> > 
> > To make seq_buf more lightweight as a string buf, move the readpos member
> > from seq_buf to its container, trace_seq.  That puts the responsibility
> > of maintaining the readpos entirely in the tracing code.  If some future
> > users want to package up the readpos with a seq_buf, we can define a
> > new struct then.  
> 
> > Link: https://lore.kernel.org/linux-trace-kernel/20231020033545.2587554-2-willy@infradead.org
> >   
> 
> If we want Link: to be recognized as a tag, we probably should remove the blank
> line. Maybe new versions of b4 support that, but not all maintainers use it and
> AFAIK the convention was to have no blank lines in the tag block.
> 

So I've been using Link tags for over a decade. I originally had it as
part of the tag block, but realized that it's more for humans than bots,
and purposely separated it out. What Link tags are good for IMO is for
humans that are looking at git blame and want to know more content. I
prefer the Link tag to stand out so that it's easier for humans to go back
to the archive and see if there was more discussions about why the change
was made.

Hence, I don't really care if Link tags are "recognized" by anything but
humans. It's actually one of the first tags to show up after Signed-off-by:
Cc: and Acked-by:. I believe it even predates "Fixes". At least the new
format for the Fixes tag.

-- Steve

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

end of thread, other threads:[~2023-10-23 14:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 22:27 [for-next][PATCH 0/6] tracing: Updates for 6.7 Steven Rostedt
2023-10-20 22:27 ` [for-next][PATCH 1/6] eventfs: Use ERR_CAST() in eventfs_create_events_dir() Steven Rostedt
2023-10-20 22:27 ` [for-next][PATCH 2/6] eventfs: Fix failure path " Steven Rostedt
2023-10-20 22:27 ` [for-next][PATCH 3/6] tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir() Steven Rostedt
2023-10-20 22:27 ` [for-next][PATCH 4/6] tracefs/eventfs: Modify mismatched function name Steven Rostedt
2023-10-20 22:27 ` [for-next][PATCH 5/6] tracing: Move readpos from seq_buf to trace_seq Steven Rostedt
2023-10-23  9:57   ` Andy Shevchenko
2023-10-23 14:43     ` Steven Rostedt
2023-10-20 22:27 ` [for-next][PATCH 6/6] seq_buf: fix a misleading comment Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox