From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Luis Chamberlain <mcgrof@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Alexey Gladkov" <legion@kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Linux Next Mailing List" <linux-next@vger.kernel.org>,
"Thomas Weißschuh" <linux@weissschuh.net>
Subject: linux-next: manual merge of the sysctl tree with the userns tree
Date: Wed, 6 Dec 2023 13:57:32 +1100 [thread overview]
Message-ID: <20231206135732.46d1b2b9@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2303 bytes --]
Hi all,
Today's linux-next merge of the sysctl tree got a conflict in:
ipc/ipc_sysctl.c
between commit:
54e1011bd95a ("sysctl: Allow change system v ipc sysctls inside ipc namespace")
from the userns tree and commit:
a6dd7f5a787b ("sysctl: treewide: constify ctl_table_root::permissions")
from the sysctl tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc ipc/ipc_sysctl.c
index 01c4a50d22b2,d876f96f5992..000000000000
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@@ -14,11 -14,10 +14,11 @@@
#include <linux/ipc_namespace.h>
#include <linux/msg.h>
#include <linux/slab.h>
+#include <linux/cred.h>
#include "util.h"
- static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write,
- void *buffer, size_t *lenp, loff_t *ppos)
+ static int proc_ipc_dointvec_minmax_orphans(const struct ctl_table *table,
+ int write, void *buffer, size_t *lenp, loff_t *ppos)
{
struct ipc_namespace *ns =
container_of(table->data, struct ipc_namespace, shm_rmid_forced);
@@@ -191,21 -190,7 +191,21 @@@ static int set_is_seen(struct ctl_table
return ¤t->nsproxy->ipc_ns->ipc_set == set;
}
+static void ipc_set_ownership(struct ctl_table_header *head,
- struct ctl_table *table,
++ const struct ctl_table *table,
+ kuid_t *uid, kgid_t *gid)
+{
+ struct ipc_namespace *ns =
+ container_of(head->set, struct ipc_namespace, ipc_set);
+
+ kuid_t ns_root_uid = make_kuid(ns->user_ns, 0);
+ kgid_t ns_root_gid = make_kgid(ns->user_ns, 0);
+
+ *uid = uid_valid(ns_root_uid) ? ns_root_uid : GLOBAL_ROOT_UID;
+ *gid = gid_valid(ns_root_gid) ? ns_root_gid : GLOBAL_ROOT_GID;
+}
+
- static int ipc_permissions(struct ctl_table_header *head, struct ctl_table *table)
+ static int ipc_permissions(struct ctl_table_header *head, const struct ctl_table *table)
{
int mode = table->mode;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
reply other threads:[~2023-12-06 3:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231206135732.46d1b2b9@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=ebiederm@xmission.com \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=mcgrof@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
all inboxes | Powered by JetHome®