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:   Sat, 14 Oct 2017 08:04:18 -0700
From:   Christoffer Dall <cdall@...aro.org>
To:     Auger Eric <eric.auger@...hat.com>
Cc:     Andre Przywara <andre.przywara@....com>, eric.auger.pro@...il.com,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        marc.zyngier@....com, peter.maydell@...aro.org,
        wanghaibin.wang@...wei.com, wu.wubin@...wei.com
Subject: Re: [PATCH v2 02/10] KVM: arm/arm64: vgic-its: Always allow clearing
 GITS_CREADR/CWRITER

On Sat, Oct 14, 2017 at 10:53:01AM +0200, Auger Eric wrote:
> Hi Christoffer,
> 
> On 13/10/2017 19:54, Christoffer Dall wrote:
> > On Fri, Oct 13, 2017 at 01:54:34PM +0200, Auger Eric wrote:
> >> Hi Christoffer,
> >> On 13/10/2017 13:44, Christoffer Dall wrote:
> >>> On Fri, Oct 06, 2017 at 05:29:02PM +0200, Auger Eric wrote:
> >>>> Hi,
> >>>>
> >>>> On 06/10/2017 16:37, Andre Przywara wrote:
> >>>>> Hi,
> >>>>>
> >>>>> On 27/09/17 14:28, Eric Auger wrote:
> >>>>>> If the GITS_CBASER Size field is 0, which can correspond to a
> >>>>>> reset value, the userspace fails to set the GITS_CREADR/CWRITER
> >>>>>> offsets to 0. This failure is not justified.
> >>>>>>
> >>>>>> Let's allow this setting which can also correspond to a reset value.
> >>>>>
> >>>>> But the GITS_CBASER size field has a +1 encoding, so can never be 0, if
> >>>>> I understand the manual (and ITS_CMD_BUFFER_SIZE) correctly.
> >>>> Oh OK, you're. I missed that. I would have sworn I've seen that failure
> >>>> but I must have misinterpreted it.
> >>>>
> >>>
> >>> What is CWRITER is written to a brand new ITS before the CBASER is
> >>> written?
> >>>
> >>> I don't see us initializing the cbaser field anywhere?
> >> in vgic_its_create() its is allocated with kzalloc so its->cbaser is
> >> initialized at this moment.
> >>
> > 
> > Right, so it can be 0, and we still need your patch, contrary to Andre's
> > comment.  Am I missing something?
> 
> No Andre is right, cbaser = 0 but ITS_CMD_BUFFER_SIZE(its->cbaser)
> returns 4kB.
> 
> #define ITS_CMD_BUFFER_SIZE(baser)      ((((baser) & 0xff) + 1) << 12)
> 
> So the check doesn't fail.
> 
Duh, I didn't check the macro and thought it just applied a mask and
shift.

Thanks,
-Christoffer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ