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]
Message-ID: <20170901074023.2ctuzw3ohlnlmtid@linutronix.de>
Date:   Fri, 1 Sep 2017 09:40:23 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Mike Galbraith <efault@....de>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-rt-users <linux-rt-users@...r.kernel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [patch-rt] drivers/zram: fix zcomp_stream_get()
 smp_processor_id() use in preemptible code

On 2017-08-31 21:32:30 [+0200], Thomas Gleixner wrote:
> > zram_lock_table() is bit_spin_lock() on !RT and spin_lock(&table->lock);
> > on RT. So this is done.
> > !RT has this running in a kmap_atomic() section so they have no
> > preemption there.
> > zcomp_stream_get() returns a per-CPU object which is protected with a
> > spinlock and only accessed locked.
> 
> So when we are inside a spinlocked section, why is this_cpu_ptr() not
> working? That does not make sense.

zram_decompress_page() invokes zcomp_stream_get() within a spin_lock
section (zram_lock_table()). This is fine.
zram_bvec_write() does not invoke zcomp_stream_get() within a spin_lock
section.

> Thanks,
> 
> 	tglx

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ