Skip to contentSkip to conversation

v5.15-dovetail-rebase compilation fails

DISCUSSION [email protected] 3 participants 3 messages Dec 27, 2021 – Jan 3, 2022

lore
Share & tools
lore
#0 lore raw

Hi all,

The compilation of file xenomai/kernel/cobalt/debug.c in branch v5.15-dovetail-rebase failed.
The problem is that since kernel vanilla v15.5 include/linux/mm.h no longer defines VM_DENYWRITE

It is still used in xndebug_trace_relax()

/*
* Hack. Unlike DSOs, executables and interpreters
* (e.g. dynamic linkers) are protected against write
* attempts. Use this to determine when $pc should be
* fixed up by subtracting the mapping base address in
* the DSO case.
*/
if (!(vma->vm_flags & VM_DENYWRITE))
pc -= vma->vm_start;

Best regards,

Gino

#1 lore raw
Quoted 9 lines · G.Strobbe via Xenomai

Hi all,

The compilation of file xenomai/kernel/cobalt/debug.c in branch v5.15-dovetail-rebase failed.
The problem is that since kernel vanilla v15.5 include/linux/mm.h no longer defines VM_DENYWRITE

It is still used in xndebug_trace_relax()

Quoted 9 lines

/*
* Hack. Unlike DSOs, executables and interpreters
* (e.g. dynamic linkers) are protected against write
* attempts. Use this to determine when $pc should be
* fixed up by subtracting the mapping base address in
* the DSO case.
*/
if (!(vma->vm_flags & VM_DENYWRITE))
pc -= vma->vm_start;

Thanks for reporting that. Adding Jan and Philippe to CC, seems the "migration" to 5.15 is not fully done yet.

As a temporary workaround you could set CONFIG_XENO_OPT_DEBUG (or more specific CONFIG_XENO_OPT_DEBUG_TRACE_RELAX) to "n" in your kernel configuration.

For Jan and Philippe:

The following commits might be relevant:
fe69d560b5bd ("kernel/fork: always deny write access to current MM exe_file") 8d0920bde5eb ("mm: remove VM_DENYWRITE")
592ca09be833 ("fs: update documentation of get_write_access() and friends")

While looking at 592ca09be833 I wonder if we would have to migrate to something like inode_is_open_for_write(). Any comments / ideas?

HTH,
Florian

Quoted 6 lines

Best regards,

Gino

#2 lore raw
Quoted 29 lines · Florian Bezdeka
Quoted 9 lines · G.Strobbe via Xenomai

Hi all,

The compilation of file xenomai/kernel/cobalt/debug.c in branch v5.15-dovetail-rebase failed.
The problem is that since kernel vanilla v15.5 include/linux/mm.h no longer defines VM_DENYWRITE

It is still used in xndebug_trace_relax()

Quoted 9 lines

/*
* Hack. Unlike DSOs, executables and interpreters
* (e.g. dynamic linkers) are protected against write
* attempts. Use this to determine when $pc should be
* fixed up by subtracting the mapping base address in
* the DSO case.
*/
if (!(vma->vm_flags & VM_DENYWRITE))
pc -= vma->vm_start;

Thanks for reporting that. Adding Jan and Philippe to CC, seems the "migration" to 5.15 is not fully done yet.

As a temporary workaround you could set CONFIG_XENO_OPT_DEBUG (or more specific CONFIG_XENO_OPT_DEBUG_TRACE_RELAX) to "n" in your kernel configuration.

For Jan and Philippe:

Quoted 8 lines

The following commits might be relevant:
fe69d560b5bd ("kernel/fork: always deny write access to current MM exe_file") 8d0920bde5eb ("mm: remove VM_DENYWRITE")
592ca09be833 ("fs: update documentation of get_write_access() and friends")

While looking at 592ca09be833 I wonder if we would have to migrate to something like inode_is_open_for_write(). Any comments / ideas?

I'm still waiting for a second opinion on
https://xenomai.org/pipermail/xenomai/2021-October/046646.html.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux