lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] remoteproc: imx_dsp_rproc: use common rproc_elf_load_segments
On Wed, Apr 6, 2022 at 1:58 PM Peng Fan <peng.fan@nxp.com> wrote:
>
> > Subject: Re: [PATCH 2/2] remoteproc: imx_dsp_rproc: use common
> > rproc_elf_load_segments
> >
> > On Thu, Mar 24, 2022 at 1:34 AM Peng Fan (OSS) <peng.fan@oss.nxp.com>
> > wrote:
> > >
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > remoteproc elf loader supports the specific case that segments have
> > > PT_LOAD and memsz/filesz set to zero, so no duplicate code.
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >
> > I think this change OK, but we have a case with the DSP were reads/writes
> > should be done in multiples of 32/64.
> >
> > We need a way to provide our own "memcpy" function to be used by
> > rproc_elf_load_segments.
>
> I think when generating elf file, the sections needs to be 32/64bits aligned.

Sure, that could be a fix. But some malicious user can crash the kernel
by crafting an elf with unaligned sections.

\
 
 \ /
  Last update: 2022-04-06 15:51    [W:0.107 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site