All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Florian Bezdeka <florian.bezdeka@siemens.com>
Cc: Qichen Qiu <ruiqurm@gmail.com>,  xenomai@lists.linux.dev
Subject: Re: [PATCH] evl: fix the gdb accessing control buffer issue.
Date: Mon, 09 Dec 2024 16:11:35 +0100	[thread overview]
Message-ID: <87plm0ao2g.fsf@xenomai.org> (raw)
In-Reply-To: <1a1ba081bad39a548d0ca0b1bce44b7c9643d9ce.camel@siemens.com> (Florian Bezdeka's message of "Mon, 09 Dec 2024 10:25:57 +0100")

Florian Bezdeka <florian.bezdeka@siemens.com> writes:

> On Mon, 2024-12-09 at 08:37 +0000, Qichen Qiu wrote:
>> Currently, EVL maps the control buffer using remap_pfn_range, tagging 
>> the memory with VM_IO. However, this prevents access by gdb.
>> 
>> This patch introduces the control_mmap_access function for the control 
>> VMA, enabling gdb access when CONFIG_HAVE_IOREMAP_PROT is supported on 
>> the target architecture.
>
> @Philippe: I haven't checked the details yet, but the memory mapping is
> different for Xenomai 3? Just wondering why this is necessary at all.
>

Cobalt gets the u-mmapped heaps from the vmalloc space
(cobalt_umm_init), so we can populate the vma using vm_insert_page()
there (mmap_kmem_helper), which should not set VM_IO. EVL currently
obtains the heap from kmalloc instead, hence remap_pfn_range() to map a
range from the logical memory space. IOW, "that should be fine already"
(famous last words).

> Does that mean that gdb did not work? On which platforms/architectures?
> Is there no test for gdb like the gdb test in smokey?
>

The existing gdb test only checks the synchronous stop feature I
believe, not accessing the memory behind those mappings.

-- 
Philippe.

  parent reply	other threads:[~2024-12-09 15:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09  8:37 [PATCH] evl: fix the gdb accessing control buffer issue Qichen Qiu
2024-12-09  9:25 ` Florian Bezdeka
2024-12-09 13:47   ` [PATCH v2] " Qichen Qiu
2024-12-09 15:11   ` Philippe Gerum [this message]
2024-12-09 15:01 ` [PATCH] " Philippe Gerum
2024-12-09 16:31   ` Qichen Qiu
2024-12-11 15:27   ` [PATCH] evl: replace `remap_pfn_range` with `vm_insert_page` in control_mmap Qichen Qiu
2024-12-16 14:22     ` Philippe Gerum
2024-12-17 14:26       ` Qichen Qiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87plm0ao2g.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=florian.bezdeka@siemens.com \
    --cc=ruiqurm@gmail.com \
    --cc=xenomai@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.