From mboxrd@z Thu Jan 1 00:00:00 1970 References: <0531d2db-aa87-1950-6d7f-41c80d4fe679@web.de> <875yyrf3yo.fsf@xenomai.org> <87a6o2b0to.fsf@xenomai.org> <50f40c7f-ae8d-7ded-9dc7-91310f0d7909@siemens.com> <874ke9bzde.fsf@xenomai.org> <871r9dby8b.fsf@xenomai.org> From: Philippe Gerum Subject: Re: [PATCH] irq_pipeline: Prevent returning to user space with pending inband IRQs In-reply-to: <871r9dby8b.fsf@xenomai.org> Date: Mon, 07 Jun 2021 15:29:49 +0200 Message-ID: <87y2blajle.fsf@xenomai.org> MIME-Version: 1.0 Content-Type: text/plain List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Xenomai Philippe Gerum writes: > Philippe Gerum writes: >> >> 2. This one should be replaced by a fix in local_irq_disable_full(), >> pending some tests ongoing here: >> >> irq_pipeline: Prevent returning to user space with pending inband IRQs >> > > Tests went ok. So [1] should be replaced by a patch inverting the order > in local_irq_disable_full() as we discussed. > > [1] irq_pipeline: Prevent returning to user space with pending inband IRQs Likewise for local_irq_save_full() which may cause the same problem, i.e.: diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h index 8663f19cc7b7b68..051c72751db42d1 100644 --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h @@ -242,14 +242,14 @@ do { \ #define local_irq_disable_full() \ do { \ - local_irq_disable(); \ hard_local_irq_disable(); \ + local_irq_disable(); \ } while (0) #define local_irq_save_full(__flags) \ do { \ - local_irq_save(__flags); \ hard_local_irq_disable(); \ + local_irq_save(__flags); \ } while (0) #define local_irq_restore_full(__flags) \ -- Philippe.