Message ID | 20230930050033.41174-22-wedsonaf@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp365744vqb; Sat, 30 Sep 2023 05:50:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9i4EWGVKyRLTP78LypM76Uj90LkqmHLYQZ1jK57iQNr5izF4eagPGDwUW/rrnAbYLND1O X-Received: by 2002:a17:90b:4c10:b0:269:851:4f00 with SMTP id na16-20020a17090b4c1000b0026908514f00mr5297749pjb.35.1696078236948; Sat, 30 Sep 2023 05:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696078236; cv=none; d=google.com; s=arc-20160816; b=Fqj4pjp071FjZ8D5Zj2wNWwgBqpOqVgA8/X0Jvx5RXnzb8CtTKdGCNPSgHjvs7K+h8 p7GC27VosJTC62cjQyMvsqbJjCpPLl1ubTNBcHBHdr/vL0Va2tNzKAXyPe/iSX94nurr 7kzXiI3OOd5RFattZSGoUdgNDz7LAeLZJR3eso24K53T173GfkZWL29tI3NQfoVZER1d SELyC18cS0VBUvwYRHsmynquTCG5/tX88acRTzMzpRdTlWj7+/x22yVV6cYqc7a8ML6D kZl4HBTo1TserHpVrJY2aF2d1BtU1Y9gLSUzNOZ1iVkQLIfdDLtWz1If18NWydEaDY3/ n1wg== 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=/UA+v7vVQRQxu5MLsOJ6RxWE6x/okoJ8LNf7oCvDbOY=; fh=o9ao+tpQoR2EJBfAPzmA6MlUItBaxiwiV3YDP3FS9jw=; b=oI7ZCRoc+tGMUOBXtHpzLP6gO4U/Yge1nY24S8pfK4rxbf5P7BaNSvUxPHSljtANj1 ukvzeduOBoHSc9nosaocC0CrcFkVL4/8pc+IoGQ/0yp1k1fCNFjE1E5vNqsJTTRyhbpc N4ZO4xN/IlOHTIMV6M5877DBlaBy19PC7XAJJQ9s2NgFHU9xIDcpEkCyLDxFRwdgSh4F /eFhgMijz/G6YHSs7lAI7/AhGHbYsblHaPlu4G94HFhDgImxeBoypk1bbp3mRUO5uZs0 17WbfSGer7DV8dZKbmaF5Pa2ITiYXxrPp5AHOSU780mFZuNKy9cJ5FMIQDJvJu1jFPD7 Crig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="J/Ur7VXN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 142-20020a630294000000b00578b6e32b5dsi22988953pgc.405.2023.09.30.05.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 05:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="J/Ur7VXN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 20EE882ABAA5; Fri, 29 Sep 2023 22:05:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231823AbjI3FDr (ORCPT <rfc822;pwkd43@gmail.com> + 19 others); Sat, 30 Sep 2023 01:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234211AbjI3FDD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 30 Sep 2023 01:03:03 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EE3F19B2; Fri, 29 Sep 2023 22:02:09 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1c5ff5f858dso87314455ad.2; Fri, 29 Sep 2023 22:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696050129; x=1696654929; darn=vger.kernel.org; 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=/UA+v7vVQRQxu5MLsOJ6RxWE6x/okoJ8LNf7oCvDbOY=; b=J/Ur7VXNDXSb5TMhCWT6V5Q7cX1BUXmsXlPMi4l/n3vGOR6xfm6p6t6fIGmsusncCP DRyCFL2fS4TvZecx3fDy4AjO4xuRArhrPpR7bmuELUAKaZa/nX/J6F+s/CoEjnGkf6mX Rwxb4i12JRG0Tn+/nP1ln+rxvGJU0KBeiZu7VDfxs+3WKRTmg+3/Q7GCOTvPSCLiJt0p u1K7p07n2GH6gTjzrXIVv/bXk3lli7dMDQHrxQ8giHTIq1oh+4cM45OKdaExrQgjD0wy r9LklzBAX6ivTX0xbAiHBrnotuk5Nstx7c3+Wzu5RuMoBHucpJzplVTyRuGQ+TelXKiZ yKtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696050129; x=1696654929; 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=/UA+v7vVQRQxu5MLsOJ6RxWE6x/okoJ8LNf7oCvDbOY=; b=uQYArvhS1MrOy6f0eMGnADQ7lEfhXoFr2bKr16E7/oEIDcSRISGBhWDnQznejEzNFx I4bU15W4tra08XKQExNHsiScPiwBg0zXmBu9biB09ycgylal67U2V+u7WpeF4fOoPs87 FYBxqSvD9tqLeK2eZEVdTDHMJIKB5Ec8/F8TQBz4MrvU1sGZcPPN4Qf/Q9IsyfRB2ibI TkP6Q7Bw6Vy++2Nv8WMvH84Bt0lUpar+iyjZvfigChebR2VyUKPJMeu+gD0o8NpJV6bV oU5zIWgLtgvKTOw5AKmoZsf5mzaoqsEt7JLhM3SVoDxtfty0t5y9gAl+MWUAXJX7ON7X gQuQ== X-Gm-Message-State: AOJu0Yyxf2jo1ktKr2dewpgLeZe/ZseYqLBHT+BGqCtS9bI6x76shQGk IrzSQMyaLQ1YQ7bSXY1VVZg= X-Received: by 2002:a17:903:230d:b0:1c0:98fe:3677 with SMTP id d13-20020a170903230d00b001c098fe3677mr6409717plh.56.1696050128820; Fri, 29 Sep 2023 22:02:08 -0700 (PDT) Received: from wedsonaf-dev.home.lan ([189.124.190.154]) by smtp.googlemail.com with ESMTPSA id y10-20020a17090322ca00b001c322a41188sm392136plg.117.2023.09.29.22.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 22:02:08 -0700 (PDT) From: Wedson Almeida Filho <wedsonaf@gmail.com> To: Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Wedson Almeida Filho <walmeida@microsoft.com>, Mike Marshall <hubcap@omnibond.com>, Martin Brandenburg <martin@omnibond.com>, devel@lists.orangefs.org Subject: [PATCH 21/29] orangefs: move orangefs_xattr_handlers to .rodata Date: Sat, 30 Sep 2023 02:00:25 -0300 Message-Id: <20230930050033.41174-22-wedsonaf@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230930050033.41174-1-wedsonaf@gmail.com> References: <20230930050033.41174-1-wedsonaf@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 29 Sep 2023 22:05:44 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778466933338839165 X-GMAIL-MSGID: 1778466933338839165 |
Series |
const xattr tables
|
|
Commit Message
Wedson Almeida Filho
Sept. 30, 2023, 5 a.m. UTC
From: Wedson Almeida Filho <walmeida@microsoft.com> This makes it harder for accidental or malicious changes to orangefs_xattr_handlers at runtime. Cc: Mike Marshall <hubcap@omnibond.com> Cc: Martin Brandenburg <martin@omnibond.com> Cc: devel@lists.orangefs.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> --- fs/orangefs/orangefs-kernel.h | 2 +- fs/orangefs/xattr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h index ce20d3443869..e211f29544e5 100644 --- a/fs/orangefs/orangefs-kernel.h +++ b/fs/orangefs/orangefs-kernel.h @@ -103,7 +103,7 @@ enum orangefs_vfs_op_states { #define ORANGEFS_CACHE_CREATE_FLAGS 0 #endif -extern const struct xattr_handler *orangefs_xattr_handlers[]; +extern const struct xattr_handler * const orangefs_xattr_handlers[]; extern struct posix_acl *orangefs_get_acl(struct inode *inode, int type, bool rcu); extern int orangefs_set_acl(struct mnt_idmap *idmap, diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c index 68b62689a63e..74ef75586f38 100644 --- a/fs/orangefs/xattr.c +++ b/fs/orangefs/xattr.c @@ -554,7 +554,7 @@ static const struct xattr_handler orangefs_xattr_default_handler = { .set = orangefs_xattr_set_default, }; -const struct xattr_handler *orangefs_xattr_handlers[] = { +const struct xattr_handler * const orangefs_xattr_handlers[] = { &orangefs_xattr_default_handler, NULL };