lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 19 Dec 2023 16:49:18 +0200
From: Andy Shevchenko <andy@...nel.org>
To: xiongxin <xiongxin@...inos.cn>
Cc: fancer.lancer@...il.com, hoan@...amperecomputing.com,
	linus.walleij@...aro.org, brgl@...ev.pl, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...nel.org,
	Riwen Lu <luriwen@...inos.cn>
Subject: Re: [PATCH v4] gpio: dwapb: mask/unmask IRQ when disable/enale it

On Tue, Dec 19, 2023 at 06:16:20PM +0800, xiongxin wrote:

Code wise it's fine, but while answering to Serge's email I realized that
the Subject has a typo and additionally you or Bart (if he is fine with that)
can amend:

> In the hardware implementation of the i2c hid driver based on dwapb gpio

I²C HID (alternatively: I2C HID)

here and everywhere else in the commit message unless it's the file or
function name.

> irq,

DesignWare GPIO IRQ chip

> when the user continues to use the i2c hid device in the suspend
> process, the i2c hid interrupt will be masked after the resume process
> is finished.
> 
> This is because the disable_irq()/enable_irq() of the dwapb gpio driver

DesignWare GPIO

> does not synchronize the irq mask register state. In normal use of the

IRQ

> i2c hid procedure, the gpio irq irq_mask()/irq_unmask() functions are
> called in pairs. In case of an exception, i2c_hid_core_suspend() calls
> disable_irq() to disable the gpio irq. With low probability, this causes

GPIO IRQ

> irq_unmask() to not be called, which causes the gpio irq to be masked

GPIO IRQ

> and not unmasked in enable_irq(), raising an exception.
> 
> Add synchronization to the masked register state in the
> dwapb_irq_enable()/dwapb_irq_disable() function. mask the gpio irq

GPIO IRQ

> before disabling it. After enabling the gpio irq, unmask the irq.

GPIO IRQ
IRQ

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ