Date: Wed, 12 Dec 2018 12:23:33 +0100
From: Takashi Iwai <tiwai@xxxxxxx>
To: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Cc: alsa-devel@xxxxxxxxxxxxxxxx, andriy.shevchenko@xxxxxxxxx, Daniel
Baluta <daniel.baluta@xxxxxxxxx>, liam.r.girdwood@xxxxxxxxxxxxxxx,
vkoul@xxxxxxxxxx, broonie@xxxxxxxxxx, Alan Cox <alan@xxxxxxxxxxxxxxx>,
sound-open-firmware@xxxxxxxxxxxxxxxx
Subject: Re: [PATCH v3 09/14] ASoC: SOF: Add firmware
loader support
Message-ID: <s5htvjjj8ei.wl-tiwai@xxxxxxx>
Content-Type: text/plain; charset=US-ASCII
On Tue, 11 Dec 2018 22:23:13 +0100,
Pierre-Louis Bossart wrote:
+
+ snd_sof_dsp_block_write(sdev, offset,
+ (void *)block + sizeof(*block),
+ block->size);
+
+ /* next block */
+ block = (void *)block + sizeof(*block) + block->size;
This may lead to an unaligned access.
Did you mean we should double check the block->size to
prevent access to an invalid address?
Also how is the endianess guaranteed?
Did you mean we should guarantee the driver can work no
matter what kernel's endianess is?
ie. Use le32_to_cpu() to handle it?
thanks,
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel