xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Johannes Kirchmair <johannes.kirchmair@sigmatek.at>,
	xenomai@lists.linux.dev
Subject: Re: [PATCH 1/3] [POC] test implementaion of rt-signals
Date: Fri, 1 Sep 2023 15:51:45 +0200	[thread overview]
Message-ID: <4c8551a6-8c70-4605-8ebc-76b2e3a558d5@siemens.com> (raw)
In-Reply-To: <20230816101842.3377643-1-johannes.kirchmair@sigmatek.at>

On 16.08.23 12:18, Johannes Kirchmair wrote:
> +int xnarch_setup_trap_info(unsigned int vector, struct pt_regs *regs,
> +			   long errcode, int *sig, struct kernel_siginfo *info)
> +{
> +	switch (vector) {
> +	case 0: /* divide_error */
> +		*sig = SIGFPE;
> +		info->si_signo = *sig;
> +		info->si_errno = 0;
> +		info->si_code = FPE_INTDIV;
> +		info->si_addr = (void __user *)regs->ip;
> +		return 0;
> +	case 1: /* trap_error */ {
> +		unsigned long condition;
> +		get_debugreg(condition, 6);
> +		set_debugreg(0, 7);

This looks suspicious: We modify DR7 unconditionally, even if we do not
handle the signal? Is that OK for the kernel code that takes over then
because it will simply do the same?

Jan

> +		*sig = SIGTRAP;
> +		info->si_signo = *sig;
> +		info->si_errno = errcode;
> +		info->si_code = get_si_code(condition);
> +		info->si_addr = (void __user *)regs->ip;
> +		return 0;
> +	}

-- 
Siemens AG, Technology
Linux Expert Center


  parent reply	other threads:[~2023-09-01 13:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 10:18 [PATCH 1/3] [POC] test implementaion of rt-signals Johannes Kirchmair
2023-08-16 10:18 ` [PATCH 2/3] [POC] Add rt_signal test Johannes Kirchmair
2023-08-16 10:18 ` [PATCH 3/3] [POC] add a tool to measure rt_signal latency Johannes Kirchmair
2023-08-16 11:24 ` [PATCH 1/3] [POC] test implementaion of rt-signals Florian Bezdeka
2023-08-16 11:36   ` Jan Kiszka
2023-08-16 11:59     ` Johannes Kirchmair
2023-09-07 10:48   ` Johannes Kirchmair
2023-09-11  8:41     ` Florian Bezdeka
2023-09-01 12:00 ` Jan Kiszka
2023-09-01 13:38   ` Jan Kiszka
2023-09-04  6:55   ` Johannes Kirchmair
2023-09-07 13:39     ` Jan Kiszka
2023-09-07 13:58       ` Johannes Kirchmair
2023-09-01 13:51 ` Jan Kiszka [this message]
2023-09-01 14:11   ` Jan Kiszka
2023-09-04  7:04     ` Johannes Kirchmair
2024-03-05 15:54 ` Richard Weinberger
2024-03-05 17:05   ` Jan Kiszka
2024-03-05 17:14     ` Richard Weinberger
  -- strict thread matches above, loose matches on Subject: below --
2023-09-08 10:50 Johannes Kirchmair
2023-09-08 10:54 ` Johannes Kirchmair
2023-09-09 11:35 ` Jan Kiszka
2023-05-09 13:13 Johannes Kirchmair
2023-05-09 13:17 ` Johannes Kirchmair
2023-05-12 17:38   ` Jan Kiszka
2023-05-15  6:50     ` Johannes Kirchmair
2023-05-15 10:38       ` Jan Kiszka
2023-05-16  6:46         ` Johannes Kirchmair
2023-05-16  6:52           ` Jan Kiszka
2023-08-09  9:50   ` Schaffner, Tobias

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=4c8551a6-8c70-4605-8ebc-76b2e3a558d5@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=johannes.kirchmair@sigmatek.at \
    --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 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).