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] [day] [month] [year] [list]
Date:	Tue, 29 Apr 2014 09:57:31 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	Rob Herring <robherring2@...il.com>
Cc:	Marc Zyngier <Marc.Zyngier@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Will Deacon <Will.Deacon@....com>,
	"msalter@...hat.com" <msalter@...hat.com>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] arm64: fixmap: fix missing sub-page offset for
 earlyprintk

On Tue, Apr 29, 2014 at 12:51:18AM +0100, Rob Herring wrote:
> On Mon, Apr 28, 2014 at 1:50 PM, Marc Zyngier <marc.zyngier@....com> wrote:
> > Commit d57c33c5daa4 (add generic fixmap.h) added (among other
> > similar things) set_fixmap_io to deal with early ioremap of devices.
> >
> > More recently, commit bf4b558eba92 (arm64: add early_ioremap support)
> > converted the arm64 earlyprintk to use set_fixmap_io. A side effect of
> > this conversion is that my virtual machines have stopped booting when
> > I pass "earlyprintk=uart8250-8bit,0x3f8" to the guest kernel.
> >
> > Turns out that the new earlyprintk code doesn't care at all about
> > sub-page offsets, and just assumes that the earlyprintk device will
> > be page-aligned. Obviously, that doesn't play well with the above example.
> >
> > Further investigation shows that set_fixmap_io uses __set_fixmap instead
> > of __set_fixmap_offset. A fix is to introduce a set_fixmap_offset_io that
> > uses the latter, and to remove the superflous call to fix_to_virt
> > (which only returns the value that set_fixmap_io has already given us).
> >
> > With this applied, my VMs are back in business. Tested on a Cortex-A57
> > platform with kvmtool as platform emulation.
> >
> > Cc: Mark Salter <msalter@...hat.com>
> > Cc: Catalin Marinas <catalin.marinas@....com>
> > Cc: Will Deacon <will.deacon@....com>
> > Signed-off-by: Marc Zyngier <marc.zyngier@....com>
> > ---
> >  arch/arm64/kernel/early_printk.c | 6 ++----
> >  include/asm-generic/fixmap.h     | 3 +++
> >  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> This will be fixed already in 3.16 with my earlycon series[1] if this
> is not taken for 3.15.

I'd like to take this for 3.15 as it's currently broken. I just need
another ack from Arnd on the generic header change.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ