linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Alexey Gladkov <legion@kernel.org>,
	kernel test robot <oliver.sang@intel.com>,
	"Eric W . Biederman" <ebiederm@xmission.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH AUTOSEL 5.10 02/70] Add a reference to ucounts for each cred
Date: Sun,  4 Jul 2021 19:06:55 -0400	[thread overview]
Message-ID: <20210704230804.1490078-2-sashal@kernel.org> (raw)
In-Reply-To: <20210704230804.1490078-1-sashal@kernel.org>

From: Alexey Gladkov <legion@kernel.org>

[ Upstream commit 905ae01c4ae2ae3df05bb141801b1db4b7d83c61 ]

For RLIMIT_NPROC and some other rlimits the user_struct that holds the
global limit is kept alive for the lifetime of a process by keeping it
in struct cred. Adding a pointer to ucounts in the struct cred will
allow to track RLIMIT_NPROC not only for user in the system, but for
user in the user_namespace.

Updating ucounts may require memory allocation which may fail. So, we
cannot change cred.ucounts in the commit_creds() because this function
cannot fail and it should always return 0. For this reason, we modify
cred.ucounts before calling the commit_creds().

Changelog

v6:
* Fix null-ptr-deref in is_ucounts_overlimit() detected by trinity. This
  error was caused by the fact that cred_alloc_blank() left the ucounts
  pointer empty.

Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Alexey Gladkov <legion@kernel.org>
Link: https://lkml.kernel.org/r/b37aaef28d8b9b0d757e07ba6dd27281bbe39259.1619094428.git.legion@kernel.org
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/exec.c                      |  4 ++++
 include/linux/cred.h           |  2 ++
 include/linux/user_namespace.h |  4 ++++
 kernel/cred.c                  | 40 ++++++++++++++++++++++++++++++++++
 kernel/fork.c                  |  6 +++++
 kernel/sys.c                   | 12 ++++++++++
 kernel/ucount.c                | 40 +++++++++++++++++++++++++++++++---
 kernel/user_namespace.c        |  3 +++
 8 files changed, 108 insertions(+), 3 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index ca89e0e3ef10..c7a4ef8df305 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1347,6 +1347,10 @@ int begin_new_exec(struct linux_binprm * bprm)
 	WRITE_ONCE(me->self_exec_id, me->self_exec_id + 1);
 	flush_signal_handlers(me, 0);
 
+	retval = set_cred_ucounts(bprm->cred);
+	if (retval < 0)
+		goto out_unlock;
+
 	/*
 	 * install the new credentials for this executable
 	 */
diff --git a/include/linux/cred.h b/include/linux/cred.h
index 18639c069263..ad160e5fe5c6 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -144,6 +144,7 @@ struct cred {
 #endif
 	struct user_struct *user;	/* real user ID subscription */
 	struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */
+	struct ucounts *ucounts;
 	struct group_info *group_info;	/* supplementary groups for euid/fsgid */
 	/* RCU deletion */
 	union {
@@ -170,6 +171,7 @@ extern int set_security_override_from_ctx(struct cred *, const char *);
 extern int set_create_files_as(struct cred *, struct inode *);
 extern int cred_fscmp(const struct cred *, const struct cred *);
 extern void __init cred_init(void);
+extern int set_cred_ucounts(struct cred *);
 
 /*
  * check for validity of credentials
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 7616c7bf4b24..e1bd560da1cd 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -101,11 +101,15 @@ struct ucounts {
 };
 
 extern struct user_namespace init_user_ns;
+extern struct ucounts init_ucounts;
 
 bool setup_userns_sysctls(struct user_namespace *ns);
 void retire_userns_sysctls(struct user_namespace *ns);
 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
 void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
+struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
+struct ucounts *get_ucounts(struct ucounts *ucounts);
+void put_ucounts(struct ucounts *ucounts);
 
 #ifdef CONFIG_USER_NS
 
diff --git a/kernel/cred.c b/kernel/cred.c
index 421b1149c651..58a8a9e24347 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -60,6 +60,7 @@ struct cred init_cred = {
 	.user			= INIT_USER,
 	.user_ns		= &init_user_ns,
 	.group_info		= &init_groups,
+	.ucounts		= &init_ucounts,
 };
 
 static inline void set_cred_subscribers(struct cred *cred, int n)
@@ -119,6 +120,8 @@ static void put_cred_rcu(struct rcu_head *rcu)
 	if (cred->group_info)
 		put_group_info(cred->group_info);
 	free_uid(cred->user);
+	if (cred->ucounts)
+		put_ucounts(cred->ucounts);
 	put_user_ns(cred->user_ns);
 	kmem_cache_free(cred_jar, cred);
 }
@@ -222,6 +225,7 @@ struct cred *cred_alloc_blank(void)
 #ifdef CONFIG_DEBUG_CREDENTIALS
 	new->magic = CRED_MAGIC;
 #endif
+	new->ucounts = get_ucounts(&init_ucounts);
 
 	if (security_cred_alloc_blank(new, GFP_KERNEL_ACCOUNT) < 0)
 		goto error;
@@ -284,6 +288,11 @@ struct cred *prepare_creds(void)
 
 	if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0)
 		goto error;
+
+	new->ucounts = get_ucounts(new->ucounts);
+	if (!new->ucounts)
+		goto error;
+
 	validate_creds(new);
 	return new;
 
@@ -363,6 +372,8 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
 		ret = create_user_ns(new);
 		if (ret < 0)
 			goto error_put;
+		if (set_cred_ucounts(new) < 0)
+			goto error_put;
 	}
 
 #ifdef CONFIG_KEYS
@@ -653,6 +664,31 @@ int cred_fscmp(const struct cred *a, const struct cred *b)
 }
 EXPORT_SYMBOL(cred_fscmp);
 
+int set_cred_ucounts(struct cred *new)
+{
+	struct task_struct *task = current;
+	const struct cred *old = task->real_cred;
+	struct ucounts *old_ucounts = new->ucounts;
+
+	if (new->user == old->user && new->user_ns == old->user_ns)
+		return 0;
+
+	/*
+	 * This optimization is needed because alloc_ucounts() uses locks
+	 * for table lookups.
+	 */
+	if (old_ucounts && old_ucounts->ns == new->user_ns && uid_eq(old_ucounts->uid, new->euid))
+		return 0;
+
+	if (!(new->ucounts = alloc_ucounts(new->user_ns, new->euid)))
+		return -EAGAIN;
+
+	if (old_ucounts)
+		put_ucounts(old_ucounts);
+
+	return 0;
+}
+
 /*
  * initialise the credentials stuff
  */
@@ -719,6 +755,10 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
 	if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0)
 		goto error;
 
+	new->ucounts = get_ucounts(new->ucounts);
+	if (!new->ucounts)
+		goto error;
+
 	put_cred(old);
 	validate_creds(new);
 	return new;
diff --git a/kernel/fork.c b/kernel/fork.c
index 7c044d377926..281addb694df 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2960,6 +2960,12 @@ int ksys_unshare(unsigned long unshare_flags)
 	if (err)
 		goto bad_unshare_cleanup_cred;
 
+	if (new_cred) {
+		err = set_cred_ucounts(new_cred);
+		if (err)
+			goto bad_unshare_cleanup_cred;
+	}
+
 	if (new_fs || new_fd || do_sysvsem || new_cred || new_nsproxy) {
 		if (do_sysvsem) {
 			/*
diff --git a/kernel/sys.c b/kernel/sys.c
index a730c03ee607..0670e824e019 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -552,6 +552,10 @@ long __sys_setreuid(uid_t ruid, uid_t euid)
 	if (retval < 0)
 		goto error;
 
+	retval = set_cred_ucounts(new);
+	if (retval < 0)
+		goto error;
+
 	return commit_creds(new);
 
 error:
@@ -610,6 +614,10 @@ long __sys_setuid(uid_t uid)
 	if (retval < 0)
 		goto error;
 
+	retval = set_cred_ucounts(new);
+	if (retval < 0)
+		goto error;
+
 	return commit_creds(new);
 
 error:
@@ -685,6 +693,10 @@ long __sys_setresuid(uid_t ruid, uid_t euid, uid_t suid)
 	if (retval < 0)
 		goto error;
 
+	retval = set_cred_ucounts(new);
+	if (retval < 0)
+		goto error;
+
 	return commit_creds(new);
 
 error:
diff --git a/kernel/ucount.c b/kernel/ucount.c
index 11b1596e2542..9894795043c4 100644
--- a/kernel/ucount.c
+++ b/kernel/ucount.c
@@ -8,6 +8,12 @@
 #include <linux/kmemleak.h>
 #include <linux/user_namespace.h>
 
+struct ucounts init_ucounts = {
+	.ns    = &init_user_ns,
+	.uid   = GLOBAL_ROOT_UID,
+	.count = 1,
+};
+
 #define UCOUNTS_HASHTABLE_BITS 10
 static struct hlist_head ucounts_hashtable[(1 << UCOUNTS_HASHTABLE_BITS)];
 static DEFINE_SPINLOCK(ucounts_lock);
@@ -125,7 +131,15 @@ static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struc
 	return NULL;
 }
 
-static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid)
+static void hlist_add_ucounts(struct ucounts *ucounts)
+{
+	struct hlist_head *hashent = ucounts_hashentry(ucounts->ns, ucounts->uid);
+	spin_lock_irq(&ucounts_lock);
+	hlist_add_head(&ucounts->node, hashent);
+	spin_unlock_irq(&ucounts_lock);
+}
+
+struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid)
 {
 	struct hlist_head *hashent = ucounts_hashentry(ns, uid);
 	struct ucounts *ucounts, *new;
@@ -160,7 +174,26 @@ static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid)
 	return ucounts;
 }
 
-static void put_ucounts(struct ucounts *ucounts)
+struct ucounts *get_ucounts(struct ucounts *ucounts)
+{
+	unsigned long flags;
+
+	if (!ucounts)
+		return NULL;
+
+	spin_lock_irqsave(&ucounts_lock, flags);
+	if (ucounts->count == INT_MAX) {
+		WARN_ONCE(1, "ucounts: counter has reached its maximum value");
+		ucounts = NULL;
+	} else {
+		ucounts->count += 1;
+	}
+	spin_unlock_irqrestore(&ucounts_lock, flags);
+
+	return ucounts;
+}
+
+void put_ucounts(struct ucounts *ucounts)
 {
 	unsigned long flags;
 
@@ -194,7 +227,7 @@ struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid,
 {
 	struct ucounts *ucounts, *iter, *bad;
 	struct user_namespace *tns;
-	ucounts = get_ucounts(ns, uid);
+	ucounts = alloc_ucounts(ns, uid);
 	for (iter = ucounts; iter; iter = tns->ucounts) {
 		int max;
 		tns = iter->ns;
@@ -237,6 +270,7 @@ static __init int user_namespace_sysctl_init(void)
 	BUG_ON(!user_header);
 	BUG_ON(!setup_userns_sysctls(&init_user_ns));
 #endif
+	hlist_add_ucounts(&init_ucounts);
 	return 0;
 }
 subsys_initcall(user_namespace_sysctl_init);
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index ce396ea4de60..8206a13c81eb 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -1340,6 +1340,9 @@ static int userns_install(struct nsset *nsset, struct ns_common *ns)
 	put_user_ns(cred->user_ns);
 	set_cred_user_ns(cred, get_user_ns(user_ns));
 
+	if (set_cred_ucounts(cred) < 0)
+		return -EINVAL;
+
 	return 0;
 }
 
-- 
2.30.2


  reply	other threads:[~2021-07-04 23:10 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 23:06 [PATCH AUTOSEL 5.10 01/70] spi: Make of_register_spi_device also set the fwnode Sasha Levin
2021-07-04 23:06 ` Sasha Levin [this message]
2021-07-04 23:06 ` [PATCH AUTOSEL 5.10 03/70] staging: media: rkvdec: fix pm_runtime_get_sync() usage count Sasha Levin
2021-07-04 23:06 ` [PATCH AUTOSEL 5.10 04/70] media: marvel-ccic: fix some issues when getting pm_runtime Sasha Levin
2021-07-04 23:06 ` [PATCH AUTOSEL 5.10 05/70] media: mdk-mdp: fix pm_runtime_get_sync() usage count Sasha Levin
2021-07-04 23:06 ` [PATCH AUTOSEL 5.10 06/70] media: s5p: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 07/70] media: am437x: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 08/70] media: sh_vou: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 09/70] media: mtk-vcodec: fix PM runtime get logic Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 10/70] media: s5p-jpeg: fix pm_runtime_get_sync() usage count Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 11/70] media: sunxi: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 12/70] media: sti/bdisp: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 13/70] media: exynos4-is: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 14/70] media: exynos-gsc: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 15/70] spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 16/70] spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages() Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 17/70] spi: omap-100k: Fix the length judgment problem Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 18/70] regulator: uniphier: Add missing MODULE_DEVICE_TABLE Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 19/70] sched/core: Initialize the idle task with preemption disabled Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 20/70] hwrng: exynos - Fix runtime PM imbalance on error Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 21/70] crypto: nx - add missing MODULE_DEVICE_TABLE Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 22/70] regmap-i2c: Set regmap max raw r/w from quirks Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 23/70] media: sti: fix obj-$(config) targets Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 24/70] media: cpia2: fix memory leak in cpia2_usb_probe Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 25/70] media: cobalt: fix race condition in setting HPD Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 26/70] media: hevc: Fix dependent slice segment flags Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 27/70] media: pvrusb2: fix warning in pvr2_i2c_core_done Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 28/70] media: imx: imx7_mipi_csis: Fix logging of only error event counters Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 29/70] crypto: qat - check return code of qat_hal_rd_rel_reg() Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 30/70] crypto: qat - remove unused macro in FW loader Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 31/70] crypto: qce: skcipher: Fix incorrect sg count for dma transfers Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 32/70] arm64: perf: Convert snprintf to sysfs_emit Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 33/70] sched/fair: Fix ascii art by relpacing tabs Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 34/70] media: i2c: ov2659: Use clk_{prepare_enable,disable_unprepare}() to set xvclk on/off Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 35/70] media: bt878: do not schedule tasklet when it is not setup Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 36/70] media: em28xx: Fix possible memory leak of em28xx struct Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 37/70] media: hantro: Fix .buf_prepare Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 38/70] media: cedrus: " Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 39/70] media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 40/70] media: bt8xx: Fix a missing check bug in bt878_probe Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 41/70] media: st-hva: Fix potential NULL pointer dereferences Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 42/70] crypto: hisilicon/sec - fixup 3des minimum key size declaration Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 43/70] Makefile: fix GDB warning with CONFIG_RELR Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 44/70] media: dvd_usb: memory leak in cinergyt2_fe_attach Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 45/70] memstick: rtsx_usb_ms: fix UAF Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 46/70] mmc: sdhci-sprd: use sdhci_sprd_writew Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 47/70] mmc: via-sdmmc: add a check against NULL pointer dereference Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 48/70] spi: meson-spicc: fix a wrong goto jump for avoiding memory leak Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 49/70] spi: meson-spicc: fix memory leak in meson_spicc_probe Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 50/70] crypto: shash - avoid comparing pointers to exported functions under CFI Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 51/70] media: dvb_net: avoid speculation from net slot Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 52/70] media: siano: fix device register error path Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 53/70] media: imx-csi: Skip first few frames from a BT.656 source Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 54/70] hwmon: (max31790) Report correct current pwm duty cycles Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 55/70] hwmon: (max31790) Fix pwmX_enable attributes Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 56/70] drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 57/70] KVM: PPC: Book3S HV: Fix TLB management on SMT8 POWER9 and POWER10 processors Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 58/70] btrfs: fix error handling in __btrfs_update_delayed_inode Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 59/70] btrfs: abort transaction if we fail to update the delayed inode Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 60/70] btrfs: sysfs: fix format string for some discard stats Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 61/70] btrfs: make Private2 lifespan more consistent Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 62/70] btrfs: fix the filemap_range_has_page() call in btrfs_punch_hole_lock_range() Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 63/70] btrfs: don't clear page extent mapped if we're not invalidating the full page Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 64/70] btrfs: disable build on platforms having page size 256K Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 65/70] locking/lockdep: Fix the dep path printing for backwards BFS Sasha Levin
2021-07-04 23:07 ` [PATCH AUTOSEL 5.10 66/70] lockding/lockdep: Avoid to find wrong lock dep path in check_irq_usage() Sasha Levin
2021-07-04 23:08 ` [PATCH AUTOSEL 5.10 67/70] KVM: s390: get rid of register asm usage Sasha Levin
2021-07-04 23:08 ` [PATCH AUTOSEL 5.10 68/70] regulator: mt6358: Fix vdram2 .vsel_mask Sasha Levin
2021-07-04 23:08 ` [PATCH AUTOSEL 5.10 69/70] regulator: da9052: Ensure enough delay time for .set_voltage_time_sel Sasha Levin
2021-07-04 23:08 ` [PATCH AUTOSEL 5.10 70/70] media: Fix Media Controller API config checks Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210704230804.1490078-2-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=ebiederm@xmission.com \
    --cc=legion@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.sang@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).