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: <20180525134023.GJ3116@snc-desk>
Date:   Fri, 25 May 2018 19:10:23 +0530
From:   Shreyas NC <shreyas.nc@...el.com>
To:     Guenter Roeck <groeck@...gle.com>
Cc:     pierre-louis.bossart@...ux.intel.com, alsa-devel@...a-project.org,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        "Patel, Chintan M" <chintan.m.patel@...el.com>,
        Guenter Roeck <groeck@...omium.org>
Subject: Re: [alsa-devel] [RFC/RFT PATCH] ASoC: topology: Improve backwards
 compatibility with v4 topology files

> > > +struct skl_dfw_v4_pipe {
> > > +     u8 pipe_id;
> > > +     u8 pipe_priority;
> > > +     u16 conn_type:4;
> > > +     u16 rsvd:4;
> > > +     u16 memory_pages:8;
> > > +} __packed;
> > > +
> > > +struct skl_dfw_v4_module {
> > > +     char uuid[SKL_UUID_STR_SZ];
> > > +

Any reason to not have this as u8?
commit 09305da97c7808b900985526aa9198233f32fb37 had changed this to u8..

<snip>

> > > +
> > > +     mconfig->params_fixup = dfw->params_fixup;
> > > +     mconfig->converter = dfw->converter;
> > > +     mconfig->m_type = dfw->module_type;
> > > +     mconfig->vbus_id = dfw->vbus_id;
> > > +     mconfig->module->resources[0].is_pages = dfw->mem_pages;
> > > +
> > > +     ret = skl_tplg_add_pipe_v4(dev, mconfig, skl, &dfw->pipe);
> > > +     if (ret)
> > > +             return ret;
> > > +
> > > +     mconfig->dev_type = dfw->dev_type;
> > > +     mconfig->hw_conn_type = dfw->hw_conn_type;
> > > +     mconfig->time_slot = dfw->time_slot;
> > > +     mconfig->formats_config.caps_size = dfw->caps.caps_size;
> 
> > chromeos-3.18 has this:
> >       if (dfw_config->is_loadable)
> >           memcpy(mconfig->guid, dfw_config->uuid,
> >                       ARRAY_SIZE(dfw_config->uuid));
> 
> > Is this needed here?
> 
> 
> Direct memcpy doesn't work anymore since the uuid format is different. The
> above is replaced
> with (unconditional)
> 
>          ret = guid_parse(dfw->uuid, (guid_t *)mconfig->guid);
>          if (ret)
>                  return ret;
> 
> at the beginning of skl_tplg_get_pvt_data_v4(). The new code, as far as I
> can see, loads
> the uuid unconditionally if it finds SND_SOC_TPLG_TUPLE_TYPE_UUID. I wanted
> to
> be on the safe side and decided to do the same.
> 

In the new code, still does a memcpy(). So, I am not sure if I understand
why memcpy() does not work.

        if (uuid_tkn->token == SKL_TKN_UUID) {
                memcpy(guid, &uuid_tkn->uuid, 16);
                return 0;
        }

Replied on the older mail since Pierre had a similar question as well.

--Shreyas

-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ