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: <PU1P153MB016981FD2D1CF90635DCE562BFBC0@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM>
Date:   Mon, 17 Dec 2018 18:31:15 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
CC:     "'gregkh@...uxfoundation.org'" <gregkh@...uxfoundation.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
        "'devel@...uxdriverproject.org'" <devel@...uxdriverproject.org>,
        "'olaf@...fle.de'" <olaf@...fle.de>,
        "'jasowang@...hat.com'" <jasowang@...hat.com>,
        Michael Kelley <mikelley@...rosoft.com>,
        Sasha Levin <Alexander.Levin@...rosoft.com>,
        "'apw@...onical.com'" <apw@...onical.com>,
        vkuznets <vkuznets@...hat.com>
Subject: RE: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for
 unopened channels

> From: Stephen Hemminger <stephen@...workplumber.org>
> Sent: Monday, December 17, 2018 10:17 AM
> To: Dexuan Cui <decui@...rosoft.com>
> 
> On Mon, 17 Dec 2018 18:00:29 +0000
> Dexuan Cui <decui@...rosoft.com> wrote:
> 
> > > From: Stephen Hemminger <stephen@...workplumber.org>
> > > On Thu, 13 Dec 2018 16:35:43 +0000
> > > Dexuan Cui <decui@...rosoft.com> wrote:
> > >
> > > > Before 98f4c651762c, we returned zeros for unopened channels.
> > > > With 98f4c651762c, we started to return random on-stack values.
> > > >
> > > > We'd better return -EINVAL instead.
> > >
> > > The concept looks fine, but maybe it would be simpler to move it into
> > > hv_ringbuffer_get_debuginfo and have it return an error code.
> > >
> > > Since so much of the code is repeated, I would probably make a
> > > macro which generates the code as well.
> > >
> > > Something like this:
> >
> > Thanks, Stephen! Now the patch has been in char-misc's char-misc-linus
> > branch, so IMO we may as well leave it as is (considering the code here is
> > unlikely to be frqeuencly changed), and we have a smaller patch this way. :-)
> >
> > But, yes, I agree with you that generally we should make a common
> > function to avoid duplicate code.
> >
> > Thanks,
> > -- Dexuan
> 
> The old code was risky because it would silently return stack garbage.
> Having an error check in get_debuginfo would eliminate that.

OK, then let me make another patch based on the latest char-misc-linus.

Thanks,
-- Dexuan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ