Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: pierre-louis.bossart@linux.intel.com,
	alsa-devel@alsa-project.org, andriy.shevchenko@intel.com,
	filip.kaczmarski@intel.com, harshapriya.n@intel.com,
	marcin.barlik@intel.com, zwisler@google.com, lgirdwood@gmail.com,
	tiwai@suse.com, filip.proborszcz@intel.com,
	michal.wasko@intel.com, cujomalainey@chromium.org,
	ppapierkowski@habana.ai, vamshi.krishna.gopal@intel.com
Subject: Re: [PATCH 08/13] ASoC: Intel: catpt: Simple sysfs attributes
Date: Mon, 10 Aug 2020 09:17:59 +0200	[thread overview]
Message-ID: <3bdc0af0-5b12-cc4e-1d67-7db70e97e035@intel.com> (raw)
In-Reply-To: <20200807150058.GM5435@sirena.org.uk>

On 2020-08-07 5:00 PM, Mark Brown wrote:
> On Fri, Aug 07, 2020 at 01:06:44PM +0200, Cezary Rojewski wrote:
> 
>> +// SPDX-License-Identifier: GPL-2.0-pcm
> 
> I'm not able to find any references to what license this is - it's not
> in https://spdx.org/licenses/ for example.
> 

Indeed. this is a mistake. Will fix in v2.

>> +	struct catpt_fw_version version;
>> +	int ret;
>> +
>> +	pm_runtime_get_sync(cdev->dev);
>> +
>> +	ret = catpt_ipc_get_fw_version(cdev, &version);
>> +
>> +	pm_runtime_mark_last_busy(cdev->dev);
>> +	pm_runtime_put_autosuspend(cdev->dev);
>> +
>> +	if (ret)
>> +		return CATPT_IPC_ERROR(ret);
>> +
>> +	memcpy(buf, &version, count);
> 
> This will copy count bytes from version regardless of the size of
> version - this allows userspace to read the stack and won't truncate the
> count to the size of the data read.
> 

Good catch Mark. Ack.

  reply	other threads:[~2020-08-10  7:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 11:06 [PATCH 00/13] ASoC: Intel: Catpt - Lynx and Wildcat point Cezary Rojewski
2020-08-07 11:06 ` [PATCH 01/13] ASoC: Intel: Add catpt device Cezary Rojewski
2020-08-08 11:50   ` Andy Shevchenko
2020-08-11 10:04     ` Cezary Rojewski
2020-08-07 11:06 ` [PATCH 02/13] ASoC: Intel: catpt: Define DSP operations Cezary Rojewski
2020-08-07 11:06 ` [PATCH 03/13] ASoC: Intel: catpt: Firmware loading and context restore Cezary Rojewski
2020-08-07 11:06 ` [PATCH 04/13] ASoC: Intel: catpt: Implement IPC protocol Cezary Rojewski
2020-08-07 11:06 ` [PATCH 05/13] ASoC: Intel: catpt: Add IPC messages Cezary Rojewski
2020-08-07 11:06 ` [PATCH 06/13] ASoC: Intel: catpt: PCM operations Cezary Rojewski
2020-08-07 11:06 ` [PATCH 07/13] ASoC: Intel: catpt: Event tracing Cezary Rojewski
2020-08-07 15:09   ` Mark Brown
2020-08-10  7:16     ` Cezary Rojewski
2020-08-11  7:30       ` Cezary Rojewski
2020-08-11  9:40         ` Mark Brown
2020-08-07 11:06 ` [PATCH 08/13] ASoC: Intel: catpt: Simple sysfs attributes Cezary Rojewski
2020-08-07 15:00   ` Mark Brown
2020-08-10  7:17     ` Cezary Rojewski [this message]
2020-08-07 11:06 ` [PATCH 09/13] ASoC: Intel: Select catpt and deprecate haswell Cezary Rojewski
2020-08-07 11:06 ` [PATCH 10/13] ASoC: Intel: haswell: Remove haswell-solution specific code Cezary Rojewski
2020-08-07 11:06 ` [PATCH 11/13] ASoC: Intel: broadwell: " Cezary Rojewski
2020-08-07 11:06 ` [PATCH 12/13] ASoC: Intel: bdw-5650: " Cezary Rojewski
2020-08-07 11:06 ` [PATCH 13/13] ASoC: Intel: bdw-5677: " Cezary Rojewski
2020-08-07 11:09 ` [PATCH 00/13] ASoC: Intel: Catpt - Lynx and Wildcat point Cezary Rojewski
2020-08-07 13:05 ` Amadeusz Sławiński

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bdc0af0-5b12-cc4e-1d67-7db70e97e035@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@chromium.org \
    --cc=filip.kaczmarski@intel.com \
    --cc=filip.proborszcz@intel.com \
    --cc=harshapriya.n@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=marcin.barlik@intel.com \
    --cc=michal.wasko@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ppapierkowski@habana.ai \
    --cc=tiwai@suse.com \
    --cc=vamshi.krishna.gopal@intel.com \
    --cc=zwisler@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox