2022-05-10 00:30:44

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the m68knommu tree with the m68k tree

Hi all,

Today's linux-next merge of the m68knommu tree got a conflict in:

arch/m68k/kernel/ptrace.c

between commit:

c862fe70b023 ("m68k: Wire up syscall_trace_enter/leave for m68k")

from the m68k tree and commit:

0d91043d8bdf ("m68knommu: implement minimal regset support")

from the m68knommu 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 arch/m68k/kernel/ptrace.c
index daebccdd2c09,4349b9c4dd68..000000000000
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@@ -284,3 -292,60 +286,59 @@@ asmlinkage void syscall_trace_leave(voi
if (test_thread_flag(TIF_SYSCALL_TRACE))
ptrace_report_syscall_exit(task_pt_regs(current), 0);
}
-#endif /* CONFIG_COLDFIRE */
+
+ #if defined(CONFIG_BINFMT_ELF_FDPIC) && defined(CONFIG_ELF_CORE)
+ /*
+ * Currently the only thing that needs to use regsets for m68k is the
+ * coredump support of the elf_fdpic loader. Implement the minimum
+ * definitions required for that.
+ */
+ static int m68k_regset_get(struct task_struct *target,
+ const struct user_regset *regset,
+ struct membuf to)
+ {
+ struct pt_regs *ptregs = task_pt_regs(target);
+ u32 uregs[ELF_NGREG];
+
+ ELF_CORE_COPY_REGS(uregs, ptregs);
+ return membuf_write(&to, uregs, sizeof(uregs));
+ }
+
+ enum m68k_regset {
+ REGSET_GPR,
+ #ifdef CONFIG_FPU
+ REGSET_FPU,
+ #endif
+ };
+
+ static const struct user_regset m68k_user_regsets[] = {
+ [REGSET_GPR] = {
+ .core_note_type = NT_PRSTATUS,
+ .n = ELF_NGREG,
+ .size = sizeof(u32),
+ .align = sizeof(u16),
+ .regset_get = m68k_regset_get,
+ },
+ #ifdef CONFIG_FPU
+ [REGSET_FPU] = {
+ .core_note_type = NT_PRFPREG,
+ .n = sizeof(struct user_m68kfp_struct) / sizeof(u32),
+ .size = sizeof(u32),
+ .align = sizeof(u32),
+ }
+ #endif /* CONFIG_FPU */
+ };
+
+ static const struct user_regset_view user_m68k_view = {
+ .name = "m68k",
+ .e_machine = EM_68K,
+ .ei_osabi = ELF_OSABI,
+ .regsets = m68k_user_regsets,
+ .n = ARRAY_SIZE(m68k_user_regsets)
+ };
+
+ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
+ {
+ return &user_m68k_view;
+ }
+ #endif /* CONFIG_BINFMT_ELF_FDPIC && CONFIG_ELF_CORE */


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-05-10 11:43:29

by Michael Schmitz

[permalink] [raw]
Subject: Re: linux-next: manual merge of the m68knommu tree with the m68k tree

Hi Stephen,

apologies on my part - I had thought that I had copied in Greg on my
patch series. And I evidently missed that his ELF patch would have
clashed with mine.

Geert and Greg coordinate well as a rule, and both patches had been seen
on the linux-m68k mailing list (just too far apart to jog my memory).

Won't happen again this decade (I hope).

Cheers,

Michael


Am 10.05.2022 um 11:44 schrieb Stephen Rothwell:
> Hi all,
>
> Today's linux-next merge of the m68knommu tree got a conflict in:
>
> arch/m68k/kernel/ptrace.c
>
> between commit:
>
> c862fe70b023 ("m68k: Wire up syscall_trace_enter/leave for m68k")
>
> from the m68k tree and commit:
>
> 0d91043d8bdf ("m68knommu: implement minimal regset support")
>
> from the m68knommu 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.
>

2022-05-10 13:03:57

by Greg Ungerer

[permalink] [raw]
Subject: Re: linux-next: manual merge of the m68knommu tree with the m68k tree

Hi Michael,

On 10/5/22 13:37, Michael Schmitz wrote:
> Hi Stephen,
>
> apologies on my part - I had thought that I had copied in Greg on my patch series. And I evidently missed that his ELF patch would have clashed with mine.

You definitely did, I still have your patches in my inbox too :-)


> Geert and Greg coordinate well as a rule, and both patches had been seen on the linux-m68k mailing list (just too far apart to jog my memory).

Yeah, this was really an accident of timing between Geert applying your series
to his for-next branch, and me applying the regset changes to my for-next
branch.

The two changes are quite distinct, but they overlap in location within
ptrace.c file. The fixup patch is pretty strait forward, and Stephen has that
right.

Regards
Greg



> Won't happen again this decade (I hope).
>
> Cheers,
>
>     Michael
>
>
> Am 10.05.2022 um 11:44 schrieb Stephen Rothwell:
>> Hi all,
>>
>> Today's linux-next merge of the m68knommu tree got a conflict in:
>>
>>   arch/m68k/kernel/ptrace.c
>>
>> between commit:
>>
>>   c862fe70b023 ("m68k: Wire up syscall_trace_enter/leave for m68k")
>>
>> from the m68k tree and commit:
>>
>>   0d91043d8bdf ("m68knommu: implement minimal regset support")
>>
>> from the m68knommu 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.
>>