All of lore.kernel.org
 help / color / mirror / Atom feed
* v5.15-dovetail-rebase compilation fails
@ 2021-12-27 18:50 g.strobbe
  2021-12-28  8:50 ` Florian Bezdeka
  0 siblings, 1 reply; 3+ messages in thread
From: g.strobbe @ 2021-12-27 18:50 UTC (permalink / raw)
  To: 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()

		/*
		 * 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 
			


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: v5.15-dovetail-rebase compilation fails
  2021-12-27 18:50 v5.15-dovetail-rebase compilation fails g.strobbe
@ 2021-12-28  8:50 ` Florian Bezdeka
  2022-01-03  6:28   ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Bezdeka @ 2021-12-28  8:50 UTC (permalink / raw)
  To: g.strobbe, xenomai

On 27.12.21 19:50, G.Strobbe via Xenomai wrote:
> 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;

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

> 
> Best regards,
> 
> Gino 
> 			
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: v5.15-dovetail-rebase compilation fails
  2021-12-28  8:50 ` Florian Bezdeka
@ 2022-01-03  6:28   ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2022-01-03  6:28 UTC (permalink / raw)
  To: Florian Bezdeka, g.strobbe, xenomai

On 28.12.21 09:50, Florian Bezdeka wrote:
> On 27.12.21 19:50, G.Strobbe via Xenomai wrote:
>> 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;
> 
> 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?
> 

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

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-03  6:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 18:50 v5.15-dovetail-rebase compilation fails g.strobbe
2021-12-28  8:50 ` Florian Bezdeka
2022-01-03  6:28   ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.