All of lore.kernel.org
 help / color / mirror / Atom feed
* + connector-send-event-on-write-to-proc-comm.patch added to -mm tree
@ 2021-07-16  4:03 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2021-07-16  4:03 UTC (permalink / raw)
  To: adobriyan, christian.brauner, davem, ebiederm, mingo, mm-commits,
	ohoono.kwon


The patch titled
     Subject: connector: send event on write to /proc/[pid]/comm
has been added to the -mm tree.  Its filename is
     connector-send-event-on-write-to-proc-comm.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/connector-send-event-on-write-to-proc-comm.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/connector-send-event-on-write-to-proc-comm.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Ohhoon Kwon <ohoono.kwon@samsung.com>
Subject: connector: send event on write to /proc/[pid]/comm

While comm change event via prctl has been reported to proc connector by
'commit f786ecba4158 ("connector: add comm change event report to proc
connector")', connector listeners were missing comm changes by explicit
writes on /proc/[pid]/comm.

Let explicit writes on /proc/[pid]/comm report to proc connector.

Link: https://lkml.kernel.org/r/20210701133458epcms1p68e9eb9bd0eee8903ba26679a37d9d960@epcms1p6
Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/proc/base.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/fs/proc/base.c~connector-send-event-on-write-to-proc-comm
+++ a/fs/proc/base.c
@@ -95,6 +95,7 @@
 #include <linux/posix-timers.h>
 #include <linux/time_namespace.h>
 #include <linux/resctrl.h>
+#include <linux/cn_proc.h>
 #include <trace/events/oom.h>
 #include "internal.h"
 #include "fd.h"
@@ -1674,8 +1675,10 @@ static ssize_t comm_write(struct file *f
 	if (!p)
 		return -ESRCH;
 
-	if (same_thread_group(current, p))
+	if (same_thread_group(current, p)) {
 		set_task_comm(p, buffer);
+		proc_comm_connector(p);
+	}
 	else
 		count = -EINVAL;
 
_

Patches currently in -mm which might be from ohoono.kwon@samsung.com are

mm-sparse-pass-section_nr-to-section_mark_present.patch
mm-sparse-pass-section_nr-to-find_memory_block.patch
mm-sparse-remove-__section_nr-function.patch
connector-send-event-on-write-to-proc-comm.patch


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

* + connector-send-event-on-write-to-proc-comm.patch added to -mm tree
@ 2021-07-16  4:03 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2021-07-16  4:03 UTC (permalink / raw)
  To: christian.brauner, davem, ebiederm, mingo, mm-commits, ohoono.kwon


The patch titled
     Subject: connector: send event on write to /proc/[pid]/comm
has been added to the -mm tree.  Its filename is
     connector-send-event-on-write-to-proc-comm.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/connector-send-event-on-write-to-proc-comm.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/connector-send-event-on-write-to-proc-comm.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Ohhoon Kwon <ohoono.kwon@samsung.com>
Subject: connector: send event on write to /proc/[pid]/comm

While comm change event via prctl has been reported to proc connector by
'commit f786ecba4158 ("connector: add comm change event report to proc
connector")', connector listeners were missing comm changes by explicit
writes on /proc/[pid]/comm.

Let explicit writes on /proc/[pid]/comm report to proc connector.

Link: https://lkml.kernel.org/r/20210701133458epcms1p68e9eb9bd0eee8903ba26679a37d9d960@epcms1p6
Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/proc/base.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/fs/proc/base.c~connector-send-event-on-write-to-proc-comm
+++ a/fs/proc/base.c
@@ -95,6 +95,7 @@
 #include <linux/posix-timers.h>
 #include <linux/time_namespace.h>
 #include <linux/resctrl.h>
+#include <linux/cn_proc.h>
 #include <trace/events/oom.h>
 #include "internal.h"
 #include "fd.h"
@@ -1674,8 +1675,10 @@ static ssize_t comm_write(struct file *f
 	if (!p)
 		return -ESRCH;
 
-	if (same_thread_group(current, p))
+	if (same_thread_group(current, p)) {
 		set_task_comm(p, buffer);
+		proc_comm_connector(p);
+	}
 	else
 		count = -EINVAL;
 
_

Patches currently in -mm which might be from ohoono.kwon@samsung.com are

mm-sparse-pass-section_nr-to-section_mark_present.patch
mm-sparse-pass-section_nr-to-find_memory_block.patch
mm-sparse-remove-__section_nr-function.patch
connector-send-event-on-write-to-proc-comm.patch


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

end of thread, other threads:[~2021-07-16  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16  4:03 + connector-send-event-on-write-to-proc-comm.patch added to -mm tree akpm
  -- strict thread matches above, loose matches on Subject: below --
2021-07-16  4:03 akpm

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.