Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3911713rwb; Sat, 21 Jan 2023 02:36:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXsIcJXuzHVsdtwthHWU0EJNmA8CS3Um9+vPKS3jZZhEcJhHdEtSGIYQ4Kc89HfWehKD1jPr X-Received: by 2002:a05:6402:380d:b0:49e:5ffd:5be2 with SMTP id es13-20020a056402380d00b0049e5ffd5be2mr10678234edb.40.1674297370136; Sat, 21 Jan 2023 02:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674297370; cv=none; d=google.com; s=arc-20160816; b=R4otVLD8vfUYklm954Ox2TeBXM1cFd56trjXhMvaawPMZTYSFcNOnBVfthkz2KxkAn Jn3xXEftrtvELWevozAb4DprssNdGuEWU9vteYdluOJv7gO+/Qq0UMwtl5fwDgJrAPXx qOL5nVjS3+nQnmTNA56Hvkub2O+0KfdsDXnWmggD2vkn9GMyzWWpWePOuQrJW7WEEHQB siY8Xxri7+HlZSkE9KzRQdvHjnv4K1hf3FYBWzOGKjR9Idoy6NvcUe+eT8yWoDYZxZg5 rWyjkCJAcJConu9oEe9u9du8HZ0JuDRzbY+XYsYilZABcPj3P+LlNRyJjdQU/PqfThzU ZMmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ACObeGmvp/0Nnei4QCSvOb8xescxKyeceEFZIuDD2Fc=; b=xmKFlyV4KLYuVc+y8QhFkT3RX+7sxigafzkg6e/Y9TM5McoiQknTkgOc8ZwYdybBfc FJBClT5i1zBlzp9kUYtNDjjGdwAYDqXL3baisSwWIgANdQGp5nzZyQitlMMoWJ3fp65e eMcJvic5RGYI3tmybUOqE2xgFaN8PodUwCtmKmDFoKxsQ+gSZ+MEIv3BdRXbuT+d8BPr xX8woMaZ5MuD4NKXtZEL4vGrD0P17r7pIC8sGhbFCq/DUFUlSf7rNcp6sku/zC8/V4R8 /mLgOnNB/K0c5Zt0Z4ljNGDffRJuDd7muTKugIB7Xa2yaVbhmJXGf+2HhiJ7fsIWl6Jm Yqvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MvgOXV4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi13-20020a056402550d00b00497d4ca4578si36996558edb.593.2023.01.21.02.35.57; Sat, 21 Jan 2023 02:36:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MvgOXV4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbjAUKXf (ORCPT + 52 others); Sat, 21 Jan 2023 05:23:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjAUKXZ (ORCPT ); Sat, 21 Jan 2023 05:23:25 -0500 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5006846D74; Sat, 21 Jan 2023 02:23:24 -0800 (PST) Received: by mail-qt1-x842.google.com with SMTP id h24so2186928qta.12; Sat, 21 Jan 2023 02:23:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ACObeGmvp/0Nnei4QCSvOb8xescxKyeceEFZIuDD2Fc=; b=MvgOXV4a9b8FFR7E4w2hZdj30Z7Om2ZS7Br9wR9ZecVYL0MBWrr3ZF/16KQF1f6vCZ w23Rx/4Tndk44FpOoUlbZBivV1wBCqWpzj+E6/MS/lywaipbEcUncSWuXXkBxfXYvcQy r7v2HiJnWour4ErFmxvtX0jggEevVsdIEgesXbK+G/e8eJB6yW72LWAK4TYJPwIweo01 AY2ShvdvDwyeJV+MbTk2zYJ+zTX2gEN3hXiM51a3D6E/yNUJxrBcrWWDcPUxdqxDC/HH r/sUIuu/8QJd1A2tDXOoq3ml6CWvY68DWhbDmB3WEUEA/gaPJWgHpy33kWGxCktu7VAw VWkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ACObeGmvp/0Nnei4QCSvOb8xescxKyeceEFZIuDD2Fc=; b=cIh6Zb/FQyK+2yq7G9o37q7iGzBpPlIe8sVe7Gb5qVJUOSMbIBL9l0Pqz/la7+Bgh8 17ZMO5f+h02L/snYb8EkaggbelbTHwFNnG7gHrAMyi6yfmJj3W0W09EgZaFCw/WRdXNn j4VGEkKS5aJMKxeQfbV6U2SXBsk1pw04Gl6ncQ5mTjqk3zUBuj1BIoMGCvv3y/SuY8UP zU3RjbKoX277Bp9ODTZO8dn2j0gypqRn4ilhKa4NAzTeXSPsxACVzSs6nOs1DCOeHj8Q Q4c0oYAb5+Dp4mJSJ0P5fxIIXzOr7KXsanAf1f+0dS32Bv0Z6P5SJEmLrmUGGt7LXs2D 8ZQg== X-Gm-Message-State: AFqh2kqzRhdmixUTEqexrCuWq5d4S9S0chRPFQrKEeTxjs1rxQK9hIl2 foV1XoecOakw/P1CqcQHfsU+vDWzYsLm X-Received: by 2002:a05:622a:22a5:b0:3b4:a6ac:770c with SMTP id ay37-20020a05622a22a500b003b4a6ac770cmr25548530qtb.45.1674296603337; Sat, 21 Jan 2023 02:23:23 -0800 (PST) Received: from fedora.mshome.net (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id y2-20020a05620a44c200b006e42a8e9f9bsm14128630qkp.121.2023.01.21.02.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 02:23:23 -0800 (PST) From: Gregory Price X-Google-Original-From: Gregory Price 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 Subject: [PATCH v4 2/3] fs/proc/array: Add Syscall User Dispatch to proc status Date: Sat, 21 Jan 2023 05:23:15 -0500 Message-Id: <20230121102316.331935-3-gregory.price@memverge.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230121102316.331935-1-gregory.price@memverge.com> References: <20230121102316.331935-1-gregory.price@memverge.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Report the value of test_syscall_work(SYSCALL_USER_DISPATCH)) in proc/status. This provides an indicator to userland checkpoint/resume software that it must manage special signal conditions (similar to SECCOMP) Signed-off-by: Gregory Price --- fs/proc/array.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/proc/array.c b/fs/proc/array.c index 49283b8103c7..2275ac153c4c 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", + test_syscall_work(SYSCALL_USER_DISPATCH)); +} + 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.39.0