* linux-next: manual merge of the integrity tree with the mm-nonmm-unstable tree
@ 2025-04-30 4:23 Stephen Rothwell
2025-05-29 4:27 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2025-04-30 4:23 UTC (permalink / raw)
To: Mimi Zohar, Dmitry Kasatkin, Andrew Morton
Cc: Eric Biggers, Linux Kernel Mailing List, Linux Next Mailing List,
Mimi Zohar, Steven Chen, Tushar Sugandhi
[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]
Hi all,
Today's linux-next merge of the integrity tree got a conflict in:
kernel/kexec_file.c
between commit:
912e32afb858 ("kexec_file: use SHA-256 library API instead of crypto_shash API")
from the mm-nonmm-unstable tree and commit:
9ee8888a80fe ("ima: kexec: skip IMA segment validation after kexec soft reboot")
from the integrity 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 kernel/kexec_file.c
index ac915eabb901,0adb645072aa..000000000000
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@@ -762,7 -800,17 +786,14 @@@ static int kexec_calculate_store_digest
if (ksegment->kbuf == pi->purgatory_buf)
continue;
+ /*
+ * Skip the segment if ima_segment_index is set and matches
+ * the current index
+ */
+ if (check_ima_segment_index(image, i))
+ continue;
+
- ret = crypto_shash_update(desc, ksegment->kbuf,
- ksegment->bufsz);
- if (ret)
- break;
+ sha256_update(&state, ksegment->kbuf, ksegment->bufsz);
/*
* Assume rest of the buffer is filled with zero and
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: manual merge of the integrity tree with the mm-nonmm-unstable tree
2025-04-30 4:23 linux-next: manual merge of the integrity tree with the mm-nonmm-unstable tree Stephen Rothwell
@ 2025-05-29 4:27 ` Stephen Rothwell
2025-05-29 19:10 ` Mimi Zohar
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2025-05-29 4:27 UTC (permalink / raw)
To: Andrew Morton
Cc: Mimi Zohar, Dmitry Kasatkin, Eric Biggers,
Linux Kernel Mailing List, Linux Next Mailing List, Mimi Zohar,
Steven Chen, Tushar Sugandhi
[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]
Hi all,
On Wed, 30 Apr 2025 14:23:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the integrity tree got a conflict in:
>
> kernel/kexec_file.c
>
> between commit:
>
> 912e32afb858 ("kexec_file: use SHA-256 library API instead of crypto_shash API")
>
> from the mm-nonmm-unstable tree and commit:
>
> 9ee8888a80fe ("ima: kexec: skip IMA segment validation after kexec soft reboot")
>
> from the integrity 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 kernel/kexec_file.c
> index ac915eabb901,0adb645072aa..000000000000
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@@ -762,7 -800,17 +786,14 @@@ static int kexec_calculate_store_digest
> if (ksegment->kbuf == pi->purgatory_buf)
> continue;
>
> + /*
> + * Skip the segment if ima_segment_index is set and matches
> + * the current index
> + */
> + if (check_ima_segment_index(image, i))
> + continue;
> +
> - ret = crypto_shash_update(desc, ksegment->kbuf,
> - ksegment->bufsz);
> - if (ret)
> - break;
> + sha256_update(&state, ksegment->kbuf, ksegment->bufsz);
>
> /*
> * Assume rest of the buffer is filled with zero and
This is now a conflict between the mm-nonmm-stable tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: manual merge of the integrity tree with the mm-nonmm-unstable tree
2025-05-29 4:27 ` Stephen Rothwell
@ 2025-05-29 19:10 ` Mimi Zohar
0 siblings, 0 replies; 3+ messages in thread
From: Mimi Zohar @ 2025-05-29 19:10 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton
Cc: Mimi Zohar, Dmitry Kasatkin, Eric Biggers,
Linux Kernel Mailing List, Linux Next Mailing List, Steven Chen,
Tushar Sugandhi
On Thu, 2025-05-29 at 14:27 +1000, Stephen Rothwell wrote:
> Hi all,
>
> On Wed, 30 Apr 2025 14:23:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au>
> wrote:
> >
> > Today's linux-next merge of the integrity tree got a conflict in:
> >
> > kernel/kexec_file.c
> >
> > between commit:
> >
> > 912e32afb858 ("kexec_file: use SHA-256 library API instead of
> > crypto_shash API")
> >
> > from the mm-nonmm-unstable tree and commit:
> >
> > 9ee8888a80fe ("ima: kexec: skip IMA segment validation after kexec soft
> > reboot")
> >
> > from the integrity 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 kernel/kexec_file.c
> > index ac915eabb901,0adb645072aa..000000000000
> > --- a/kernel/kexec_file.c
> > +++ b/kernel/kexec_file.c
> > @@@ -762,7 -800,17 +786,14 @@@ static int kexec_calculate_store_digest
> > if (ksegment->kbuf == pi->purgatory_buf)
> > continue;
> >
> > + /*
> > + * Skip the segment if ima_segment_index is set and matches
> > + * the current index
> > + */
> > + if (check_ima_segment_index(image, i))
> > + continue;
> > +
> > - ret = crypto_shash_update(desc, ksegment->kbuf,
> > - ksegment->bufsz);
> > - if (ret)
> > - break;
> > + sha256_update(&state, ksegment->kbuf, ksegment->bufsz);
> >
> > /*
> > * Assume rest of the buffer is filled with zero and
>
> This is now a conflict between the mm-nonmm-stable tree and Linus' tree.
Thanks Stephen. It looks good to me.
Mimi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-29 19:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30 4:23 linux-next: manual merge of the integrity tree with the mm-nonmm-unstable tree Stephen Rothwell
2025-05-29 4:27 ` Stephen Rothwell
2025-05-29 19:10 ` Mimi Zohar
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).