From patchwork Thu Dec 19 18:31:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182162 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp858086iln; Thu, 19 Dec 2019 10:43:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxuGrboTN6Z9QrH7sQDWSmx1YNgkn/crR7syWRL6XX/t4sicf+Mi0hsYo3SpMTpkAqkcYMg X-Received: by 2002:a9d:6f0a:: with SMTP id n10mr10682877otq.54.1576780994034; Thu, 19 Dec 2019 10:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576780994; cv=none; d=google.com; s=arc-20160816; b=kuaJpKaSvJni1EMQUsS5M7yMdJWEceX4z5UnJ4Om82smqxCVGcGoxZykRwgC5eXb+S FJJpZ/OUVO7ZWr93vtcglwHQv5dm17KGJ3Wmzxeb67c7vRTHW4FZ4uIHJ2RIy6DBEZS9 r/TQ2QFXKvtylQpni9KYmkWPiZ0H2kZ3sQmryDUWgpjYYbe2TGWvs9pL3s5MdRqHpStu yiq97SV147ERFc6PliSHDSqPYNRxWbOrKmmCL6pR0aRGbbvchW5jpEvSIJFCUW7YCh1S xMATp8g9yJMVOzHdykI8jEak9uhnN05Cl33kGJCRbIqA94mM3ukyTAE4FKQkwKCosN5I xeyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qgmk4pNCnag+gvIFjGQ8Kp6lhpc+c+sTvDPy7pJt5EI=; b=R9W0Sd7XPjXivFOoblGGd4ZXPLtyvdXcHaO/PHtnqPxjNJC9PcxlKPNqdoieIowpAm cWX0c00eVWgdRijmLe74eygq+Qt3JXtqLVcv/a8SkuIB8DRWIrknKM+CWbJr1kwek7qI 6QFN386XAZGLQ7qFk1MAfFRFcl9rfbKsdFJ5+J6gW1qZ7LoR/KiuYA4iRDTd1V7qvT/G 1AFXOn3fjv3NteGdjRvO1UTruLkdEj3bJViO832fUXqJ3WzHSqjTLPEOzMfFSVAu5O12 06A77SF5YiPnraTaHNcRCeYzifDwi40uoUJ/CsmA3caNX08LSXbns4OXvGL7N+zC2ohl T2jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CiRn4LMc; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si2473264otm.165.2019.12.19.10.43.13; Thu, 19 Dec 2019 10:43:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CiRn4LMc; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728387AbfLSSnM (ORCPT + 14 others); Thu, 19 Dec 2019 13:43:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:34682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728002AbfLSSnK (ORCPT ); Thu, 19 Dec 2019 13:43:10 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3B08124672; Thu, 19 Dec 2019 18:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576780989; bh=zDW9b2/pZe+ctZdj3Mjiww5eCHoqpYII5WQley0EyZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CiRn4LMcTOCXX7MqhSmsLC8ihV1TqTX4qEHUdgoO1troleZt+8Lw+ckxvgX0EMjVy ILLMtYpG3nfvjbEVa2ZGnskMMmNA/hO84vivE32OQ2aIkaeOgBF7b0qd6ss/xcDioV eZCQOM93tNE7ZwUMPexDaKV/l90mKVfWp5BM1eDY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 4.9 036/199] ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module Date: Thu, 19 Dec 2019 19:31:58 +0100 Message-Id: <20191219183216.911380403@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Szyprowski [ Upstream commit 6035cbcceb069f87296b3cd0bc4736ad5618bf47 ] DWC2 hardware module integrated in Samsung SoCs requires some quirks to operate properly, so use Samsung SoC specific compatible to notify driver to apply respective fixes. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- arch/arm/boot/dts/exynos3250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi index 51dbd8cb91cb5..99b3d23319719 100644 --- a/arch/arm/boot/dts/exynos3250.dtsi +++ b/arch/arm/boot/dts/exynos3250.dtsi @@ -345,7 +345,7 @@ }; hsotg: hsotg@12480000 { - compatible = "snps,dwc2"; + compatible = "samsung,s3c6400-hsotg", "snps,dwc2"; reg = <0x12480000 0x20000>; interrupts = <0 141 0>; clocks = <&cmu CLK_USBOTG>; From patchwork Thu Dec 19 18:32:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182163 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp858428iln; Thu, 19 Dec 2019 10:43:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzP65rdMVgg4xutHic8O8tT06HDBYuaAlu6xwofrL1/vZhRcaS5mYVkZ4osll9Krf3sKaVW X-Received: by 2002:a9d:21f4:: with SMTP id s107mr8205696otb.102.1576781014477; Thu, 19 Dec 2019 10:43:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781014; cv=none; d=google.com; s=arc-20160816; b=fjomBnxWZh2YqkZgqrjlDpOltHEZjxYKqQv7sS+/gy/3AmKcnsLIDL3vsq1o3qnE2V qfnW1aldHXufTt+xwlWxPAdUciGJ/DioWsB3C1UntPewUpIzDLAD/PgT219q5DQP1dR4 qTtrMZ7XKSewdCSwlX2B2iXSa1e3NcKy91VE8byXGf6c3DE4PQfgUnMZHgh6rkq2rR7R iNd0mucJzYDAG5bCIqqkrIJ6Q/+F+Ebk9aCWF9L+8hym7XxupfhfMuWRKEMJ2Q8uZw3P doRv2hd9anHf3Hir+yy3fl3NOj6vHipddgiGsA+yN8WWYl2QijYAPD2SP1dfShHLu+I+ wzTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tNX3boPItiqeUyFYqEFkIj2tOBwBKCUoqGW4W3JyoHA=; b=RAq9NCKSHtDevUrUolw7UvJCLMIEAKK8qABkmSkpG/5MUH8HzQeMAp+58ncJUVWVDe fdqG/mLSa4MWA+EierJrZOO7h/IU7yBEcc5xJnJ5Yg5OeLROordAlk8PWubXYjbh18Jr U1z8/fopdbUztXzgblr3IxweJi7xErT35XdBU2fdbV7RTw4pInq7+2RQ2K1E1yoZo4sp ee5r6m/j5Kjp5SZJyEjmEdN20+gIO4v2cwvfiaA5Nqfq7VU2t/mT0u8hh5iaiYfOXKAq fuEQwojN1XaLDyI4MWyhjehuuGBFgZe5zRUyOYKlfQYq2gm2xG23GeD/PLGx/32sQ1jr tzeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d7iy2VwC; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si3520304otc.130.2019.12.19.10.43.34; Thu, 19 Dec 2019 10:43:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d7iy2VwC; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728377AbfLSSnc (ORCPT + 14 others); Thu, 19 Dec 2019 13:43:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:35192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728593AbfLSSnc (ORCPT ); Thu, 19 Dec 2019 13:43:32 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FC9A206D7; Thu, 19 Dec 2019 18:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781011; bh=/LUzzBf+Yofy0eimmBq0G62TXMndjXspkVTWifPx2yg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d7iy2VwC/Mabt/f4Rc7X9UhaKWZmo5mS98YYNbRbqn+KHSRzonRpDnx5CAFUPF/ys CbVrhivYEDuecKnekVo5DWGYxbbcV6gyjgIEQgQ2dyuxAadKukyWD/83KdbRkaJ7ki R9gYq5lQOViu97Z9sCdTQro8fqguy1jmj5TTd/Xw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Rothwell , Vinod Koul Subject: [PATCH 4.9 039/199] dmaengine: coh901318: Remove unused variable Date: Thu, 19 Dec 2019 19:32:01 +0100 Message-Id: <20191219183217.081976972@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Vinod Koul commit 35faaf0df42d285b40f8a6310afbe096720f7758 upstream. Commit 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug") left flags variable unused, so remove it to fix the warning. drivers/dma/coh901318.c: In function 'coh901318_config': drivers/dma/coh901318.c:1805:16: warning: unused variable 'flags' [-Wunused-variable] unsigned long flags; ^~~~~ Fixes: 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug") Reported-By: Stephen Rothwell Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/coh901318.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -1797,7 +1797,6 @@ static struct dma_chan *coh901318_xlate( static int coh901318_config(struct coh901318_chan *cohc, struct coh901318_params *param) { - unsigned long flags; const struct coh901318_params *p; int channel = cohc->id; void __iomem *virtbase = cohc->base->virtbase; From patchwork Thu Dec 19 18:32:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182165 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp858833iln; Thu, 19 Dec 2019 10:43:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxXq6f2AC2a3REUBjnJOUKB/j4exL7E4Q72g9M4nziz63Wz8doJc9FJbsq3Cr3efJ6iOAA4 X-Received: by 2002:a05:6830:2099:: with SMTP id y25mr9930430otq.87.1576781038631; Thu, 19 Dec 2019 10:43:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781038; cv=none; d=google.com; s=arc-20160816; b=GSgPmi06Ns1oi9jVGIjWzG229IoI18ivgITtlfwAOz0VSRNbG6Dak+26ZzRyAjGkOi jnCtyM31XN6MuH7Ji5H2yOoDJJW8JGdAB0UpMesYYrsNFNNxGi2HLFG3fJB69VfExW9n AU8cTGIjNgmI6iktEgZL5OOlMtVH8sMRFC9wtDqCxSxCR+Xm2jEAp2bmrOL8y2v/Onf6 HZNFJ05I8H5iUjmLSGZ8yhyiYIsY+fZToEIZj9+4HyH+dBx3fUyCkrRIpVQGohpa7A1X tpIjBNHjK0c8pVcwXUW3gp4ff3W3yrTWDCURD/n12gWcisooya3bpUUz2x5FuL7QDki0 ahOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PqkM/3z6HLcxEC5eFmElEDFH+B2Mpbc5hvvzpeKGFrA=; b=v6HPHfUqlxgA0ObTzgGoAOiQ8pwKUDFKZf/Lc8JxXJxSJQwdmukw/S5LHSWF+qS2GH kQg8paVQF9+e73Oaue332d8YlrzR2tDp8jE+AD0kYfuoTcczWWqIga5KQy4P/lfAzA9M 7PIBoLhm15vIAKVGCinfAJPgu+KeuBNeecdxigBVoXPJ0fQlgHP1vyJdYt8CR0M6ooUk L4t0jY0xyTS3rIk6MXn7u7JXdkTBTG+sx/KYYT5FNuj3e3q4t3vM5PnTfoTtg3Rky21V ZTM9aepZEapJa9MA/tR/Gx7EnDGuL2vq4PEx4gx0L8K2DWcIRxzaxxGKZpeGVt6Fexjt J39A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UxKl6Srn; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22si3729952otq.10.2019.12.19.10.43.58; Thu, 19 Dec 2019 10:43:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UxKl6Srn; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728320AbfLSSn5 (ORCPT + 14 others); Thu, 19 Dec 2019 13:43:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:35792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728923AbfLSSn4 (ORCPT ); Thu, 19 Dec 2019 13:43:56 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2930C222C2; Thu, 19 Dec 2019 18:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781036; bh=5c+/LOE4VJVhhZOOjd+xD/vKB1b/odbuOaqjEBdegP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UxKl6SrnktfWnF9log1T/B+97jvRGwCSrcQhOKKtaT0uWHBW3DIpk++DegTnOa5/M kdpZHBY6JqWuZS31bL/d00er/gqMdECS9sKyg3Nm9o6D8vD9z8ftwyGZ8GrhsDQRGi jBjWgWcvzsB1c8uDf+IUpc1DDkIHgYFMjgHkq3ME= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Sasha Levin Subject: [PATCH 4.9 057/199] kbuild: fix single target build for external module Date: Thu, 19 Dec 2019 19:32:19 +0100 Message-Id: <20191219183218.120498975@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masahiro Yamada [ Upstream commit e07db28eea38ed4e332b3a89f3995c86b713cb5b ] Building a single target in an external module fails due to missing .tmp_versions directory. For example, $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o will fail in the following way: CC [M] /home/masahiro/foo/foo.o /bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent This is because $(cmd_crmodverdir) is executed only before building /, %/, %.ko single targets of external modules. Create .tmp_versions in the 'prepare' target. Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/Makefile b/Makefile index 55a91bc3d8f9c..6baf1e6324255 100644 --- a/Makefile +++ b/Makefile @@ -1521,9 +1521,6 @@ else # KBUILD_EXTMOD # We are always building modules KBUILD_MODULES := 1 -PHONY += crmodverdir -crmodverdir: - $(cmd_crmodverdir) PHONY += $(objtree)/Module.symvers $(objtree)/Module.symvers: @@ -1535,7 +1532,7 @@ $(objtree)/Module.symvers: module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) PHONY += $(module-dirs) modules -$(module-dirs): crmodverdir $(objtree)/Module.symvers +$(module-dirs): prepare $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs) @@ -1576,7 +1573,8 @@ help: # Dummies... PHONY += prepare scripts -prepare: ; +prepare: + $(cmd_crmodverdir) scripts: ; endif # KBUILD_EXTMOD @@ -1701,17 +1699,14 @@ endif # Modules /: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) # Make sure the latest headers are built for Documentation Documentation/ samples/: headers_install %/: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) %.ko: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost From patchwork Thu Dec 19 18:32:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182167 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp859464iln; Thu, 19 Dec 2019 10:44:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzzKL3g4m8CtHYTkZDImVmT3V/4GiQ0eVtTu6B8rSqCmcxJEKY3uS0r/yzjX1HflOrDMivr X-Received: by 2002:a9d:8f1:: with SMTP id 104mr8063142otf.107.1576781075767; Thu, 19 Dec 2019 10:44:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781075; cv=none; d=google.com; s=arc-20160816; b=NB5hALingcFH0ggRbq6hrpkKqX6bRk5ZSmIhWbmv/ltccCsDhuxyJRK01sN5n23UnQ VbCQBlvfBxr7fEwOhGM0mK2DAYZE0qdkwt0ouftdfIxDicUHvXxr6Z01urMdYLRJjrZA mNg0FTRgZS8UAHUl9pVuSBtCUjKnsz94/oSd0V8e6yggclo/zfyRWvRt0CYh6CjdInGg 4F1DDV207K97bvilfy5JxpXd+VCVpqZQa5rsYgpKrHRnw9EpVJ+pZ4pyihfNbYjwrt9l daW0V7G+0Oqry/eHjdBGJ4y7lcb2jnX4YWNXbPiY1yuryFq96Xib+4/ZO5Y8zfgeHsa5 xzAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OVusCATmcPlaRhsS/xIKhg1VXApxFuTs1KG7i1SGFcg=; b=mu8DIX+Ph4KBevacF6yg/PFZropLh1aXjlCa/rcmWqHxtJid84t+j46AMVNE6bFHf0 GQ8IJj6BB7Fe07+OIFCVETnwdlHWwWO0c1A8YfDLbEeUaQgASe7dRL1Wbb1avn5TmHtf dExeGcLro7tOBqzoJ+zX11+O7euDGAa3okDtfFfpneR+N41iphn0UgqmjQeQrhGeb95t WoEVoQI2/MTnHY30cRuahcrIlfwF0vzRzQvlfDDYOiUeUZWFJWR6zl/hvV2cZ95ZlVE1 UwmHDSbdgHoZ06VQsGjmvqcgFexJkxm7Fg0KGLIvmiw9oJ24Wvs5pLW0p7ss6VCzpw/7 C/tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jJI3eskG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q126si3470880oia.8.2019.12.19.10.44.35; Thu, 19 Dec 2019 10:44:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jJI3eskG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728376AbfLSSoe (ORCPT + 14 others); Thu, 19 Dec 2019 13:44:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:36596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729015AbfLSSod (ORCPT ); Thu, 19 Dec 2019 13:44:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A078224672; Thu, 19 Dec 2019 18:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781073; bh=V2jUsRlq3Dv+MZnM3Ro+bAzdwMYFMhTFt8fR+Zou3Ss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jJI3eskGr1yI6sogbqMGPcgDpbhtSURXNFtkeTaZp8fSmOPRrhjrL6dUvbNKn3sRa 6KqNLvxu58XEpD3hCP3xw1qwFQ/R/D8fP4l+cXDO7ucxaWs3UK2zrPbnRne9xnf7H4 Jik6chEhmt1yUECeOQsHfSI311bstsc+7rM8/hVg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Will Deacon , Sasha Levin Subject: [PATCH 4.9 070/199] ARM: dts: sunxi: Fix PMU compatible strings Date: Thu, 19 Dec 2019 19:32:32 +0100 Message-Id: <20191219183218.866619677@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rob Herring [ Upstream commit 5719ac19fc32d892434939c1756c2f9a8322e6ef ] "arm,cortex-a15-pmu" is not a valid fallback compatible string for an Cortex-A7 PMU, so drop it. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Rob Herring Acked-by: Will Deacon Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- arch/arm/boot/dts/sun6i-a31.dtsi | 2 +- arch/arm/boot/dts/sun7i-a20.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index ce1960453a0bb..3bfa79717dfab 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi @@ -174,7 +174,7 @@ }; pmu { - compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + compatible = "arm,cortex-a7-pmu"; interrupts = , , , diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 94cf5a1c71723..db5d30598ad66 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -172,7 +172,7 @@ }; pmu { - compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + compatible = "arm,cortex-a7-pmu"; interrupts = , ; }; From patchwork Thu Dec 19 18:32:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182168 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp859739iln; Thu, 19 Dec 2019 10:44:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxRL0ObqHwHp0+8o+wz+DtVIrI8+NwbFzjPqbjBPWU4G4aE1eytlXDMY5ALlNT5EOXfkEzg X-Received: by 2002:a9d:6f0a:: with SMTP id n10mr10689940otq.54.1576781092658; Thu, 19 Dec 2019 10:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781092; cv=none; d=google.com; s=arc-20160816; b=tZqe7YC5xXJTlbCoIZdUhmCp5kp5y9DILBX2j/Zxn6DrowE3YzvU8Cqojhm8nI8Nlf HX6WJ6cFasNKrUtB04tSPncgWojU7adM1o4ikE0X4MYd9rc7ik3+bcovBj46AqdbMgUe 3Twni8gqemZ5gILLEd07EBJJO4CcyrGsW5qdvEdB79NMfaL1jNSsU2WvyQwMpnG0KVgx txQCbKMD+jGsyuOut3cp0V4hGn/wZwppP8I/sMYqwSMM3Jd/KOrVbuLPpyDKBDfFcIN8 2AmnpLsdmKiyo3j8CvmebS4ox/f7fz/F4EycZszBsnsgMsQakWQVunbD3TYWK0Fv2+82 VIJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6yDiT31pLTZA5bGI/hzkeEKXQ+0nYjgT2FHD22Vga7Y=; b=K5J5jGYnHJXskzZD+SEBgg+rD59tPCDH1gtuN3nC1Qs9WHms+5m8baOmGOoGknMzH0 S2wCLOW3xqgxQlWIqmpCDW6BV8xUdf/HOP6oPhUdB+5At6cFZ00/sWzwSGJ29NHqUuRP Z4tZTEUQ67ZiVkkfg52qk0J8nu0H9JoZYWkzvvptPGrKk2KiqOzr75+oK0xEh0WuXFmu iqSIt8o04JejL3N+Vl8w989sQYvxo6Wzqbv7Ig3jQDlh2zxU69f7AOqHQwjhJbhIt9cT hrFixdzFM47LEazyI80/ofOCzFVdiqY/e/1c2eRYA2A+2HkdSlVKOjO+OiAMgMA+7A/G izuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kvvfGzjD; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g16si3662061otj.129.2019.12.19.10.44.52; Thu, 19 Dec 2019 10:44:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kvvfGzjD; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728184AbfLSSou (ORCPT + 14 others); Thu, 19 Dec 2019 13:44:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:36916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729057AbfLSSos (ORCPT ); Thu, 19 Dec 2019 13:44:48 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F2E2424672; Thu, 19 Dec 2019 18:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781087; bh=cvPAg9I2YwVLNkWL6x0/cKoqr1AmKIBCDJShQFg1R7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kvvfGzjDcAVAYEeLVESnRUxQP0WhRTwQZkzbCuBW+LpupRdlcHIqB4eqYvtRLt/PL hLdhFht7UnKnNkDZ/4LMDEPWMtH2hyVx4c062nxkyLiTKlcptiNQEG/scwm3nTWLD2 gycpKESXXSgRidWSYZkFXzji5R2SdEmGuTBLqzDk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Mathieu Poirier , Mike Leach Subject: [PATCH 4.9 076/199] coresight: etm4x: Fix input validation for sysfs. Date: Thu, 19 Dec 2019 19:32:38 +0100 Message-Id: <20191219183219.183611335@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mike Leach commit 2fe6899e36aa174abefd017887f9cfe0cb60c43a upstream. A number of issues are fixed relating to sysfs input validation:- 1) bb_ctrl_store() - incorrect compare of bit select field to absolute value. Reworked per ETMv4 specification. 2) seq_event_store() - incorrect mask value - register has two event values. 3) cyc_threshold_store() - must mask with max before checking min otherwise wrapped values can set illegal value below min. 4) res_ctrl_store() - update to mask off all res0 bits. Reviewed-by: Leo Yan Reviewed-by: Mathieu Poirier Signed-off-by: Mike Leach Fixes: a77de2637c9eb ("coresight: etm4x: moving sysFS entries to a dedicated file") Cc: stable # 4.9+ Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -667,10 +667,13 @@ static ssize_t cyc_threshold_store(struc if (kstrtoul(buf, 16, &val)) return -EINVAL; + + /* mask off max threshold before checking min value */ + val &= ETM_CYC_THRESHOLD_MASK; if (val < drvdata->ccitmin) return -EINVAL; - config->ccctlr = val & ETM_CYC_THRESHOLD_MASK; + config->ccctlr = val; return size; } static DEVICE_ATTR_RW(cyc_threshold); @@ -701,14 +704,16 @@ static ssize_t bb_ctrl_store(struct devi return -EINVAL; if (!drvdata->nr_addr_cmp) return -EINVAL; + /* - * Bit[7:0] selects which address range comparator is used for - * branch broadcast control. + * Bit[8] controls include(1) / exclude(0), bits[0-7] select + * individual range comparators. If include then at least 1 + * range must be selected. */ - if (BMVAL(val, 0, 7) > drvdata->nr_addr_cmp) + if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0)) return -EINVAL; - config->bb_ctrl = val; + config->bb_ctrl = val & GENMASK(8, 0); return size; } static DEVICE_ATTR_RW(bb_ctrl); @@ -1341,8 +1346,8 @@ static ssize_t seq_event_store(struct de spin_lock(&drvdata->spinlock); idx = config->seq_idx; - /* RST, bits[7:0] */ - config->seq_ctrl[idx] = val & 0xFF; + /* Seq control has two masks B[15:8] F[7:0] */ + config->seq_ctrl[idx] = val & 0xFFFF; spin_unlock(&drvdata->spinlock); return size; } @@ -1597,7 +1602,7 @@ static ssize_t res_ctrl_store(struct dev if (idx % 2 != 0) /* PAIRINV, bit[21] */ val &= ~BIT(21); - config->res_ctrl[idx] = val; + config->res_ctrl[idx] = val & GENMASK(21, 0); spin_unlock(&drvdata->spinlock); return size; } From patchwork Thu Dec 19 18:32:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182171 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp861643iln; Thu, 19 Dec 2019 10:46:48 -0800 (PST) X-Google-Smtp-Source: APXvYqz9NCwMAThONiilp1pc2PEyakzNVf+BgA4alS3TW/dKYgpCovwc2eop+RPp5e5A9SiN0lex X-Received: by 2002:a05:6830:145:: with SMTP id j5mr9813524otp.242.1576781208132; Thu, 19 Dec 2019 10:46:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781208; cv=none; d=google.com; s=arc-20160816; b=lt28xffGqEooDJ16LmGASSj1cqF1CoNxGn2qM6k4QpdTiqQJVOGlxBaQaERokfFRel Z39uoIyKUcD/g5IYBjaEuP19UaKUI7lRPT3T/Hko36T6Giz37HILUqUelZNy24fCpL7L iFG5g7kL81g1gSlQWlYKwf6MeCVggm/4ngISknWn1kxESa6IrFuBjCQfOzvZPQVpzk5A 0IDjun61yIjZVkJOAUusOVYaPbfEAG1pY+dg+uKZoHd0/4uJZoAA8DIhJRtUT2QomsVD 3AGnP29aWSgvHuGKYPbzNAz1Cuq84EUEKbeF22MNfd3+F7sVgcytTV1On0tbttSnmWOG O6AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pCsLEg7E3yWdz0oy6N8DbyI602VlaIKCEGwZcGqlAEY=; b=v4cUGO8NiGpkbteyHzy2LZk3sT/sz14qP7nzc4L7QCLZFDkuUit8RoicvOK6+lku+K CEVdEds8lcC0HdOpQ3pJpK0AUzXmfrN4zbpUt9wZnAHgFSOi3ZJbmcB4dfl1uAKHCgZa V/b9J043x0xHaxHe3SexCziQYa17bxp9rSCgFvt3lFTZMMoFYMbOmrp92CbIyRy04YWp tm0s0ynJ7dBT9RlDszIt8/DhyeP/ZfG4F6G19iR6L6gD28EdDHrFQWOxpY+vm+a1X5s/ 3L+RF+tD5b1OY4/PPDMpzttSXrmRtPYOAGqV40dKCiUIvYXkNpsxXxbFVoHaG3jRXAFK 8hfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="dz+p/x6/"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 46si3662283otu.45.2019.12.19.10.46.47; Thu, 19 Dec 2019 10:46:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="dz+p/x6/"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729373AbfLSSqq (ORCPT + 14 others); Thu, 19 Dec 2019 13:46:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:39438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbfLSSqn (ORCPT ); Thu, 19 Dec 2019 13:46:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 643E124676; Thu, 19 Dec 2019 18:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781201; bh=5Q8ef8tjuHuf0kMqNot+Fh9TOq/CFHB91XyZiKLMHGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dz+p/x6/P3XLYMUc1t/PiVXyOUkgz8hf/K2PGRM7L8jusRHTzBWAfBBsqHhbMai6M woXB4aBC6m3rFNbzGoxv11mK6efqsyXhstUrEIcjG0HgCH0aQY0zSJpTOBKbNmm8vG oKTW7sn12350uCthGJQpwFB03GsyuueKV3Fa6e+M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sahaj Sarup , Mark Salter , Gary R Hook , Herbert Xu Subject: [PATCH 4.9 087/199] crypto: ccp - fix uninitialized list head Date: Thu, 19 Dec 2019 19:32:49 +0100 Message-Id: <20191219183219.757570137@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mark Salter commit 691505a803a7f223b2af621848d581259c61f77d upstream. A NULL-pointer dereference was reported in fedora bz#1762199 while reshaping a raid6 array after adding a fifth drive to an existing array. [ 47.343549] md/raid:md0: raid level 6 active with 3 out of 5 devices, algorithm 2 [ 47.804017] md0: detected capacity change from 0 to 7885289422848 [ 47.822083] Unable to handle kernel read from unreadable memory at virtual address 0000000000000000 ... [ 47.940477] CPU: 1 PID: 14210 Comm: md0_raid6 Tainted: G W 5.2.18-200.fc30.aarch64 #1 [ 47.949594] Hardware name: AMD Overdrive/Supercharger/To be filled by O.E.M., BIOS ROD1002C 04/08/2016 [ 47.958886] pstate: 00400085 (nzcv daIf +PAN -UAO) [ 47.963668] pc : __list_del_entry_valid+0x2c/0xa8 [ 47.968366] lr : ccp_tx_submit+0x84/0x168 [ccp] [ 47.972882] sp : ffff00001369b970 [ 47.976184] x29: ffff00001369b970 x28: ffff00001369bdb8 [ 47.981483] x27: 00000000ffffffff x26: ffff8003b758af70 [ 47.986782] x25: ffff8003b758b2d8 x24: ffff8003e6245818 [ 47.992080] x23: 0000000000000000 x22: ffff8003e62450c0 [ 47.997379] x21: ffff8003dfd6add8 x20: 0000000000000003 [ 48.002678] x19: ffff8003e6245100 x18: 0000000000000000 [ 48.007976] x17: 0000000000000000 x16: 0000000000000000 [ 48.013274] x15: 0000000000000000 x14: 0000000000000000 [ 48.018572] x13: ffff7e000ef83a00 x12: 0000000000000001 [ 48.023870] x11: ffff000010eff998 x10: 00000000000019a0 [ 48.029169] x9 : 0000000000000000 x8 : ffff8003e6245180 [ 48.034467] x7 : 0000000000000000 x6 : 000000000000003f [ 48.039766] x5 : 0000000000000040 x4 : ffff8003e0145080 [ 48.045064] x3 : dead000000000200 x2 : 0000000000000000 [ 48.050362] x1 : 0000000000000000 x0 : ffff8003e62450c0 [ 48.055660] Call trace: [ 48.058095] __list_del_entry_valid+0x2c/0xa8 [ 48.062442] ccp_tx_submit+0x84/0x168 [ccp] [ 48.066615] async_tx_submit+0x224/0x368 [async_tx] [ 48.071480] async_trigger_callback+0x68/0xfc [async_tx] [ 48.076784] ops_run_biofill+0x178/0x1e8 [raid456] [ 48.081566] raid_run_ops+0x248/0x818 [raid456] [ 48.086086] handle_stripe+0x864/0x1208 [raid456] [ 48.090781] handle_active_stripes.isra.0+0xb0/0x278 [raid456] [ 48.096604] raid5d+0x378/0x618 [raid456] [ 48.100602] md_thread+0xa0/0x150 [ 48.103905] kthread+0x104/0x130 [ 48.107122] ret_from_fork+0x10/0x18 [ 48.110686] Code: d2804003 f2fbd5a3 eb03003f 54000320 (f9400021) [ 48.116766] ---[ end trace 23f390a527f7ad77 ]--- ccp_tx_submit is passed a dma_async_tx_descriptor which is contained in a ccp_dma_desc and adds it to a ccp channel's pending list: list_del(&desc->entry); list_add_tail(&desc->entry, &chan->pending); The problem is that desc->entry may be uninitialized in the async_trigger_callback path where the descriptor was gotten from ccp_prep_dma_interrupt which got it from ccp_alloc_dma_desc which doesn't initialize the desc->entry list head. So, just initialize the list head to avoid the problem. Cc: Reported-by: Sahaj Sarup Signed-off-by: Mark Salter Acked-by: Gary R Hook Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccp/ccp-dmaengine.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -309,6 +309,7 @@ static struct ccp_dma_desc *ccp_alloc_dm desc->tx_desc.flags = flags; desc->tx_desc.tx_submit = ccp_tx_submit; desc->ccp = chan->ccp; + INIT_LIST_HEAD(&desc->entry); INIT_LIST_HEAD(&desc->pending); INIT_LIST_HEAD(&desc->active); desc->status = DMA_IN_PROGRESS; From patchwork Thu Dec 19 18:32:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182170 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp861624iln; Thu, 19 Dec 2019 10:46:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwNbMXViaTXrfaAJVZXO6FLA891/jP6/yEfI+S+KKoZ4XnXncAZrBG+AzWC17EB/dklxkKT X-Received: by 2002:a9d:6211:: with SMTP id g17mr7852921otj.168.1576781207132; Thu, 19 Dec 2019 10:46:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781207; cv=none; d=google.com; s=arc-20160816; b=jMVwMjS/BtIp22STJV9oWP5MGrluUZzjWjYSE5xTi+nqVq1sDpj3B3KZnv1crsH8YA BljXqoh6jEMHWQ8ZV3GM+Qv9phL0TVOJj8qa6179RNxV1UCaqnko8KtaUYc43cob9VGl EW0/g32pt//Oy+G4RJ8qFO4TaJBnPp83z6He4/kUdFAS0shmzcegDDYCmelZolTwCwli onVnYyEcbyk7hFVlPwFjmKkd0YYSGD4xGimsZ64hwj3v33ZBiRYmfSMF496dXs6WlQdN NuiwWKCqALH8Rj2j++iFqq5OO9X0Rr/NqCc9c2XTqJyOQziB2qrhAAktVg1XJesm0zIs 214A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A6FYs/Ka0SbJ486xj+Er9mSWSAYR/oIOCQaKBPp/qts=; b=Kj8kxCV5yBSzR52zqaufr23r1Rrd8Z22Oory4gOf+EI96ZPiQfxcyFhBXcQVQ6pL3A B1YFzGd+UlXi3/TnqA4Lsq06sW9gik5Q961PPCcm2MN1NOpaM2GRuDvpK87U4uaYnqxv mCagKed9pgXE2etxfkUhJjUdevdbtb70p2mXw+ufP3NR+Eyi0a5a0ewdrbt8IHirnfLF VPALKWlD4h+B5k1udJ6zwEq7n75j8OzV9bnOvEYidp38rN6qs8VCYrkQbLL9CcX0Hl2Q eahtFgVy3DaGerMicgKwcvzkVsekpdKw0FFGyNjheWeWqMAYnGeys8nIX6LPRsgAmOot Gmwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="GnQ/pz/j"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 46si3662283otu.45.2019.12.19.10.46.46; Thu, 19 Dec 2019 10:46:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="GnQ/pz/j"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729095AbfLSSqq (ORCPT + 14 others); Thu, 19 Dec 2019 13:46:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:39496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729371AbfLSSqo (ORCPT ); Thu, 19 Dec 2019 13:46:44 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D0109222C2; Thu, 19 Dec 2019 18:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781204; bh=XQ8ixBV1OwmvAx4bXVDtEJXlvNN41KaE6IvDZ7Ew5Rc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GnQ/pz/jCCC/BvTST1tkD1+hcfm+4cbio+3OhvDq478i2Pvhr6hk/DpNNWMltVAWZ umuAdqwBlg4T3p6yT/UpqKsMyU4wKsOa2R6yXL+6G2qbeR9kZW5gfDqv61xu9Mr1KI JfydZ6pM3qEzuVxgt7DNgHnIZvJuKJNTsJW6VpLY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Herbert Xu Subject: [PATCH 4.9 088/199] crypto: ecdh - fix big endian bug in ECC library Date: Thu, 19 Dec 2019 19:32:50 +0100 Message-Id: <20191219183219.809163370@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ard Biesheuvel commit f398243e9fd6a3a059c1ea7b380c40628dbf0c61 upstream. The elliptic curve arithmetic library used by the EC-DH KPP implementation assumes big endian byte order, and unconditionally reverses the byte and word order of multi-limb quantities. On big endian systems, the byte reordering is not necessary, while the word ordering needs to be retained. So replace the __swab64() invocation with a call to be64_to_cpu() which should do the right thing for both little and big endian builds. Fixes: 3c4b23901a0c ("crypto: ecdh - Add ECDH software support") Cc: # v4.9+ Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/ecc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/crypto/ecc.c +++ b/crypto/ecc.c @@ -897,10 +897,11 @@ static void ecc_point_mult(struct ecc_po static inline void ecc_swap_digits(const u64 *in, u64 *out, unsigned int ndigits) { + const __be64 *src = (__force __be64 *)in; int i; for (i = 0; i < ndigits; i++) - out[i] = __swab64(in[ndigits - 1 - i]); + out[i] = be64_to_cpu(src[ndigits - 1 - i]); } int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, From patchwork Thu Dec 19 18:33:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182172 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp862479iln; Thu, 19 Dec 2019 10:47:26 -0800 (PST) X-Google-Smtp-Source: APXvYqycE3I/2EBqCavwYMyA20QQpRn4BvvxyBEVnbnP6VZq7fEYQflcONb0hP2s9A32Q/GpdP4d X-Received: by 2002:a05:6830:139a:: with SMTP id d26mr10462002otq.75.1576781246160; Thu, 19 Dec 2019 10:47:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781246; cv=none; d=google.com; s=arc-20160816; b=L2Bl7YfLTYyCf5tntogaxJhCNtretdd0czZpISy/gR+nrKo2CDf9CmVAOjll9NrFK+ 1p6dUcIEZIQrUsDS/IfP9NHLsKg9fgLkjq5X8I3hgUciLvFyJ15rwWPD37LZq2kl6Tri P2sqTIHv5VOejjX8SXW/aymBA8fw0sF1P5jE0yRt5GZi+3/VEkU9V2xChetGGMOjSzxb W8HE4TO4BlbUS1BrucZaMFGG2/H5TEw5gJc78Fi01pslrDkLVbdkBlyAV6XbSGi1QzK0 Q1ervy7F7x3QvjDroi761GVno7N2HSddkM2oI+5JmbgI8TGSBPftHWUmhzgfmLbPR9MQ cPLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qmM1xz1rlgYKunlUzZoqQyaxeRX8Zncdljj95HA4Noc=; b=Q6D+UZ1DaJixduXKzCW4AkTF06k5yOo5/KO+ULZlEq4aKXd57mkUC08altYud+YuFv wZ4oEoYahZq1cLbPJYaoAz34uKXMY5r+JqzoWlAzKoeaw79d7rzlBtbGmYNU/mKs7Sqp FNx+uTvyGwXmhZm4bzpE2bZd0DZ64l5cAw1/QXHwEBPHrCPCP6hJ9MDsPmZlUeFawQaH B+8bcUBlmwFSsJNtGTjkPT4CLZjWTZcEcSo8BruQ3dpB4XzKViHLCpgZl/QrLDbn/rif RaOcxRuRGPbwjdYvUOUWkFGvYjbEkLhXmeQ/vyE5NCBJLod6QC5k0Gu55wDhdts8ykKP E5ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YBcyH0zN; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si3496152ote.187.2019.12.19.10.47.25; Thu, 19 Dec 2019 10:47:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YBcyH0zN; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729254AbfLSSrY (ORCPT + 14 others); Thu, 19 Dec 2019 13:47:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:40254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729229AbfLSSrX (ORCPT ); Thu, 19 Dec 2019 13:47:23 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8A9E1206D7; Thu, 19 Dec 2019 18:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781243; bh=nuHAsepJtngeuassJ0DTBPKJvjsLu9vQprBq1cI/L3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YBcyH0zNZTphoEgz7OHafA+krKDksNRg3wiEhi/jIULlvwbShb5bzeiSe34Mgl4EB Y0eFJHDsvOPP19KzMij5fY5FaW36STrb38RYvgM/6SUtU5b4RQVRNFEn4VC9uN+vQN SfxdntyNSawSR1eZLFgP/MqiJ59jA9qlsqC/5UR8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4.9 141/199] ppdev: fix PPGETTIME/PPSETTIME ioctls Date: Thu, 19 Dec 2019 19:33:43 +0100 Message-Id: <20191219183222.973502841@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann commit 998174042da229e2cf5841f574aba4a743e69650 upstream. Going through the uses of timeval in the user space API, I noticed two bugs in ppdev that were introduced in the y2038 conversion: * The range check was accidentally moved from ppsettime to ppgettime * On sparc64, the microseconds are in the other half of the 64-bit word. Fix both, and mark the fix for stable backports. Cc: stable@vger.kernel.org Fixes: 3b9ab374a1e6 ("ppdev: convert to y2038 safe") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191108203435.112759-8-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/char/ppdev.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c @@ -624,20 +624,27 @@ static int pp_do_ioctl(struct file *file if (copy_from_user(time32, argp, sizeof(time32))) return -EFAULT; + if ((time32[0] < 0) || (time32[1] < 0)) + return -EINVAL; + return pp_set_timeout(pp->pdev, time32[0], time32[1]); case PPSETTIME64: if (copy_from_user(time64, argp, sizeof(time64))) return -EFAULT; + if ((time64[0] < 0) || (time64[1] < 0)) + return -EINVAL; + + if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall()) + time64[1] >>= 32; + return pp_set_timeout(pp->pdev, time64[0], time64[1]); case PPGETTIME32: jiffies_to_timespec64(pp->pdev->timeout, &ts); time32[0] = ts.tv_sec; time32[1] = ts.tv_nsec / NSEC_PER_USEC; - if ((time32[0] < 0) || (time32[1] < 0)) - return -EINVAL; if (copy_to_user(argp, time32, sizeof(time32))) return -EFAULT; @@ -648,8 +655,9 @@ static int pp_do_ioctl(struct file *file jiffies_to_timespec64(pp->pdev->timeout, &ts); time64[0] = ts.tv_sec; time64[1] = ts.tv_nsec / NSEC_PER_USEC; - if ((time64[0] < 0) || (time64[1] < 0)) - return -EINVAL; + + if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall()) + time64[1] <<= 32; if (copy_to_user(argp, time64, sizeof(time64))) return -EFAULT;