* linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree
@ 2026-05-26 13:51 Mark Brown
2026-05-26 14:30 ` Pratyush Yadav
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2026-05-26 13:51 UTC (permalink / raw)
To: Mike Rapoport, Andrew Morton, Pasha Tatashin, Pratyush Yadav
Cc: Linux Kernel Mailing List, Linux Next Mailing List, Luca Boccassi
[-- Attachment #1: Type: text/plain, Size: 2786 bytes --]
Hi 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.
diff --cc kernel/liveupdate/luo_session.c
index 74c39d93d45a1,1caaa7886ec6d..0000000000000
--- a/kernel/liveupdate/luo_session.c
+++ b/kernel/liveupdate/luo_session.c
@@@ -293,15 -306,9 +306,16 @@@ union ucmd_buffer
struct 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),
+ 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)
{
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree
2026-05-26 13:51 linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree Mark Brown
@ 2026-05-26 14:30 ` Pratyush Yadav
2026-05-26 14:36 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Pratyush Yadav @ 2026-05-26 14:30 UTC (permalink / raw)
To: Mark Brown
Cc: Mike Rapoport, Andrew Morton, Pasha Tatashin, Pratyush Yadav,
Linux Kernel Mailing List, Linux Next Mailing List, Luca Boccassi
Hi Mark,
On Tue, May 26 2026, Mark Brown wrote:
> Hi 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.
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...
>
> diff --cc kernel/liveupdate/luo_session.c
> index 74c39d93d45a1,1caaa7886ec6d..0000000000000
> --- a/kernel/liveupdate/luo_session.c
> +++ b/kernel/liveupdate/luo_session.c
> @@@ -293,15 -306,9 +306,16 @@@ union ucmd_buffer
> struct 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),
> + 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.
> };
>
> +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)
> {
>
--
Regards,
Pratyush Yadav
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree
2026-05-26 14:30 ` Pratyush Yadav
@ 2026-05-26 14:36 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2026-05-26 14:36 UTC (permalink / raw)
To: Pratyush Yadav
Cc: Mike Rapoport, Andrew Morton, Pasha Tatashin,
Linux Kernel Mailing List, Linux Next Mailing List, Luca Boccassi
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
On Tue, May 26, 2026 at 04:30:12PM +0200, Pratyush Yadav wrote:
> 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.
> > + 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.
OK, I'll fix up tomorrow.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree
@ 2026-07-26 21:34 Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2026-07-26 21:34 UTC (permalink / raw)
To: Mike Rapoport, Andrew Morton, Pasha Tatashin, Pratyush Yadav
Cc: David Matlack, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 2715 bytes --]
Hi all,
Today's linux-next merge of the liveupdate tree got a conflict in:
include/linux/liveupdate.h
between commit:
459873adf5e90 ("liveupdate: Reference count outgoing FLB data")
from the liveupdate-fixes tree and commit:
36882f3392395 ("liveupdate: Reference count outgoing FLB data")
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.
diff --combined include/linux/liveupdate.h
index 63ea5417de849,6051abc0612ce..0000000000000
--- a/include/linux/liveupdate.h
+++ b/include/linux/liveupdate.h
@@@ -25,6 -25,7 +25,7 @@@ struct file
/**
* struct liveupdate_file_op_args - Arguments for file operation callbacks.
* @handler: The file handler being called.
+ * @session: The session this file belongs to.
* @retrieve_status: The retrieve status for the 'can_finish / finish'
* operation. A value of 0 means the retrieve has not been
* attempted, a positive value means the retrieve was
@@@ -45,6 -46,7 +46,7 @@@
*/
struct liveupdate_file_op_args {
struct liveupdate_file_handler *handler;
+ struct liveupdate_session *session;
int retrieve_status;
struct file *file;
u64 serialized_data;
@@@ -247,6 -249,14 +249,14 @@@ void liveupdate_flb_put_incoming(struc
int liveupdate_flb_get_outgoing(struct liveupdate_flb *flb, void **objp);
void liveupdate_flb_put_outgoing(struct liveupdate_flb *flb);
+ /* kernel can internally retrieve files */
+ int liveupdate_get_file_incoming(struct liveupdate_session *s, u64 token,
+ struct file **filep);
+
+ /* Get a token for an outgoing file, or -ENOENT if file is not preserved */
+ int liveupdate_get_token_outgoing(struct liveupdate_session *s,
+ struct file *file, u64 *tokenp);
+
#else /* CONFIG_LIVEUPDATE */
static inline bool liveupdate_enabled(void)
@@@ -299,5 -309,17 +309,17 @@@ static inline void liveupdate_flb_put_o
{
}
+ static inline int liveupdate_get_file_incoming(struct liveupdate_session *s,
+ u64 token, struct file **filep)
+ {
+ return -EOPNOTSUPP;
+ }
+
+ static inline int liveupdate_get_token_outgoing(struct liveupdate_session *s,
+ struct file *file, u64 *tokenp)
+ {
+ return -EOPNOTSUPP;
+ }
+
#endif /* CONFIG_LIVEUPDATE */
#endif /* _LINUX_LIVEUPDATE_H */
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-26 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 13:51 linux-next: manual merge of the liveupdate tree with the liveupdate-fixes tree Mark Brown
2026-05-26 14:30 ` Pratyush Yadav
2026-05-26 14:36 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2026-07-26 21:34 Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox