Message ID | 20230930050033.41174-29-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 in14csp201200vqb; Fri, 29 Sep 2023 22:06:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLoREzM7/0MKkqD8Fau6BmyO+t4usz+NynXm3YJcForS4ssMTlqqvLolrMm6KmvgQ1ZPRA X-Received: by 2002:a05:6870:b290:b0:1bb:6cca:3468 with SMTP id c16-20020a056870b29000b001bb6cca3468mr7082345oao.47.1696050366374; Fri, 29 Sep 2023 22:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696050366; cv=none; d=google.com; s=arc-20160816; b=RWdtwF1Z58EqXqZ/h8DXJKW+VSx6BEXiZl9bWQh2B8QG6c+GNTPwkTLEExSDM/6VJJ SAY+7UwdFP8Z4gSQyM9QOTbzSoC3sHUvJRbzLJ1pSgglzXW/aQwOxsi7lNwQf6MO12p6 yItsj/WiDpPg7nrws69f0/a8xsjlLO9fYmEyQrh6ReVJNfQEnRs0Ob+OFOXZvTUKRFz1 uyoUZLdpohS69sCjZ6pAXmr2wDA+nRLz/rfmd26SpvqvEyU8i/u/faXx1hMPTIb0CYsr IYhD4jRrj36e3SeP3MplVGZVt4ljLhWvyVpyV1Wo9aHTIzwwJHUSG7k6uMY6G4SESRc5 sF9w== 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=iNgBYnm3H81CL2AuZdWmOPe+pdl1B3VjJnIrmYnD2KM=; fh=1R4fGg4hjrcHzuT3UNLK44bV0c9j+tw4negsJr3ySh8=; b=SHh5hhoauxIUP8Wc+oIwPuzuuwLEY3GARCJ/6B6w1s/AKoFknRmNkYqVC3YU80gxOE dkFunJrgYEFug8vGdxjKIz47uK0NHbUZbrLR1ErdooM7zcZMsJwLGNibtoGdTPV18+BL jbUi3hH3oWzcYHO1yUwdBN/yiIFOYmqEf/qMxFDMMGQ+p4CajJxq+t7c974KnKoqccNY zgfwcp8hOvmzO6Bq26BeFNIH6e11gh705j801nJPArT0TXuVl3jVObMgSImqc3/Rr0MU FzFVNnHIS8dHDAywuXFRFMcNoTImE9zXGq2Pw/cZNSeK0r5E2ytb2UgarlmzqLZwvn9c N7Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZjSIypxR; 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 e21-20020a656895000000b0056da0ae25a0si21727747pgt.441.2023.09.29.22.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 22:06:06 -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=ZjSIypxR; 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 82592828D074; Fri, 29 Sep 2023 22:05:23 -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 S234287AbjI3FEf (ORCPT <rfc822;pwkd43@gmail.com> + 19 others); Sat, 30 Sep 2023 01:04:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234008AbjI3FDx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 30 Sep 2023 01:03:53 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 088B71FD0; Fri, 29 Sep 2023 22:02:33 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5789ffc8ae0so10231870a12.0; Fri, 29 Sep 2023 22:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696050152; x=1696654952; 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=iNgBYnm3H81CL2AuZdWmOPe+pdl1B3VjJnIrmYnD2KM=; b=ZjSIypxRE2W8y2ExF38WwCcprBmHUjWY845bSU6xuICaiZKMN6fjwxqIvxGX+EnUn0 tZM884r2KmCnahZZszQpwvsLMIwFrgRIFnLK2ccBIQ7NgWCMZpX6Th6aR+on0aikpcnC 1nLBLPcbVzhH9c3yB73EX9PBYyefZCATsExTqW7lYD0OsiJDs3alDykVg4KOA2MgTFcM NS6E9JRYsUPGuotNtVRxZKLuvRpEuqduNsL5mN/VApu0xI7p5ONZNGO3ADZIq6ne5bfH +EDIZv1RhNJoNWEPnu0hLDeeQb/593bcsHSTj4ZYlOHcI4+R11nQXUnML+tWG6YpEQaI Qb8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696050152; x=1696654952; 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=iNgBYnm3H81CL2AuZdWmOPe+pdl1B3VjJnIrmYnD2KM=; b=ImxdMpqKQGop5/ARYaP/UCrqNFbFhaj7D8enNvtYz0OrVX4CFf80hmkW6ypWlufqDG SBUfBlOvRiH+mf0BFgOWPfSXcboXo+bKX5o4WFkxK/rRBYIhN0jmVAWH1/PluGeh2OeA uzIj5dIpqrNiwxMwiAXFC/A1NYkp2+KM+sMGit+bA29/Fq6ceiMOysbULPTGmUY79x1M oZzuVzcCYMQqP5NesC/yQvI0/aSKPu5j6crD/0gVNuzRP0wDziFhTJ6Z/mQ7uWn9VHIN Z8mTCMK94TM6yoKQcLzueWwFMoqnF1GkFzeuZwAavWXnoIerDsXZjwC7wrmI8ZqAqtxX Dwmg== X-Gm-Message-State: AOJu0Yzc+w2Fd8rD2SJsCkWdg3EnS9d019zrfNctLBmlsePXkHzXhfQg 9ltcfR7zs8s7rjC3xob/V8AQHwfxHV00Cw== X-Received: by 2002:a17:902:e80d:b0:1c5:efd1:82b6 with SMTP id u13-20020a170902e80d00b001c5efd182b6mr6762435plg.30.1696050152408; Fri, 29 Sep 2023 22:02:32 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 22:02:32 -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>, Hugh Dickins <hughd@google.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org Subject: [PATCH 28/29] shmem: move shmem_xattr_handlers to .rodata Date: Sat, 30 Sep 2023 02:00:32 -0300 Message-Id: <20230930050033.41174-29-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:05:24 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778437708815701326 X-GMAIL-MSGID: 1778437708815701326 |
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 shmem_xattr_handlers at runtime. Cc: Hugh Dickins <hughd@google.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/shmem.c b/mm/shmem.c index d963c747dabc..683c84d667c1 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3487,7 +3487,7 @@ static const struct xattr_handler shmem_trusted_xattr_handler = { .set = shmem_xattr_handler_set, }; -static const struct xattr_handler *shmem_xattr_handlers[] = { +static const struct xattr_handler * const shmem_xattr_handlers[] = { &shmem_security_xattr_handler, &shmem_trusted_xattr_handler, NULL