Re: [PATCH 2/2] ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up

2019-08-08 Thread Michal Simek
On 06. 08. 19 14:49, Luis Araneda wrote:
> Hi Michal,
> 
> On Tue, Aug 6, 2019 at 2:42 AM Michal Simek  wrote:
>> On 06. 08. 19 5:07, Luis Araneda wrote:
>>> This fixes a kernel panic (read overflow) on memcpy when
>>> FORTIFY_SOURCE is enabled.
>>>
>>> The computed size of memcpy args are:
>>> - p_size (dst): 4294967295 = (size_t) -1
>>> - q_size (src): 1
>>> - size (len): 8
>>>
>>> Additionally, the memory is marked as __iomem, so one of
>>> the memcpy_* functions should be used for read/write
>>>
>>> Signed-off-by: Luis Araneda 
> [...]
>> I would consider this one as stable material. Please also add there link
>> to the patch which this patch fixes.
> 
> I'm dropping stable CC (for now), as I'm not sure I completely
> understood the process for inclusion in stable trees.
> Do I have to wait for the patch to be on Linus' tree before CCing stable?

just put Cc: to commit message and they will pick it up.

> 
> As for the link which this patch fixes, you mean
> aa7eb2bb4e4a22e41bbe4612ff46e5885b13c33e (arm: zynq: Add smp support)?
> where you added SMP support for zynq.

yes but make sha1 only 12char long.

M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 2/2] ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up

2019-08-06 Thread Luis Araneda
Hi Michal,

On Tue, Aug 6, 2019 at 2:42 AM Michal Simek  wrote:
> On 06. 08. 19 5:07, Luis Araneda wrote:
> > This fixes a kernel panic (read overflow) on memcpy when
> > FORTIFY_SOURCE is enabled.
> >
> > The computed size of memcpy args are:
> > - p_size (dst): 4294967295 = (size_t) -1
> > - q_size (src): 1
> > - size (len): 8
> >
> > Additionally, the memory is marked as __iomem, so one of
> > the memcpy_* functions should be used for read/write
> >
> > Signed-off-by: Luis Araneda 
[...]
> I would consider this one as stable material. Please also add there link
> to the patch which this patch fixes.

I'm dropping stable CC (for now), as I'm not sure I completely
understood the process for inclusion in stable trees.
Do I have to wait for the patch to be on Linus' tree before CCing stable?

As for the link which this patch fixes, you mean
aa7eb2bb4e4a22e41bbe4612ff46e5885b13c33e (arm: zynq: Add smp support)?
where you added SMP support for zynq.

Thanks,
Luis Araneda.


Re: [PATCH 2/2] ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up

2019-08-06 Thread Michal Simek
On 06. 08. 19 5:07, Luis Araneda wrote:
> This fixes a kernel panic (read overflow) on memcpy when
> FORTIFY_SOURCE is enabled.
> 
> The computed size of memcpy args are:
> - p_size (dst): 4294967295 = (size_t) -1
> - q_size (src): 1
> - size (len): 8
> 
> Additionally, the memory is marked as __iomem, so one of
> the memcpy_* functions should be used for read/write
> 
> Signed-off-by: Luis Araneda 
> ---
>  arch/arm/mach-zynq/platsmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
> index 38728badabd4..a10085be9073 100644
> --- a/arch/arm/mach-zynq/platsmp.c
> +++ b/arch/arm/mach-zynq/platsmp.c
> @@ -57,7 +57,7 @@ int zynq_cpun_start(u32 address, int cpu)
>   * 0x4: Jump by mov instruction
>   * 0x8: Jumping address
>   */
> - memcpy((__force void *)zero, _secondary_trampoline,
> + memcpy_toio(zero, _secondary_trampoline,
>   trampoline_size);
>   writel(address, zero + trampoline_size);
>  

I would consider this one as stable material. Please also add there link
to the patch which this patch fixes.

M





Re: [PATCH 2/2] ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up

2019-08-05 Thread Greg KH
On Mon, Aug 05, 2019 at 11:07:18PM -0400, Luis Araneda wrote:
> This fixes a kernel panic (read overflow) on memcpy when
> FORTIFY_SOURCE is enabled.
> 
> The computed size of memcpy args are:
> - p_size (dst): 4294967295 = (size_t) -1
> - q_size (src): 1
> - size (len): 8
> 
> Additionally, the memory is marked as __iomem, so one of
> the memcpy_* functions should be used for read/write
> 
> Signed-off-by: Luis Araneda 
> ---
>  arch/arm/mach-zynq/platsmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)



This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.