From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753406AbdJHInk (ORCPT ); Sun, 8 Oct 2017 04:43:40 -0400 Received: from ozlabs.org ([103.22.144.67]:41241 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751789AbdJHIni (ORCPT ); Sun, 8 Oct 2017 04:43:38 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 186b8f1587c79c2fa04bfa392fdf084443e398c1 In-Reply-To: <20170928133340.19312-1-seth.forshee@canonical.com> To: Seth Forshee , Benjamin Herrenschmidt , Paul Mackerras From: Michael Ellerman Cc: Seth Forshee , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: powerpc: Always initialize input array when calling epapr_hypercall() Message-Id: <3y8xjh6CPKz9t5C@ozlabs.org> Date: Sun, 8 Oct 2017 19:43:36 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-09-28 at 13:33:39 UTC, Seth Forshee wrote: > Several callers to epapr_hypercall() pass an uninitialized stack > allocated array for the input arguments, presumably because they > have no input arguments. However this can produce errors like > this one > > arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized] > unsigned long register r3 asm("r3") = in[0]; > ~~^~~ > > Fix callers to this function to always zero-initialize the input > arguments array to prevent this. > > Signed-off-by: Seth Forshee Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/186b8f1587c79c2fa04bfa392fdf08 cheers