Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2806072rwb; Fri, 20 Jan 2023 07:35:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXs7W5hnQ5b1fiPlJJTAHqSxKEVagoTAhbg3cvt9BfcOQWGwtnDM+WjGEV67oLFgP0h153PS X-Received: by 2002:a17:907:98f4:b0:872:6bd0:d25 with SMTP id ke20-20020a17090798f400b008726bd00d25mr15596047ejc.37.1674228928720; Fri, 20 Jan 2023 07:35:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674228928; cv=none; d=google.com; s=arc-20160816; b=uI+rwy3jS0ANhpHT9vyinPzh3RlIz7M7Uwdo4XfaliSnTcg2BOWAUCyDye/GAHxttH tTVoQ/d0HeS8DaGJ/bMPKv9tmjQWr3czr1Fd5E6yjDQOmhhtBxqv0IMAISxZzT2ZPBOD Kf9+u0HQ4kcJRAZhQXarZlMTMsHt9/AEGfc54h0rAllXIWCI4Ft+Wu7Hl68bF0yCY77c 0ZogkmK0HmcCWPV/gp2r8KhAveicMmQErXcy4MKCD33IqSTIZoWYJ2QYRnfcOE0Ff+IJ 34FYMXKa39uWT2IeVIfpL/kdGKOCzojalS/stMTUe39/AJ1e5hOeExwY4qYS6Qm4b/L1 4Xqg== 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=fqgqlvxl2/AjHmd8bF7KdCJg7y96KUb9pTAZ52R5/2g=; b=txy4m5RiCNmu4113FwCuf6M1R0KwqDCgcrYFOjvZWOB/32YcjwlFDrZpLSlYWgGE0q 5URKNTUeTrfy5R/aDJXzM2W9+SFsWTurVCb6hYY90wc6tdNcnUxtTTVK6BOXASZzvj7m K4urUcQxHD/L8g9B71GMpGnRPUplbETcr7XgemboepjvVO0qSxkj3FdqEl+3lLiu4je9 +nJVGC8L5UZN5b7Y8tbNMKcB9fsQkmheLkiruZgrJaAOecdkr16ZX1yeou+K9WC9lUnJ tBxxPZyLgpWAT6U0dIsMEiLmJXyeWkTCxLa2KPYeXn8b0VEM9P7/tg/3XDKejurbDc3N 0jgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LnkI5KpN; 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 c26-20020aa7d61a000000b0049ee981bdb4si1227498edr.193.2023.01.20.07.35.16; Fri, 20 Jan 2023 07:35:28 -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=LnkI5KpN; 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 S229862AbjATOpU (ORCPT + 49 others); Fri, 20 Jan 2023 09:45:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231165AbjATOpQ (ORCPT ); Fri, 20 Jan 2023 09:45:16 -0500 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94510D0DB6; Fri, 20 Jan 2023 06:44:48 -0800 (PST) Received: by mail-il1-x142.google.com with SMTP id f8so2795954ilj.5; Fri, 20 Jan 2023 06:44:48 -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=fqgqlvxl2/AjHmd8bF7KdCJg7y96KUb9pTAZ52R5/2g=; b=LnkI5KpNCjol1eJRa1CeU/Ka3N1fJp1SFPwR8vNOaRqLIo56jlYqGRYpXaJlDi6Pzb f4dI/Qped/yuiW1YvWStBpb75NDAk1VgKzY4hjv0r3WIC/rHd6ZtILpTweCNIOehdyvx BiKQ3i5u2IZSxuhgB8IIkEvtgetqRSmNS5kB6nWjG+gfnvfJAVRkly/EZzT1EU3vkxET C9bYRZBG6kbkHa9GW0YR3bt1m2UpCOZV8eKICKy+3EAlZWwZ0MK9tM66c5dVcFQs6urC zYpA6AM94BfeJczIHlnlHVY/XYUpi5S63DzgQmwdmvYgn44khT4MjnjzmCqif8z+LPan 1rpQ== 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=fqgqlvxl2/AjHmd8bF7KdCJg7y96KUb9pTAZ52R5/2g=; b=2uUkoyQ8Gi3oEAPJWTQVrma4CTTIes3uEwBMTs6f27ih8+Ds5eWFA+P2dBwZm18xUb 5n+q573IxaP9tVurxu8xclgykb8tD/UeyXWBUur/GAXhR8VCy3i+4VLPqmVDR/OLLFqQ 5azKxMAyAMS+wqe9ZxiMyq5DF0Pqaqtz8YpbPKH2Jx76eOyVX97a+DjASW98993dvdDG jbsHLrH0cAnPHvTvEroAhAQTrkwJOgVvMPr1/LjFzFgQYnacqlQrgypZVKCz5GRvFiJC 23AbGSv1GQnU060ZkY3NC24Tf5R5RSQbCvtykNIl9cL6lXMDSIyXWMs+Kb8fmTpDArGF qrgA== X-Gm-Message-State: AFqh2kqS6ChHMQzMGH2VMZVc1483YyvBfWPbPbtDe1X4v1KQMTdLSLGe lGZBodfsJP8b0br/vaxDa+dlJqEOR/ZK X-Received: by 2002:a92:da43:0:b0:30e:f171:660f with SMTP id p3-20020a92da43000000b0030ef171660fmr11011884ilq.31.1674225855361; Fri, 20 Jan 2023 06:44:15 -0800 (PST) Received: from fedora.mshome.net ([104.184.156.161]) by smtp.gmail.com with ESMTPSA id p185-20020a0229c2000000b003a7c47efde0sm1513852jap.11.2023.01.20.06.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 06:44:14 -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 v3 2/3] fs/proc/array: Add Syscall User Dispatch to proc status Date: Fri, 20 Jan 2023 09:43:55 -0500 Message-Id: <20230120144356.40717-3-gregory.price@memverge.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120144356.40717-1-gregory.price@memverge.com> References: <20230120144356.40717-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 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 much 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..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.39.0