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-next>] [day] [month] [year] [list]
Message-Id: <20201013142616.118697527@linutronix.de>
Date:   Tue, 13 Oct 2020 16:26:16 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Hans Verkuil <hverkuil@...all.nl>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-usb@...r.kernel.org,
        Hans Verkuil <hverkuil-cisco@...all.nl>
Subject: [patch 0/4] media: Cleanup in_interrupt() usage

Folks,

in the discussion about preempt count consistency accross kernel
configurations:

 https://lore.kernel.org/r/20200914204209.256266093@linutronix.de/

it was concluded that the usage of in_interrupt() and related context
checks should be removed from non-core code.

The media subsystem has a few instances of in_interrupt() usage:

 1) BUG_ON(in_interrupt()

    BUG_ON() is considered the last resort and the usage there is clearly
    not in that category. It could be replaced by a
    lockdep_assert_preemption_enabled(), but all these usage sites invoke
    core functionality which will catch incorrect context already. So
    adding more there is not really useful

 2) Comments and printk()'s

    The comment is misleading and the checks in the printk()'s are
    pointless as the code can never be called from in_interrupt() as it
    contains GFP_KERNEL allocations.

I'm collecting related cleanups all over the tree, but feel free to route
them through the media tree as they have no dependencies. Let me know which
route you prefer.

Thanks,

	tglx
---
 common/saa7146/saa7146_fops.c |    2 --
 pci/bt8xx/bttv-risc.c         |    1 -
 pci/cx23885/cx23885-core.c    |    1 -
 pci/cx25821/cx25821-core.c    |    1 -
 platform/fsl-viu.c            |    2 --
 platform/omap3isp/ispccdc.c   |    5 ++---
 usb/au0828/au0828-video.c     |    5 ++---
 usb/cx231xx/cx231xx-core.c    |   10 ++++------
 usb/cx231xx/cx231xx-vbi.c     |    3 +--
 usb/tm6000/tm6000-video.c     |    2 --
 usb/zr364xx/zr364xx.c         |    2 --
 11 files changed, 9 insertions(+), 25 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ