linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree
Subsystems (2)
Mark Brown
maintainerHi all,
Today's linux-next merge of the liveupdate tree got a conflict in:
kernel/liveupdate/luo_session.c
between commit:
da7f658ccc8da ("liveupdate: validate session type before performing operation")
from the liveupdate-fixes tree and commit:
d6b3d47bdaf89 ("liveupdate: add LIVEUPDATE_SESSION_GET_NAME ioctl")
from the liveupdate 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.
kernel/liveupdate/luo_session.c +0 -0
@@@ -293,15 -306,9 +306,16 @@@ union ucmd_bufferstruct liveupdate_session_finish finish;struct liveupdate_session_preserve_fd preserve;struct liveupdate_session_retrieve_fd retrieve; +struct liveupdate_session_get_name get_name; }; +/* Type of sessions the ioctl applies to. */ +enum luo_ioctl_type { +LUO_IOCTL_INCOMING , +LUO_IOCTL_OUTGOING , +LUO_IOCTL_ALL , +}; + struct luo_ioctl_op { unsigned int size;unsigned int min_size;static const struct luo_ioctl_op luo_session_ioctl_ops[] = {IOCTL_OP (LIVEUPDATE_SESSION_FINISH , luo_session_finish, - struct liveupdate_session_finish, reserved), + struct liveupdate_session_finish, reserved, LUO_IOCTL_INCOMING),IOCTL_OP (LIVEUPDATE_SESSION_PRESERVE_FD , luo_session_preserve_fd, - struct liveupdate_session_preserve_fd, token), + struct liveupdate_session_preserve_fd, token, LUO_IOCTL_OUTGOING),IOCTL_OP (LIVEUPDATE_SESSION_RETRIEVE_FD , luo_session_retrieve_fd, - struct liveupdate_session_retrieve_fd, token), + struct liveupdate_session_retrieve_fd, token, LUO_IOCTL_INCOMING), +IOCTL_OP (LIVEUPDATE_SESSION_GET_NAME , luo_session_get_name, - struct liveupdate_session_get_name, name), ++ struct liveupdate_session_get_name, name, LUO_IOCTL_OUTGOING), }; +static bool luo_ioctl_type_valid(struct luo_session *session, + const struct luo_ioctl_op *op) +{ + switch (op->type) { + case LUO_IOCTL_INCOMING: +/* Retrieved is only set on incoming sessions */ + return session->retrieved; + case LUO_IOCTL_OUTGOING: + return !session->retrieved; + case LUO_IOCTL_ALL: + return true; + } + +/* Catch-all. */ + return false; +} + static long luo_session_ioctl(struct file *filep, unsigned int cmd,unsigned long arg) {
Pratyush Yadav
maintainerHi Mark,
Quoted 14 lines · Mark Brown
Hi all,
Today's linux-next merge of the liveupdate tree got a conflict in:
kernel/liveupdate/luo_session.cbetween commit:
da7f658ccc8da("liveupdate: validate session type before performing operation")from the liveupdate-fixes tree and commit:
d6b3d47bdaf89("liveupdate: addLIVEUPDATE_SESSION_GET_NAMEioctl")
Quoted 8 lines
from the liveupdate 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.
Thanks! I did foresee this and was planning to send a fixup that we can meld into "liveupdate: add LIVEUPDATE_SESSION_GET_NAME ioctl".
I suppose one option is to wait for "liveupdate: validate session type before performing operation" to land into v7.1-rc6 and then rebase the liveupdate/next branch on top of it and fix the conflict ourselves. This gives around 2 weeks for the rebased branch to soak into linux-next until we send the PR. But I am not sure if this is enough time or if we should just let Linus deal with this...
Quoted 27 lines
kernel/liveupdate/luo_session.c +1
-0@@@ -293,15 -306,9 +306,16 @@@ union ucmd_bufferstruct liveupdate_session_finish finish;struct liveupdate_session_preserve_fd preserve;struct liveupdate_session_retrieve_fd retrieve; +struct liveupdate_session_get_name get_name; }; +/* Type of sessions the ioctl applies to. */ +enum luo_ioctl_type { +LUO_IOCTL_INCOMING , +LUO_IOCTL_OUTGOING , +LUO_IOCTL_ALL , +}; + struct luo_ioctl_op { unsigned int size;unsigned int min_size;@@@ -323,30 -328,15 +337,32 @@@static const struct luo_ioctl_op luo_session_ioctl_ops[] = {IOCTL_OP (LIVEUPDATE_SESSION_FINISH , luo_session_finish, - struct liveupdate_session_finish, reserved),
kernel/liveupdate/luo_session.c
Quoted 10 lines
kernel/liveupdate/luo_session.c +2
-0+ struct liveupdate_session_finish, reserved, LUO_IOCTL_INCOMING), IOCTL_OP(LIVEUPDATE_SESSION_PRESERVE_FD, luo_session_preserve_fd, - struct liveupdate_session_preserve_fd, token), + struct liveupdate_session_preserve_fd, token, LUO_IOCTL_OUTGOING), IOCTL_OP(LIVEUPDATE_SESSION_RETRIEVE_FD, luo_session_retrieve_fd, - struct liveupdate_session_retrieve_fd, token), + struct liveupdate_session_retrieve_fd, token, LUO_IOCTL_INCOMING), +IOCTL_OP (LIVEUPDATE_SESSION_GET_NAME , luo_session_get_name, - struct liveupdate_session_get_name, name), ++ struct liveupdate_session_get_name, name, LUO_IOCTL_OUTGOING),
FWIW, this resolution is wrong. It should be LUO_IOCTL_ALL here.
Quoted 23 lines
};+static bool luo_ioctl_type_valid(struct
luo_session*session,
+ const structluo_ioctl_op*op)
+{
+ switch (op->type) {
+ caseLUO_IOCTL_INCOMING:
+ /* Retrieved is only set on incoming sessions */
+ returnsession->retrieved;
+ caseLUO_IOCTL_OUTGOING:
+ return !session->retrieved;
+ caseLUO_IOCTL_ALL:
+ return true;
+ }
+
+ /* Catch-all. */
+ return false;
+}
+
static long luo_session_ioctl(struct file *filep, unsigned int cmd,
unsigned long arg)
{
Signature · 2 lines
Regards, Pratyush Yadav
Mark Brown
maintainerQuoted 6 lines · Pratyush Yadav
I suppose one option is to wait for "liveupdate: validate session type before performing operation" to land into v7.1-rc6 and then rebase the liveupdate/next branch on top of it and fix the conflict ourselves. This gives around 2 weeks for the rebased branch to soak into linux-next until we send the PR. But I am not sure if this is enough time or if we should just let Linus deal with this...
You could also do a merge instead of a rebase, the end result is the same but the older commits are preserved.
Quoted 5 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+ IOCTL_OP(LIVEUPDATE_SESSION_GET_NAME, luo_session_get_name, - struct liveupdate_session_get_name, name), ++ struct liveupdate_session_get_name, name, LUO_IOCTL_OUTGOING),FWIW, this resolution is wrong. It should be
LUO_IOCTL_ALLhere.
OK, I'll fix up tomorrow.