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, 2 Feb 2021 22:52:21 +0800
From:   Kyle Tso <kyletso@...gle.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Hans de Goede <hdegoede@...hat.com>, robh+dt@...nel.org,
        Badhri Jagan Sridharan <badhri@...gle.com>,
        USB <linux-usb@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH v4 3/8] usb: pd: Make SVDM Version configurable in VDM header

On Tue, Feb 2, 2021 at 10:50 PM Guenter Roeck <linux@...ck-us.net> wrote:
>
> On 2/2/21 1:33 AM, Kyle Tso wrote:
> > PD Rev 3.0 introduces SVDM Version 2.0. This patch makes the field
> > configuable in the header in order to be able to be compatible with
> > older SVDM version.
> >
> > Signed-off-by: Kyle Tso <kyletso@...gle.com>
> > ---
> >  include/linux/usb/pd_vdo.h | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/linux/usb/pd_vdo.h b/include/linux/usb/pd_vdo.h
> > index e9b6822c54c2..69ed6929ce6e 100644
> > --- a/include/linux/usb/pd_vdo.h
> > +++ b/include/linux/usb/pd_vdo.h
> > @@ -21,22 +21,24 @@
> >   * ----------
> >   * <31:16>  :: SVID
> >   * <15>     :: VDM type ( 1b == structured, 0b == unstructured )
> > - * <14:13>  :: Structured VDM version (can only be 00 == 1.0 currently)
> > + * <14:13>  :: Structured VDM version
> >   * <12:11>  :: reserved
> >   * <10:8>   :: object position (1-7 valid ... used for enter/exit mode only)
> >   * <7:6>    :: command type (SVDM only?)
> >   * <5>      :: reserved (SVDM), command type (UVDM)
> >   * <4:0>    :: command
> >   */
> > -#define VDO(vid, type, custom)                               \
> > +#define VDO(vid, type, ver, custom)                  \
> >       (((vid) << 16) |                                \
> >        ((type) << 15) |                               \
> > +      ((ver) << 13) |                                \
> >        ((custom) & 0x7FFF))
> >
>
> Yu have to fix all users of VDO() as well, or the code will
> no longer compile after this patch.
>
> Guenter
>
That's right!
Fix incoming...

thanks,
Kyle

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ