Message ID | 20230930050033.41174-14-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 in14csp416605vqb; Sat, 30 Sep 2023 07:30:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkIwfFgdwXzbEisydRPR/pPs8CC1Yb0DNa1q/j+hJn5irF6nfokf6FdoUIllF9W3f5SCU+ X-Received: by 2002:a17:90a:fb83:b0:277:7b0a:76d8 with SMTP id cp3-20020a17090afb8300b002777b0a76d8mr6594144pjb.30.1696084215260; Sat, 30 Sep 2023 07:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696084215; cv=none; d=google.com; s=arc-20160816; b=DYLec5uT14VkXFglqnxyPbj7O20ejrx4uomegRfJtAyMjqrMSzQr5bpLaYWd+K2HCy a1+ANIPyzX+DjnwtPR9Kp0+3AnNGRofYU+vG9tvxkPISxyaUjjgAfXNmv4sOdMHCKHLF ul0NQ8pQBy/aTQVc7H6x/0G7H6kumV7stYlJ5Rzc1UyExLZnVfGA6lbVBHtf4/44EZq7 TltIltNym5BGhOw3ewcvkUV5UnEpyFUGEk5I3SLJuqb7oa66Pmk8dEYXbqxpBOm4iBQi 0k2oxLyKEUIKCyvIRSR7dGt5uhiTOf7rXcG8n5os3bs1iHncxtIF/7ii4Ni5vrIdXlNa AuMA== 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=b5KC1lIhnxi9Th80hMfT8J4dZJX49vz6ed13a2jWNxs=; fh=SK2xQ5WvE6tbwSQN9TMkRjbkm0hotbQhx6y1kSOUb0Q=; b=JVD8uVWvrKaBVv+Jtlc+nfFX7sxTdIavfT4Cz2V3zg6cmAtuqkiwoHE8A0cQJoAgYC pP6LIS+ixsy5qw0jlrKBow54ktGs9z+pa2Kkr94NEchJ0sUqGODKkM7dUrsoV2O5xzjl M3luFaqMfytJM0N9gGhZKIK8NEB7ml1ef5O7GcalLt9d0htA5e92hvPo4usM7NCBBtH6 Yca5CrrOgcUEcaPuAuOqSIgsBTHGAr5w30h2Olu2tmRjmH1I6ktD5GvK7QDxLSr4EInZ irjz7dp0S6Vc7Gdrx2P/PntzaoAyGLViRIFFBGokkMR+d4uocBx4eJjt977rNyZLURQ8 nq+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="W/Mx/brX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id na10-20020a17090b4c0a00b0026b49c1aa50si4143207pjb.111.2023.09.30.07.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 07:30:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="W/Mx/brX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 79A3F81D55FA; Fri, 29 Sep 2023 22:03:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234094AbjI3FCp (ORCPT <rfc822;pwkd43@gmail.com> + 19 others); Sat, 30 Sep 2023 01:02:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234090AbjI3FBw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 30 Sep 2023 01:01:52 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B999CDA; Fri, 29 Sep 2023 22:01:41 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1c3cbfa40d6so133402195ad.1; Fri, 29 Sep 2023 22:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696050100; x=1696654900; 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=b5KC1lIhnxi9Th80hMfT8J4dZJX49vz6ed13a2jWNxs=; b=W/Mx/brX96BBz3iv5W8RnOve62gxCGsJFCMkxVZIBCcF+8s8mwnw9Fzw4dQj3Z+6a8 /P38+yDY5FyN2bsB+W801qr7Cc0r10DkTGb8SgaO3E+66gcDDGuh2tj16kMqeBYIbm1+ cqk26NCOVq/QiqbMxqQW13Xdwi2gEmDgGywQJiNM4M6C365yP1hbk0ASC01V6NCuQrRb HqhrQuzl2CIs9wEr5vqxJAiXFwONh69tCFIJskEzy3/fjUON71C1MzGUEN+1YfQKPoz4 1Q1vjP8YuL6OGpJ4g8xUup//KmljEwwbQ4YW5dFZztfODFJOo+ddXx4t0XMfCqkKwTKn D2Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696050100; x=1696654900; 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=b5KC1lIhnxi9Th80hMfT8J4dZJX49vz6ed13a2jWNxs=; b=dH6JRzOPVT6pgYYBI9p728CI0pV2VCWAF5uRtJAgVKlzqoxls5etg0+qquLx9kSrZC wyquDzR+zYV+4ZkTfpv6yG3nYyXPxFsFpfiuZbviqne2RawMCsDwpxrVmM3/slvXb113 Zkt3E3uBeuUcOQPDkJs8W31POBhzqPmELpucVpKtvJoLljuKi5gy4VIxCHOcow5yQcrw A8iHTXIV5areoPmCajz1MksRHNb+HZT1MqFDhZj6318UJzDcWlqrCwthU6R6wMchHrVk axVOFI27Ptc/LXTvgnznIOZi9gukllgIoOUpKLJARb5vJxfUQ/thJ0TodoAbvxObTkIv NKGw== X-Gm-Message-State: AOJu0YxigxQdTSezfUFSus6ldF/EQeLLM7AypiIot+hgGjd4E7g2AV10 VzzOY6jBTWhz89hB/zVSxmQ= X-Received: by 2002:a17:903:2348:b0:1c7:2661:91e1 with SMTP id c8-20020a170903234800b001c7266191e1mr7489101plh.15.1696050100397; Fri, 29 Sep 2023 22:01:40 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 22:01:40 -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> Subject: [PATCH 13/29] hfs: move hfs_xattr_handlers to .rodata Date: Sat, 30 Sep 2023 02:00:17 -0300 Message-Id: <20230930050033.41174-14-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 pete.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 (pete.vger.email [0.0.0.0]); Fri, 29 Sep 2023 22:03:34 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778473202042308425 X-GMAIL-MSGID: 1778473202042308425 |
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 hfs_xattr_handlers at runtime. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> --- fs/hfs/attr.c | 2 +- fs/hfs/hfs_fs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/hfs/attr.c b/fs/hfs/attr.c index 6341bb248247..f8395cdd1adf 100644 --- a/fs/hfs/attr.c +++ b/fs/hfs/attr.c @@ -146,7 +146,7 @@ static const struct xattr_handler hfs_type_handler = { .set = hfs_xattr_set, }; -const struct xattr_handler *hfs_xattr_handlers[] = { +const struct xattr_handler * const hfs_xattr_handlers[] = { &hfs_creator_handler, &hfs_type_handler, NULL diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index 49d02524e667..b5a6ad5df357 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h @@ -215,7 +215,7 @@ extern void hfs_evict_inode(struct inode *); extern void hfs_delete_inode(struct inode *); /* attr.c */ -extern const struct xattr_handler *hfs_xattr_handlers[]; +extern const struct xattr_handler * const hfs_xattr_handlers[]; /* mdb.c */ extern int hfs_mdb_get(struct super_block *);