From: Gregory Price <gourry.memverge@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kselftest@vger.kernel.org, krisman@collabora.com,
tglx@linutronix.de, luto@kernel.org, oleg@redhat.com,
peterz@infradead.org, ebiederm@xmission.com,
akpm@linux-foundation.org, adobriyan@gmail.com, corbet@lwn.net,
shuah@kernel.org, Gregory Price <gregory.price@memverge.com>
Subject: [PATCH 2/3] fs/proc/array: Add Syscall User Dispatch to proc status
Date: Mon, 9 Jan 2023 10:33:47 -0500 [thread overview]
Message-ID: <20230109153348.5625-3-gregory.price@memverge.com> (raw)
In-Reply-To: <20230109153348.5625-1-gregory.price@memverge.com>
If a dispatch selector has been configured for Syscall User Dispatch,
report Syscall User Dispath as configured in proc/status.
This provides an indicator to userland checkpoint/restart software that
it must manage special signal conditions (similar to SECCOMP)
Signed-off-by: Gregory Price <gregory.price@memverge.com>
---
fs/proc/array.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 49283b8103c7..c85cdb4c137c 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -428,6 +428,13 @@ static inline void task_thp_status(struct seq_file *m, struct mm_struct *mm)
seq_printf(m, "THP_enabled:\t%d\n", thp_enabled);
}
+static inline void task_syscall_user_dispatch(struct seq_file *m,
+ struct task_struct *p)
+{
+ seq_put_decimal_ull(m, "\nSyscall_user_dispatch:\t",
+ (p->syscall_dispatch.selector != NULL));
+}
+
int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task)
{
@@ -451,6 +458,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
task_cpus_allowed(m, task);
cpuset_task_status_allowed(m, task);
task_context_switch_counts(m, task);
+ task_syscall_user_dispatch(m, task);
return 0;
}
--
2.37.3
next prev parent reply other threads:[~2023-01-09 15:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 15:33 [RFC PATCH 0/3] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-01-09 15:33 ` [PATCH 1/3] ptrace,syscall_user_dispatch: Implement Syscall User Dispatch Suspension Gregory Price
2023-01-18 17:16 ` Peter Zijlstra
[not found] ` <CAD3UvdSpOMAOUm1CYJ5vOyEsiVZCQdiWaTmXjq1vWVFq1DhQ0w@mail.gmail.com>
2023-01-18 19:49 ` Gregory Price
2023-01-18 20:40 ` Peter Zijlstra
2023-01-09 15:33 ` Gregory Price [this message]
2023-01-17 13:01 ` [PATCH 2/3] fs/proc/array: Add Syscall User Dispatch to proc status kernel test robot
2023-01-09 15:33 ` [PATCH 3/3] prctl,syscall_user_dispatch: add a getter for configuration info Gregory Price
2023-01-12 18:15 ` Andrei Vagin
2023-01-12 22:51 ` Gregory Price
2023-01-13 8:28 ` Bagas Sanjaya
2023-01-18 20:10 [PATCH v2 0/3] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-01-18 20:10 ` [PATCH 2/3] fs/proc/array: Add Syscall User Dispatch to proc status Gregory Price
2023-01-23 3:29 [PATCH v5 0/3] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-01-23 3:29 ` [PATCH 2/3] fs/proc/array: Add Syscall User Dispatch to proc status Gregory Price
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=20230109153348.5625-3-gregory.price@memverge.com \
--to=gourry.memverge@gmail.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=ebiederm@xmission.com \
--cc=gregory.price@memverge.com \
--cc=krisman@collabora.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--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
all inboxes | Powered by JetHome®