Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp284611rdb; Sat, 30 Sep 2023 04:41:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/sb5MUA1Lj5earXXpjcWhjA/2SsbZMh4kedDpBQDGt5qwL4ikgT4g/ghGdpol4G1iSHno X-Received: by 2002:a05:6870:1707:b0:1d4:fe03:73e with SMTP id h7-20020a056870170700b001d4fe03073emr7854229oae.52.1696074100472; Sat, 30 Sep 2023 04:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696074100; cv=none; d=google.com; s=arc-20160816; b=wHNB1o7bLKExTPzQdTiJj53Qcc4Z/KbmRKjUnDdmHucRYPYcq7NcbYNEytvBcQlw5h A0e+tDEbkQ+jC8As/4AW9qKhwZP+CZ75azK9PV4VBmvw+9s48T5KJEE11GknfvVMzY7G Qm81DX76dXzJWdOqJkUrEdM6ZQ5UQi4Ri0rMtAbkX/RBzUEtBJw7S+MQeXo7IpOpFlu6 fkUYpG7QK47/r6orcA22XU8pwAXH22NKqtyDXCCkckO1GVQ6icHt3BagH3tlXYShlo9z 1AdGsczMgsEEEoSRETB2e7CPVuSqU2b7AXyD5qbUdOIye7uhXhDJRVDEzPuNozF4XRww W2mQ== 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=GwKeB2GcV8X8HT4SX1MXoeR5H7ol3LfqqF5Xgl3DCSk=; fh=b5sWXaoLZk8H0GNvsiXJqaP+wylgwwXKHKMnG4XlhuE=; b=zmnQUtRJpDcXW+qX2uJkBrvGUiwzjk0FVFB3Pd1S6WuOny+y5f14N5Sl+kJ2iQlSnd e7qNIfk86qfIxQ3eR779PdfDSaXmf40BY6KTA5vyPIutUvhN5r+5zPll0iTaUCf2Uriw 1AKjCl2yT0z7smzkcQ09MJQSwxNFNQVZKr6KteVwg9BNkjrgqSyIquNFI06PqLK4OWuR 80pvFJwY3TlPkvagG1up4jg7uTFQMWyJy4SviBQmsCLul+xRD8uleVXGxInHAq+3qL6N M01jYQAwe/0B4iNXIrATdsitcTIHxvcTQDrgx8lTkMBkonSaYgrDYe5HG6XWJNYOh0K/ M/iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L7afGCid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id m124-20020a633f82000000b005774635c69dsi22960613pga.66.2023.09.30.04.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 04:41:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L7afGCid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 614ED8373A02; Fri, 29 Sep 2023 22:03:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234148AbjI3FCe (ORCPT + 99 others); Sat, 30 Sep 2023 01:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234142AbjI3FBu (ORCPT ); Sat, 30 Sep 2023 01:01:50 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B19A91B9; Fri, 29 Sep 2023 22:01:36 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-5859d13f73dso1084558a12.1; Fri, 29 Sep 2023 22:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696050096; x=1696654896; 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=GwKeB2GcV8X8HT4SX1MXoeR5H7ol3LfqqF5Xgl3DCSk=; b=L7afGCidyMkbrsdDhyIwgZMneQ2xkh5v/HjCcVhs7WfvhegSN0iZ7ObGm7Yd6JtVyh gJmuFBS9SmvwpgoOWyZkkMYJU5jzfuU+pDD+UgwX6FLlioRBYHphCI/8TtsyouvgDneA ZrSqF6zREYD7mMg4WgrbkP+Vn7tRAzLtDZcxXZfp85uqA0Vx4u8k4pb85btNSkYw4DSh eA359rKPGLLSt9d4TyCJQuLNYRhbnugWtY2T+bzr17bQHjV7DIbxOiii7VVHo2FIKeOr diX8S//jz4WM/CX/y66u0CJ5WMxY7MbkO2zLAzH4zAqJGSNt2Ta6WIeB5cZXRQMbQ5xA jAWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696050096; x=1696654896; 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=GwKeB2GcV8X8HT4SX1MXoeR5H7ol3LfqqF5Xgl3DCSk=; b=YhFMRV73kwDTgt5vGdi06u6Kix5CRSQ3NFy8WaKm9Cr3jJ7+U/oTJ/GpEBOIk/3KQX 4F0XGObGbbZeonmrCjnO7dnqngyibBhcfauOBxylQ4YgfbNE7L+yOaApuTgUbrLmeQnN xe+35f8ytFYF5nX+J1/3XGscDkhTDyKNKUvs79w50iii17Rnu5m3mMAGH9RCrmmXhBi8 OLJynVckz8DlCSlRGt1zxsUtoVZt27KA1z3RMwQcIiyJpm06NGTIGY5ED5BXD9+4W3Hb Ftdr0F4o6zjQqgq+52oFWoFIOwdn1sBr8bscU1y/kWfdVlQY1z665gewHFsSdeb9Vko9 U5vw== X-Gm-Message-State: AOJu0YxQBN+erSeY+LGl0mkqOCC28xiDA0D6N597eVh1ABReUqMxnxiA Q7vVdXAVyUhHFwtxC0BIFpE= X-Received: by 2002:a17:903:456:b0:1c3:1c74:5d0a with SMTP id iw22-20020a170903045600b001c31c745d0amr5368060plb.34.1696050096054; Fri, 29 Sep 2023 22:01:36 -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.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 22:01:35 -0700 (PDT) From: Wedson Almeida Filho To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Wedson Almeida Filho , Bob Peterson , Andreas Gruenbacher , cluster-devel@redhat.com Subject: [PATCH 12/29] gfs2: move gfs2_xattr_handlers_max to .rodata Date: Sat, 30 Sep 2023 02:00:16 -0300 Message-Id: <20230930050033.41174-13-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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 29 Sep 2023 22:03:06 -0700 (PDT) From: Wedson Almeida Filho This makes it harder for accidental or malicious changes to gfs2_xattr_handlers_max at runtime. Cc: Bob Peterson Cc: Andreas Gruenbacher Cc: cluster-devel@redhat.com Signed-off-by: Wedson Almeida Filho --- fs/gfs2/super.h | 4 ++-- fs/gfs2/xattr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h index bba58629bc45..3555dc69183a 100644 --- a/fs/gfs2/super.h +++ b/fs/gfs2/super.h @@ -59,8 +59,8 @@ extern const struct export_operations gfs2_export_ops; extern const struct super_operations gfs2_super_ops; extern const struct dentry_operations gfs2_dops; -extern const struct xattr_handler *gfs2_xattr_handlers_max[]; -extern const struct xattr_handler **gfs2_xattr_handlers_min; +extern const struct xattr_handler * const gfs2_xattr_handlers_max[]; +extern const struct xattr_handler * const *gfs2_xattr_handlers_min; #endif /* __SUPER_DOT_H__ */ diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c index 93b36d026bb4..146c32d44bd1 100644 --- a/fs/gfs2/xattr.c +++ b/fs/gfs2/xattr.c @@ -1494,7 +1494,7 @@ static const struct xattr_handler gfs2_xattr_trusted_handler = { .set = gfs2_xattr_set, }; -const struct xattr_handler *gfs2_xattr_handlers_max[] = { +const struct xattr_handler * const gfs2_xattr_handlers_max[] = { /* GFS2_FS_FORMAT_MAX */ &gfs2_xattr_trusted_handler, @@ -1504,4 +1504,4 @@ const struct xattr_handler *gfs2_xattr_handlers_max[] = { NULL, }; -const struct xattr_handler **gfs2_xattr_handlers_min = gfs2_xattr_handlers_max + 1; +const struct xattr_handler * const *gfs2_xattr_handlers_min = gfs2_xattr_handlers_max + 1; -- 2.34.1