Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp300250lqc; Thu, 7 Mar 2024 19:17:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWSKR3ju1Hm3UUneneXeeYYq7xoxtlCwK0BC9RssIXnol+/quzKAmQjlr9LqLIVxJ19ugCD5GHDwD0Jw+b+f0Yta+hk5Jr5wkCvVyh4rg== X-Google-Smtp-Source: AGHT+IFCHy/LvdbkDipq9SHZSK24VJgQVeC66XkpN1jjS+OQ2zNsy3KSpjkOsVQoA6zn/uPl5tpO X-Received: by 2002:a17:902:8a97:b0:1dd:62c5:b6e2 with SMTP id p23-20020a1709028a9700b001dd62c5b6e2mr1757687plo.37.1709867855886; Thu, 07 Mar 2024 19:17:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709867855; cv=pass; d=google.com; s=arc-20160816; b=mMDtXnHqpV9tkDsF/KbnEf1192BIuJkRPXgmLn4Aa40ZmTV4bAQ0wevt1DOEfxrI7k Fzw4SM3zA+XpsrXICxyUJKRRCCspWeyoRQu//PPrE8CIQSYCOX7BzSslAgFGfrqUTFuB 6mdaM281Z2wO47CwglvFwOs7b3ZC8t+NkW/DpUXr1O7koC1P6w0Pk6sf6GvO/EMd2H6x 1D9GvMlYXu8QpmFFTJGpjPf53NaDJM/TjovUys6s//pH5GS6klLx3xUDv945x8RoRUgS MVbotwo1ZaKSlXfZY8ZOXvnTyIEQBklpraWjlBb7MLxHekO3yL/+cBtO8EuhU6+vz97X DLiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=5X7XzwizxZx+LYKAiz1/CufFLYi02GfrYmeirmHZ9r8=; fh=9AurZwFKLHkEvsa7TkS1XwKH47up2pqPSw5vs6lXvJo=; b=Au4J/ZouXAyTUdVqstp+lEL5sfQ6pO12GqsSX2SBga170ONNx13J3kdrI3CsYl9cBk fnyE1hbul98fAGeqqK1xhpjcYbVhpsOlYnnk6MSyB17d+l9WkOWxrW/q2yGLLONuv9zS t1Lre25v381o6UaZID7K+Hd43qzTy1Q2/MzMSvYGmbInr2aOqxIXE1I073VRwDCNRgqt 75S237uRvaDGlg0gb6TRlFgnQdaqCSBCAjwxV0lWPih30fQRBNtfD/yoBaK/S9mgpUs4 FzBRj0Odxr+jwHlNR6OIvwgEisfQ62iIIWKKuDGkl0G86PXkBZQpRy0Iu+7SniLSi2nA drNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=b+wCmuix; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-96471-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q4-20020a170902dac400b001dc4b04c51bsi14422472plx.295.2024.03.07.19.17.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 19:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96471-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=b+wCmuix; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-96471-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8F4D0282622 for ; Fri, 8 Mar 2024 03:17:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE9D42C194; Fri, 8 Mar 2024 03:17:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="b+wCmuix" Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B654D163; Fri, 8 Mar 2024 03:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709867848; cv=none; b=FLPaWGrR+KZyq/D5510D92ugkB/fnkCjP+3Nl7e9CaIM8cbQD8ijWUJWYuqmvq0x7iEWh0jKtCiyLPo1Ch1gY0lDUuisnEDowObqTgCyFSWlTZ2b4YHgZa+2SiCaGU1kfGHr3JxEUQlgcDWvG96SDRRtq4j3+xtpn8FEwcLuKts= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709867848; c=relaxed/simple; bh=HGv/S5b/PZMGYX/YuChf4dhdRWFdGEmMdjmn2fwerKA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=nTaEASchnBzBaTaTR3zj8sZfWQ/Kt61kt/og3PBRtSruOQq1YyNLRsy6smj6CnPkZZZ/wAEh9xmI1A7yXzKtVcGV+gYXtU420xhSp6Kzd/LVnueVP4+4i21IUM3ChyTEgBwMN5A+Llzgool/XRjBysWwlWz1Jg9HxYKrJh5pqc4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=b+wCmuix; arc=none smtp.client-ip=115.124.30.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1709867843; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=5X7XzwizxZx+LYKAiz1/CufFLYi02GfrYmeirmHZ9r8=; b=b+wCmuixHyPnOz1FPAKRdm/yY36cXnk6VZD2DlDQ3+B21HfHQ8V3/Rsv6SopmRIx7oob0BFL6MQ/h4quyZgRp4YiOPhEG9SEBDaNTAIBi12DBjJ3dUt2Xbv+JfL+I2sBlhpQOt3r3LBhFnOVz9Bg/l4ZyKy9LYAlTf3I0qOrN+8= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=xiangzao@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0W21N1Hi_1709867833; Received: from localhost.localdomain(mailfrom:xiangzao@linux.alibaba.com fp:SMTPD_---0W21N1Hi_1709867833) by smtp.aliyun-inc.com; Fri, 08 Mar 2024 11:17:22 +0800 From: Yuanhe Shu To: keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com, shuah@kernel.org, corbet@lwn.net Cc: xlpang@linux.alibaba.com, linux-kernel@vger.kernel.org, xiangzao@linux.alibaba.com, yixingrui@linux.alibaba.com, linux-doc@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v4 0/4] pstore: add multi-backend suuport Date: Fri, 8 Mar 2024 11:16:52 +0800 Message-Id: <20240308031656.9672-1-xiangzao@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is the 4th version of the patch set. In this patchset we aim to add pstore multi-backend support then user can register more than one pstore backend. Changes in v4: - Replace all rcu_read_lock with mutex - Move bif_oops_buf, max_compressed_size and pstore_dumper into pstore_info_list - add a helper to do "is this name in the list" and a helper to do "is this backend loaded" - make comments in pstore_(un)register clearer - return the max_seen ret or the first negative err in write_pmsg() - add a /sys/module entry for the list of backends, comma separated - Link to v3: https://lore.kernel.org/all/20230928024244.257687-1-xiangzao@linux.alibaba.com/ Changes in v3: - Fix ftrace.c build error - Link to v2: https://lore.kernel.org/all/20240205122852.7069-1-xiangzao@linux.alibaba.com/ Changes in v2: - pstore.backend no longer acts as "registered backend", but "backends eligible for registration". - drop subdir since it will break user space - drop tty frontend since I haven't yet devised a satisfactory implementation strategy - Link to v1: https://lore.kernel.org/all/20230928024244.257687-1-xiangzao@linux.alibaba.com/ Yuanhe Shu (4): pstore: add multi-backend support pstore: add a /sys/module entry for loaded backends Documentation: adjust pstore backend related document tools/testing: adjust pstore backend related selftest Documentation/ABI/testing/pstore | 8 +- .../admin-guide/kernel-parameters.txt | 4 +- fs/pstore/ftrace.c | 27 +- fs/pstore/inode.c | 57 +++- fs/pstore/internal.h | 5 +- fs/pstore/platform.c | 274 ++++++++++++------ fs/pstore/pmsg.c | 27 +- include/linux/pstore.h | 23 ++ tools/testing/selftests/pstore/common_tests | 8 +- .../selftests/pstore/pstore_post_reboot_tests | 67 +++-- tools/testing/selftests/pstore/pstore_tests | 2 +- 11 files changed, 358 insertions(+), 144 deletions(-) -- 2.39.3