Message ID | 20230930050033.41174-8-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 in14csp424372vqb; Sat, 30 Sep 2023 07:46:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6878WWpVAnexYjumg5LIlExHyaQwIFdBNHKo429D79BiGkOdgMhaqwVaGermwsZpwYJF7 X-Received: by 2002:a05:6a20:3d87:b0:161:a795:2322 with SMTP id s7-20020a056a203d8700b00161a7952322mr8386239pzi.18.1696085177545; Sat, 30 Sep 2023 07:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696085177; cv=none; d=google.com; s=arc-20160816; b=j+XzsN6llKepGs+b17uVwBRMnVLa1jBHDwqHNUkKZj3svolVdem/QcEXRjo2ywrfjq +hLgMSPzpyzue4aYR1S+C1N5SCS8T9rbI9LA89g6emQt4z6StUmRfxnT9efILyBqnWP0 8/x9HQfH+4Mp404CamA37Zr5hCqcELW5ZIkpCWfMDT1Srj/fqTf92M0OPgnapDak8C7S ZlATmPOaaS9HF6C997nuSuioqA3C4rArRhrOSUiTRK0JlA5NnKqzmHTumUz1fvnObqZj pklYQV+7A6okxeJX6z9oCqYG0SzHgy07vVtQ/Wn4MxnwBDRjXQQY55MV+L5UM8Q3eNjt eD6w== 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=Cc7EZI0QTgBVujG8JfkUP0DGPINpthmbr1tCtQXff5c=; fh=vXxELTddpcrZm8PW6QI1xfB0RMJZyV877vBe68wFE7c=; b=q+ZP+YsGpFDB2HBR71v9DNIsdF0yH9p92m6Z8Dv/xE9k3jI4Ow5SDk3AaRdKgynP7Q IqDYFpWIvrjBvjr2ndY3gy7NbnMdTiuiJIxsF1UZn7kIZKQYJn+W68gAJgYUuh0MKamq 6YXJfmMj2aj/TqnrGrAK49ddCr2U6/T6C/C/3o52BrxxPhOksAIwrLParFyX7X6oOxVS D6LCAYYM9cLf+Fpfettr1KLSexhmTmD7fN0dypOlaAdLHvg26UEV/Gk/k4FFyphBOWIY W6mdPVKH84xkRRgWupUErNTghJ77OFXaX9F8u4G2tQ7e1/o2jtg1TSmzq6MjoIGjVwJw E1Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ag/RLoUD"; 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id na10-20020a17090b4c0a00b0026b49c1aa50si4171631pjb.111.2023.09.30.07.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 07:46:17 -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="ag/RLoUD"; 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 BCFB98367201; Fri, 29 Sep 2023 22:02:18 -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 S234174AbjI3FBx (ORCPT <rfc822;pwkd43@gmail.com> + 19 others); Sat, 30 Sep 2023 01:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234046AbjI3FBn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 30 Sep 2023 01:01:43 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9802310E5; Fri, 29 Sep 2023 22:01:22 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1c1ff5b741cso134162965ad.2; Fri, 29 Sep 2023 22:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696050081; x=1696654881; 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=Cc7EZI0QTgBVujG8JfkUP0DGPINpthmbr1tCtQXff5c=; b=ag/RLoUDLaiw5u/Lqe1u/h247avxIsqNkzwSKhP1E6bmFzaiYP9QNEIrgAwzxCsrzE NlZP1rwmrvPhd9GAPKCeaJvJMKErBy9IAWfOHpsj60o0U2rtO+aN3JVZIKoJdr+Xch53 ds9iYTO5q+ab2vwqoHDIbI2XkPWgUosu58q8w7AP8JA5PZqpz7C07O2nQwkcNTufEcEi nfRLYIX2BCqsAzOM2IvrHWzsXRfxAgQ9e3q96rZaAdkuKDYbvfuWk3jK6/wnr5nuY4J7 iNE/ab0mJ30/9jVIL/zkfIse5BjobJ0lM5e0abpAiSLskZYbZUYmu845vPRenxcHkT5f OFFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696050081; x=1696654881; 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=Cc7EZI0QTgBVujG8JfkUP0DGPINpthmbr1tCtQXff5c=; b=ipu6kMqemGxiiuEPv5JI4BjcGACxdGy+iL0q++UzJoGzcrCcTue8NF5nBGdsmqGuwj cDWnWIgjLxfmmXPkcB0ETfawKnFnbyWHvcT/C3c39cyhvWFc2tmPDaB/06WoZqJgq4oM LYQ0Jg+2UpaxDRqKIXYdS8FvefMJnCsQ9HeHPuNoQFtB+7104d7zwUnq491Rv7aH+g4/ mu9dqv0fFK6Wwn6phosTFWWyCk9Z6dG2/iIT+nq/lk8IhJZmb23aXrWGw6qasm1Dvezb baTZ24W7E4lnIoinLdC5HCUocKiIcB2PrbRlV4BQLsQCkKhH82TfKu11jJ6JTKQ5G2PC F8kA== X-Gm-Message-State: AOJu0YwXe4Pc+I3lX6B/cs9PqanogiUfT0drsApSLnEMIbWSfSNOZebk b4k1zzpvI2f7iAT5sDixk2+6SiuE/mRK6w== X-Received: by 2002:a17:903:1247:b0:1c4:3cd5:4298 with SMTP id u7-20020a170903124700b001c43cd54298mr7127633plh.18.1696050081179; Fri, 29 Sep 2023 22:01:21 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 22:01:20 -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>, Tyler Hicks <code@tyhicks.com>, ecryptfs@vger.kernel.org Subject: [PATCH 07/29] ecryptfs: move ecryptfs_xattr_handlers to .rodata Date: Sat, 30 Sep 2023 02:00:11 -0300 Message-Id: <20230930050033.41174-8-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: <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 (groat.vger.email [0.0.0.0]); Fri, 29 Sep 2023 22:02:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778474210941172905 X-GMAIL-MSGID: 1778474210941172905 |
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 ecryptfs_xattr_handlers at runtime. Cc: Tyler Hicks <code@tyhicks.com> Cc: ecryptfs@vger.kernel.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> --- fs/ecryptfs/ecryptfs_kernel.h | 2 +- fs/ecryptfs/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index f2ed0c0266cb..c586c5db18b5 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h @@ -702,6 +702,6 @@ int ecryptfs_set_f_namelen(long *namelen, long lower_namelen, int ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat, loff_t offset); -extern const struct xattr_handler *ecryptfs_xattr_handlers[]; +extern const struct xattr_handler * const ecryptfs_xattr_handlers[]; #endif /* #ifndef ECRYPTFS_KERNEL_H */ diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 83274915ba6d..18fcec208d9d 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -1209,7 +1209,7 @@ static const struct xattr_handler ecryptfs_xattr_handler = { .set = ecryptfs_xattr_set, }; -const struct xattr_handler *ecryptfs_xattr_handlers[] = { +const struct xattr_handler * const ecryptfs_xattr_handlers[] = { &ecryptfs_xattr_handler, NULL };