From patchwork Mon Apr 9 00:35:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132962 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp664658ljb; Sun, 8 Apr 2018 18:04:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+/2iQKSRDx+5FqtkWxlqTk9kmO8gIyXRbjc3SAAUBp937HQyPM13id4Tq5407hn0HFvaik X-Received: by 10.99.96.84 with SMTP id u81mr23798787pgb.231.1523235877775; Sun, 08 Apr 2018 18:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523235877; cv=none; d=google.com; s=arc-20160816; b=h8n0u1kKf3dkxNk8QabtQiOsb0cW0gI7p+TTRgA6hZQiG3C+oiREgFb0nxbnGvqPGW htn/XPnwjhX1xTeToZMClzFzHx678sTYaaJ+nAsBtsF79Ey3ekj/ElI6MDz3uUpeXbID G+RsQFGpAj37lanHPmNYmdohXg+nxf9eslNpyZDFhzttu1+Qb7NjvHrXGFyuaHnCcj0N FzXerj7BwL3ggqubRRJmV54Z1h12WntrNsrV86RwURi3JMFT+OMV2jnvMy7BrCN4qmY4 cw1iEE0t/BPFGLTg/C8oC+Lwz1QDXwDnExi8a0VmoIlKtW8TukPrKLnYARb10w+3u8xd xRlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=4Z3QH9nS258eL3fNEiLL5rF9DfTdJP6/9TW+PqZeNPQ=; b=UuN0pvL0oJfvsHyIv2FG3aiwoH7NUOxFENuMhkLFp4F/rn8R0O2x0fi/hnKwGllEDE OR5mmSYH0Hc3J8iS5BfXindWMCmnHZ6slYKavXwg3Y+XBgXxmpTFnuSXc6YVpoXK3/b4 ZE2JwYAC3iGyFYm0EXtVEZDMZ8Tgy5AMzWjtPNS2jXF4H7UsinOHEOaJOSE6j2hJPuXY NnyYTFXzwEV2c+FZ3iyqbSCDADd0G8HPoWb1rFj+7ZA03jECiDOiy4BIsXmSFLGM+w/B aJQc3PdzG7BjIIObrfDKQEkQtzgSfx2UY+9NbqbMABT8oz6t7Tt4hzEvQqdxh+w0/Tb7 mBhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=kYQ5gROJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si11930033pfl.136.2018.04.08.18.04.37; Sun, 08 Apr 2018 18:04:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=kYQ5gROJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756726AbeDIBDe (ORCPT + 29 others); Sun, 8 Apr 2018 21:03:34 -0400 Received: from mail-co1nam03on0132.outbound.protection.outlook.com ([104.47.40.132]:50200 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933154AbeDIAjf (ORCPT ); Sun, 8 Apr 2018 20:39:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4Z3QH9nS258eL3fNEiLL5rF9DfTdJP6/9TW+PqZeNPQ=; b=kYQ5gROJsFCne9VyPmx9n7J9+L+baxyS0ZMo7PwMI32BrUxZK9fAIIEie8soWyPj6fPNjfzgRkKtpTM4zURs/EjZCR9iEq5C/n1DQOD/8wcYPkIcrqyrat3EuAYMubCro99fcan7/S4Mw355iWJjCbIuSibIvIddUeQhcOX5N6U= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1047.namprd21.prod.outlook.com (52.132.128.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:39:29 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:39:28 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , Ian Abbott , Stefano Stabellini , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 008/101] xen: avoid type warning in xchg_xen_ulong Thread-Topic: [PATCH AUTOSEL for 3.18 008/101] xen: avoid type warning in xchg_xen_ulong Thread-Index: AQHTz5qheyoJZXptUEKL7GOd7oPAug== Date: Mon, 9 Apr 2018 00:35:16 +0000 Message-ID: <20180409003505.164715-8-alexander.levin@microsoft.com> References: <20180409003505.164715-1-alexander.levin@microsoft.com> In-Reply-To: <20180409003505.164715-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1047; 7:xUB9Bzq8UcK0kvJub91KjVgIlH3NN4x/aN9PkF1220Kcvb4g/c7CJWs1OotWmqCw5O3g5yQkPYwWjtaBq6TDrSFCl2SHOMkFQpvfNwcP+AMFJwPFXHvf2MSQ44hFuoc2tnzb7moksv61sjAR663gctOZdua1TtZtAAfTQQPf6JnRs2AJrOxrC5Eo8F7TV/aHPZhGFLwB8ztPKg20fxCWLqG2FPde983K2vV9dizHm01Oh6A5DhAq/rx4ddq6q5gC; 20:/qxdkianhCdNwg4aJxyIk/Uc+TbvCzOwra7/s4U9dPyHpo87vmSKz4BgskY1PaB710hAVWQURC+O/RfytNtcC0F/lZPlGifpnpjo1Wnuzo3FaOc5giC3t0xQtqMpUdVvFm6iLSDDrtXbcQrj1v2tSd+gB3hWk+dPASYpqhSPlyE= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 96857811-21e8-474b-9cd1-08d59db25a70 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1047; x-ms-traffictypediagnostic: DM5PR2101MB1047: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB1047; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1047; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(396003)(366004)(39860400002)(346002)(39380400002)(189003)(199004)(97736004)(3660700001)(2900100001)(2906002)(8936002)(11346002)(3280700002)(106356001)(446003)(68736007)(72206003)(1076002)(86612001)(25786009)(3846002)(36756003)(107886003)(6116002)(81166006)(4326008)(486006)(81156014)(6512007)(6436002)(53936002)(14454004)(8676002)(26005)(575784001)(5250100002)(86362001)(105586002)(6666003)(305945005)(186003)(10290500003)(7736002)(10090500001)(102836004)(6486002)(2616005)(5660300001)(316002)(2501003)(66066001)(22452003)(54906003)(99286004)(110136005)(478600001)(59450400001)(476003)(76176011)(6506007)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1047; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: SSnM2CbeHRh/pyGv56xMFTI0Zc0bZ/PWLCDeux2EQZMtZKoKBVczeLY2v1QTdMNvAP57YWyY5E4cdNeiSVy0jEwnkGXXGWExv1QT7CTlqXlNUXBYVnulvD9eSm9xjS0c33uygk4WyrRzXJqnsMd34EsiE/l0dQRr/4xbiOVx/gMeHaeIHTldxGui98GB2Ve3ZpIn/Y0p4DlykLXOjwbedB88Ly408inXKoY7s6DhQQPSuvxM0M6PBzV5F29Aia6n7VwjNPWANO+N7HvBYRTimtP/dmjz5hzpxjL2IW4OfGuzSXSNkl1nu98IstRYqbpCW5ATeEBd0F+1j/LQehcLDViiUE+Bp/adHlNoj+eIf8dKARVa7kEs0NMMjn1hsG0Jv9m67Dnqp7usMfRhM3nNoLci2EKgcDsTvwh+e5xLqc4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96857811-21e8-474b-9cd1-08d59db25a70 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:35:16.2361 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1047 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 9cc91f212111cdcbefa02dcdb7dd443f224bf52c ] The improved type-checking version of container_of() triggers a warning for xchg_xen_ulong, pointing out that 'xen_ulong_t' is unsigned, but atomic64_t contains a signed value: drivers/xen/events/events_2l.c: In function 'evtchn_2l_handle_events': drivers/xen/events/events_2l.c:187:1020: error: call to '__compiletime_assert_187' declared with attribute error: pointer type mismatch in container_of() This adds a cast to work around the warning. Cc: Ian Abbott Fixes: 85323a991d40 ("xen: arm: mandate EABI and use generic atomic operations.") Fixes: daa2ac80834d ("kernel.h: handle pointers to arrays better in container_of()") Signed-off-by: Arnd Bergmann Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini Acked-by: Ian Abbott Signed-off-by: Sasha Levin --- arch/arm/include/asm/xen/events.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.1 diff --git a/arch/arm/include/asm/xen/events.h b/arch/arm/include/asm/xen/events.h index 8b1f37bfeeec..b7aadab9b0e8 100644 --- a/arch/arm/include/asm/xen/events.h +++ b/arch/arm/include/asm/xen/events.h @@ -16,7 +16,7 @@ static inline int xen_irqs_disabled(struct pt_regs *regs) return raw_irqs_disabled_flags(regs->ARM_cpsr); } -#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((ptr), \ +#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((long long*)(ptr),\ atomic64_t, \ counter), (val)) From patchwork Mon Apr 9 00:35:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132954 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp650257ljb; Sun, 8 Apr 2018 17:40:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx48bdY2lrmFRYe8b70xmGeIFfw3GwEJsNHzb4VyIbZhkd9O5+hqyLrWmJBc+kvMhS698q7I5 X-Received: by 2002:a17:902:2803:: with SMTP id e3-v6mr35695989plb.156.1523234436763; Sun, 08 Apr 2018 17:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234436; cv=none; d=google.com; s=arc-20160816; b=rS94Yq8Nnj9oamebU1r4LNuQLQfPVRqgdgH8zPY4toX4Dz6RFzM+1vZrjfHUd5PU3P sRrxLAroG75UVOwP2I2pCe7fQwqGQOxpGtMboK2WBQRaXNEVjWmm2s/ug4GbVfSij6cj bGu9Tt/ULXnDLvOZ6iap9H+2TL3zY3PtcnwgnRls+45YtEZlxTQUqmiU44/PG/XAtIsg Rgamc9fV5MKljd3EAEX8+AYAYOHUgn2H+hKUHz4cD0m0n716QQf7v3pplkP5wCUu7yo6 wUe125pUwW4djb3962OuHmGM88RdOxzy+EINbN2Q3Cg4fbU6TJOYWIS4CeyUgHG8gihm CvYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=4Ne8w0HRkxCrw/E0Gr3V4zpFdUfGCZ3W0mP1640jD0k=; b=XhBF5JSExxv6A0TA2ttzfjsxPFQhEbz12ikYQcPMst+WqHeQCkSF4z5ClXVANbPZgY nXiDZnndllZ+xy48uFSZU3pNoPR9kpQRyi+etgLLPtld5jUqgli658uZbgzjgX37LAK4 nSmomm3bTowTrMd3WVA/fps9LSUJEJX61i15q5QEC2a2vwa+LYiG5tERmRc/GQwF/Hfc XfDfMRNj09E0txAprNVzmTJ5dHRIRPk5qzytPqyWyRgLriu8LmVNIoCxsxeOoq4YzQve TonIAthojKUY+c7ad0xqI1/j5ebrqlWHnJG1eT2VayENIhNMO3Hc4Tp/WPNfevnqyZ4v GdYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=E8BSGSoQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si14520306plk.490.2018.04.08.17.40.36; Sun, 08 Apr 2018 17:40:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=E8BSGSoQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933352AbeDIAkc (ORCPT + 29 others); Sun, 8 Apr 2018 20:40:32 -0400 Received: from mail-sn1nam01on0097.outbound.protection.outlook.com ([104.47.32.97]:64040 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932553AbeDIAkY (ORCPT ); Sun, 8 Apr 2018 20:40:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4Ne8w0HRkxCrw/E0Gr3V4zpFdUfGCZ3W0mP1640jD0k=; b=E8BSGSoQK/nKtlxkgHgxi1h/kwNrSRYCm+rdzc6+GMrgEjGQot2L3tX8UciRnCB9Hyk1r4GsH8NBtngNRaDqjk4jCX97pTnag0F3nUQI8ByKhZNn+aF3HnqAPNJrGgMvNnfQcWHvjK0oP9ngAscFtBHK1Tx3UZVpPQ/u0tVFMJk= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0870.namprd21.prod.outlook.com (10.167.110.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:40:21 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:40:21 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dave Martin , Will Deacon , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 043/101] arm64: ptrace: Fix VFP register dumping in compat coredumps Thread-Topic: [PATCH AUTOSEL for 3.18 043/101] arm64: ptrace: Fix VFP register dumping in compat coredumps Thread-Index: AQHTz5q3zd9FJXLC+0+g/ZQSfV0hyQ== Date: Mon, 9 Apr 2018 00:35:53 +0000 Message-ID: <20180409003505.164715-43-alexander.levin@microsoft.com> References: <20180409003505.164715-1-alexander.levin@microsoft.com> In-Reply-To: <20180409003505.164715-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0870; 7:Q7OIQOQK4EJ1uwvU5VSR9qCjG5vsI6yYWoRa6o9qvgGNOW3dLLTLI0CaNCLtv43rFcmIiKkeAyNVsj6nLSlMGJ30JnnhGetHPzn4Pf1Q2KFnzOxYkQXq0ax0c++ZRSxvrHhvlFw5KhjJfNIAPeUaMpSwo2TsWTCuzmTk6znueb+He8KXpPkej/pLCHcavCWESA1Soc1E2I9QMs7yvzHnEcmRw/mpHAHiPIE20JK55GWiqPuBzZ4GhXRFe9jUnTOi; 20:wWuUNdx0BmiuVpTAUEb6MWsPclt3NJ/3A8TIVtVaduS8sDYxGUGZVf53Jyfw2t4JyRFgYpFF7x0X1GMLpnzyvMvt72ISze/hnQPwKtH8UB7iayebC7k44sbjbrjDL97H/a9h4tZPwd6NqwXKiJnsfWSRXDKmKVph3PHHhEOWe6w= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 13f97a45-3757-466e-e08b-08d59db279dc x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0870; x-ms-traffictypediagnostic: DM5PR2101MB0870: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB0870; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0870; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(366004)(376002)(39860400002)(346002)(199004)(189003)(5250100002)(5660300001)(26005)(10290500003)(2501003)(478600001)(68736007)(8676002)(8936002)(81156014)(81166006)(22452003)(3846002)(86362001)(36756003)(1076002)(305945005)(54906003)(72206003)(186003)(316002)(4326008)(25786009)(6486002)(110136005)(7736002)(446003)(10090500001)(76176011)(14454004)(11346002)(476003)(2900100001)(97736004)(107886003)(486006)(2906002)(6512007)(53936002)(102836004)(2616005)(86612001)(6116002)(3280700002)(6666003)(6506007)(66066001)(6436002)(3660700001)(105586002)(99286004)(106356001)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0870; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zNZeEzhxdMEKEWH4JPoLhArxQxA4vP0BMBYkavwR9GPD7c1nlsdYefu+CPo+04ijl5uuLW2C7L8qlznf+QnIwFueMxcfmzZfHhCU/1cj/U+A6nT43kvHYxHbY/zyzDU/5qVdQu5/1zFR6Slt2HaE0U5HX/09dLSK8LLW9/718DxUTh9YtQX8g3r+Dj0YTyDM9ZsfTz/n1EzOI6c2L90mSIGZVNu+NWo2jRzhe/7RKQ5gKXqL1vO48zW3eGcJngZ3sORXUWniSXb7upWHYoWgk9u7XskonA/82hW+IND13Dcy30Kli4c0Cro0Mg0cS4oLPA6vVyPxQRyhdPUeCf5MJPBt9I++jQRbWnjGxmpe7aeB25wdHpasKwXZjPuSAGWlryhyogaRr8hicwC87pdO/1sD8UYw6Pi8uOsjc31UwFs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13f97a45-3757-466e-e08b-08d59db279dc X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:35:53.5172 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0870 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Martin [ Upstream commit af66b2d88a76574d55e81d712292abd34beb6178 ] Currently, VFP registers are omitted from coredumps for compat processes, due to a bug in the REGSET_COMPAT_VFP regset implementation. compat_vfp_get() needs to transfer non-contiguous data from thread_struct.fpsimd_state, and uses put_user() to handle the offending trailing word (FPSCR). This fails when copying to a kernel address (i.e., kbuf && !ubuf), which is what happens when dumping core. As a result, the ELF coredump core code silently omits the NT_ARM_VFP note from the dump. It would be possible to work around this with additional special case code for the put_user(), but since user_regset_copyout() is explicitly designed to handle this scenario it is cleaner to port the put_user() to a user_regset_copyout() call, which this patch does. Signed-off-by: Dave Martin Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/ptrace.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.15.1 diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 8a4ae8e73213..2e845f5c8ab2 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -743,7 +743,7 @@ static int compat_vfp_get(struct task_struct *target, { struct user_fpsimd_state *uregs; compat_ulong_t fpscr; - int ret; + int ret, vregs_end_pos; uregs = &target->thread.fpsimd_state.user_fpsimd; @@ -751,13 +751,16 @@ static int compat_vfp_get(struct task_struct *target, * The VFP registers are packed into the fpsimd_state, so they all sit * nicely together for us. We just need to create the fpscr separately. */ - ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs, 0, - VFP_STATE_SIZE - sizeof(compat_ulong_t)); + vregs_end_pos = VFP_STATE_SIZE - sizeof(compat_ulong_t); + ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs, + 0, vregs_end_pos); if (count && !ret) { fpscr = (uregs->fpsr & VFP_FPSCR_STAT_MASK) | (uregs->fpcr & VFP_FPSCR_CTRL_MASK); - ret = put_user(fpscr, (compat_ulong_t *)ubuf); + + ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &fpscr, + vregs_end_pos, VFP_STATE_SIZE); } return ret; From patchwork Mon Apr 9 00:41:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132960 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp657002ljb; Sun, 8 Apr 2018 17:52:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx491qSW0wce5AZkF0MX0O0pTNp0XCis+j4qh4PRvID54HOdyFfVhw4uReu3LGVXxHv0IVPjO X-Received: by 2002:a17:902:748a:: with SMTP id h10-v6mr2717481pll.160.1523235170648; Sun, 08 Apr 2018 17:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523235170; cv=none; d=google.com; s=arc-20160816; b=RiPRnW+nnBuE6ftaU79yGllz/D1phfz2vgMHf+a6QGGllQ1rNgUoosQW/psYfQlKmR H+gvMVc8zhvROEsneAs2wFdzpbBvpRoAX2pgkoXLa4M1snjYvTsOd6Wlg71HAZJNWMdi 72TyjOJJGpeX1Yzyko2uWsb6Hhh2ZDGu4+1cvuP/V8UPQB/Hj9HJa+zQNOr1Ht1VAs5S PEA6zTqYOv3S5OPl115XR58dCTpnFsy30pmSp/oS5ByPvkrheJpekuWy/J8A0jjVCPd/ 8h6d9684dar1zS16AKNzUFEB/2EivbJgAGR85YFCOA+Wd2/yC9C4LbnpWdWNRbS/0k2T J6bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=QFDQoxWb6xMHSnO92LuCW06HI61H1oUwJfcho8andsg=; b=W0KjjpRf3iE/STI5qY7Abqkqsn7q6s6kc2jexKyjb2ei+Hmwim9Y8ZpaZh3RaJ1a83 c4LLyIS80QJAHELK2DMMUPOi1CyMAbjwjskL89GtkQ58+Lv3Mi9Jm96a0DSVNKoZORAx 4orPR53LyMZ87msRbKZ5aP0aJDJiTpCTZR1M775DNsgX8pVpO/eTm79rfxRO3n531s5S IIkY5rKMzu9SnXQ0fnFPePCI+UoQArIGO5wnftMhMILZB+pKlG0JD0gKLzVIY7Axrm/q Rh8Jp6vYy2ngPOHz7pRzu+Xz8Pd0XMJR9zZ4VMoctellcd8Y8xeSuwDxZ2cKgx/rC+0R BSiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=lMXVBzP7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si11509343pfh.3.2018.04.08.17.52.50; Sun, 08 Apr 2018 17:52:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=lMXVBzP7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933495AbeDIAwS (ORCPT + 29 others); Sun, 8 Apr 2018 20:52:18 -0400 Received: from mail-by2nam03on0126.outbound.protection.outlook.com ([104.47.42.126]:24363 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933421AbeDIAlZ (ORCPT ); Sun, 8 Apr 2018 20:41:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QFDQoxWb6xMHSnO92LuCW06HI61H1oUwJfcho8andsg=; b=lMXVBzP7ZDu2pZ3GxrBVgfT+PmhTZ220M+umh5vVC1OumbH6h8jWt+EUqk1Q5uYEgiHSXhoPCTmQTjyDclEhh86lUqXXjrHHHskREr2wO6PFRKELhAzXQuPoferEfUfll4E9Ub5/lTws2QHBG7lgol3p0G92MYsc7prcbalAe9Y= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0901.namprd21.prod.outlook.com (52.132.132.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:41:22 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:41:22 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dave Martin , Will Deacon , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 057/101] arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails Thread-Topic: [PATCH AUTOSEL for 3.18 057/101] arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails Thread-Index: AQHTz5t63zIp/W+nvEOMbAgceMkktw== Date: Mon, 9 Apr 2018 00:41:21 +0000 Message-ID: <20180409004042.164920-7-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0901; 7:Xd0QxPoF6iYGKpyUbt80WN8ymeNdeEuTb8d1KEi306sbNp/ii4AjxnzqOC7pOVMF6f0mc8229RcdwI0lP2dL7zE/dKL4Gu6HhFSsPU5Jg7ud64ZFWdrqzF1VELnXkRDRCazzXtieAiOjjb8mBHIDixaWGvi0yI6DRHoKk4thJleqRMHGXg/WuozuWPCnnxJwxxfLmxSKt4v0dOaoeoJ6Fdf+JdHRgaE1exFsZiAE0I6p3X9DVDswgCJYJ2eUkMhF; 20:bs5gmrZU7DBrQbTiE3orR3kuNfyD6sxdb2Jg50YOTw5PSJtVYAuvqfKPvMxaUjmRoXCNUMfGDyPo0sPThxSwJWZeeXnUfzBbF7iK2NEeCJAYoGxBapQrMBPLPGWaIDc5iDkyhlnR1cLi21qAU2BzFJjBeVzJNJshLVn23V002A4= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 77d37509-af0b-4b39-b1f9-08d59db29e06 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0901; x-ms-traffictypediagnostic: DM5PR2101MB0901: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0901; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0901; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(376002)(346002)(396003)(366004)(189003)(199004)(99286004)(68736007)(10290500003)(25786009)(86612001)(6116002)(66066001)(97736004)(3846002)(76176011)(6512007)(54906003)(6436002)(4326008)(53936002)(105586002)(110136005)(6486002)(3280700002)(1076002)(107886003)(8676002)(10090500001)(2501003)(81156014)(81166006)(5660300001)(14454004)(186003)(3660700001)(102836004)(7736002)(2906002)(26005)(5250100002)(36756003)(478600001)(446003)(316002)(6506007)(2616005)(106356001)(8936002)(11346002)(22452003)(2900100001)(86362001)(486006)(476003)(305945005)(72206003)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0901; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: vLgjRz/zANIr2eRJVi7Y9n33j3O8YZLtFJs1GRWfgpKMmusVfq4jG06o+gv97NCibfVTKBdTHsP9awTfEQYoEcuNgHDmr+w1/4VBOGECx2NbMWul0NwbS0jGCTZbRVrNiBu0QANiFv7yNNzE9AX4w0hAo5Mku4CCM7oh3eHGQlsWqs93KJy7UHSdknAfy0zs1ae6a5ez8s1iOpSR3q8NSxkDIHEdw+JgSQQHf6TNu3id/Q8BXHh9HTcXTjBlBxuoO6PZ/F/F0xM9mS/lYcGUOt2ka+cZZvaj0bXKePsv2GzsyoxhEVadI6bAhdCq1QqfzV4jExQVuL04M715LSy3yPtOH1CbwA3lf+qhdLAfdCnP0nN29n4HNRR95ixGazsx8IlizyoIDHKOkz+8tH3g+oh+N3LzTjyh9oW5CO0TOT4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77d37509-af0b-4b39-b1f9-08d59db29e06 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:21.2677 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0901 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Martin [ Upstream commit 53b1a742ed251780267a57415bc955bd50f40c3d ] If get_user() fails when reading the new FPSCR value from userspace in compat_vfp_get(), then garbage* will be written to the task's FPSR and FPCR registers. This patch prevents this by checking the return from get_user() first. [*] Actually, zero, due to the behaviour of get_user() on error, but that's still not what userspace expects. Fixes: 478fcb2cdb23 ("arm64: Debugging support") Signed-off-by: Dave Martin Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/ptrace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.15.1 diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 2e845f5c8ab2..a12eb17e7985 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -785,8 +785,10 @@ static int compat_vfp_set(struct task_struct *target, if (count && !ret) { ret = get_user(fpscr, (compat_ulong_t *)ubuf); - uregs->fpsr = fpscr & VFP_FPSCR_STAT_MASK; - uregs->fpcr = fpscr & VFP_FPSCR_CTRL_MASK; + if (!ret) { + uregs->fpsr = fpscr & VFP_FPSCR_STAT_MASK; + uregs->fpcr = fpscr & VFP_FPSCR_CTRL_MASK; + } } fpsimd_flush_task_state(target); From patchwork Mon Apr 9 00:41:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132959 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp656554ljb; Sun, 8 Apr 2018 17:52:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/YezpEJwAwJM66Z7l1UkmotnDLBfIi34WJodamzoxTN8IehGxs9CzxsTxNHBL8uahIXPA9 X-Received: by 2002:a17:902:28e3:: with SMTP id f90-v6mr36573955plb.250.1523235122896; Sun, 08 Apr 2018 17:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523235122; cv=none; d=google.com; s=arc-20160816; b=sdqvPkXYb32a1GoKaiEnBToBULDh/6ikb15eqhiWytFGFyId4hOLvjcV/is9GwJI9b PCDMmvfibGaVqC6WOCeTzoovHsyRFM9EQMpC+Vo7AUl8hC+2gEtNAF0PzUNCsmVnBNvr kt4w+HemBo4HSkvOrPTl8Z11ilqEfI/6kHEj77dTjCZbhkEVE4GWpV9a5M5BlOor/omM i4UktikmajH7T6KkyTXreCmdK2LCwFQBVl1FOGas+w2/sjwBaBZUz6D7V64CD7I3fWC1 XJbAn+oybkJf51EYdfl7v6c0hWna5FzQbCCh20dS6DYYuQM/IvQt9U9BKlXBElB+lUOf fNyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BgwKqsIqJGecRKRGEBmF9M9WRCggHe6V7WuP2Q5IKeI=; b=DDxQ6O2La6h8+L1XlDiT+0o5MgTyGsOTFoHi4TbIarl57n6lUzStk62v+91Pyxp08g xV75pwFx0HNnJKarTd92ceqeUvGDJ+X4cThJOUyziYgc7sMWtaPLRKpV6KPNINnymv4G y/9Gb+4anWT+2J5g2DIMCQIP+tF3k7Fsdk/Ltg/g37G3xPWn6BH7eROpKtfFiAq+Mskp IKVG+FLM86FeQp4cN0SgUSbpPbnlA1uVCuTOvH3iBQ7TnHI1NaDMIaEM2IFepeRvvthk 5OqcQNhUIJ+Jvo29G7m8T9G4eHPlnR1s5wLYvAYnw+WzCiqqmniR8eaxlsAWVbS7r48e 0Wfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cFICULwU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si11863855pfe.132.2018.04.08.17.52.02; Sun, 08 Apr 2018 17:52:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=cFICULwU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933484AbeDIAv7 (ORCPT + 29 others); Sun, 8 Apr 2018 20:51:59 -0400 Received: from mail-by2nam03on0126.outbound.protection.outlook.com ([104.47.42.126]:24363 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933422AbeDIAlZ (ORCPT ); Sun, 8 Apr 2018 20:41:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BgwKqsIqJGecRKRGEBmF9M9WRCggHe6V7WuP2Q5IKeI=; b=cFICULwUirQzDYVDCZvdqDJ4/TkBiY7J8vRfOa+KfZ3Bn+MYRf8MuIF64A5SzNP5kNm7Y5y2tsbaJzjnp/k7fvhPlIz8VPv/1Nr+0wmpX/3cBMuIdqn16L4JpHMIsaXHFKUCyqOq5YqXnpU8aV+mqRA3WkB64W0+uNvXs1TZr+k= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0901.namprd21.prod.outlook.com (52.132.132.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:41:22 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:41:22 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dave Martin , Will Deacon , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 058/101] arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() Thread-Topic: [PATCH AUTOSEL for 3.18 058/101] arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() Thread-Index: AQHTz5t76SMipjwJD06/p8CgFw5LkQ== Date: Mon, 9 Apr 2018 00:41:21 +0000 Message-ID: <20180409004042.164920-8-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0901; 7:IJl0u/Uad2xt7YORKRidEez8XxADphwY0xOHqiQhNq9VROuxwAs9M/AvgOn1EEnUK7xy0AJevheJMaIQnk+0osWUv+NAyWpUZmEGV2edCMwubi0ucv+otKvZetZu9JxrJEcaYP4escLGCNmnKKKh360ofVM5xmMouv0FEWqs1VU2Q7tAw54PIipaIpsrmy/Z6et179j8DuAKCWZLNG5QNa2INSpr8azLRxLU4NJNlMDlIpXXD45eVsW6tHCEEY76; 20:iYbKYprTzNU1UjDMrjFGk9vttS3gmQKCpfJd3zrjMi8z2Bb58W5r98DdYwkd/OaDkJp9NctYfPQK5OISFq1Ml1sH1rDfE89WRBOVFcf7eUBiUnrQpuQGo0uG+eLooYEtqU5vLefjmK1XGH5a3QtURyvDZd2QuTfVC5HhL4PiKeM= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: dfc7e61a-cf02-402c-5fa2-08d59db29e55 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0901; x-ms-traffictypediagnostic: DM5PR2101MB0901: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0901; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0901; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(376002)(346002)(396003)(366004)(189003)(199004)(59450400001)(99286004)(68736007)(10290500003)(25786009)(86612001)(6116002)(66066001)(97736004)(3846002)(76176011)(6512007)(54906003)(6436002)(4326008)(53936002)(105586002)(110136005)(6486002)(3280700002)(1076002)(107886003)(8676002)(10090500001)(2501003)(81156014)(81166006)(5660300001)(14454004)(186003)(3660700001)(102836004)(7736002)(2906002)(26005)(5250100002)(36756003)(478600001)(446003)(316002)(6506007)(2616005)(106356001)(8936002)(11346002)(22452003)(2900100001)(86362001)(486006)(476003)(305945005)(72206003)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0901; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 8lmh23VToYA7hEfRZntqjVA/dNV0QPVD5WT4JF71kYZwKA1aMWJZNliKyzY1iGt+CwuMutOMXs7kFNmwgz/tAp00wW20UiToNpbq3ROcMuGJWXN4cPSLcZuPRUYgl3zW4nefFHnajINi4quXxEfy9Af1KD72ud1hA+f3AbTZgNNXOpNQz+0oftetHUl+6NvSFxDZ7EISjplzFLO8pkftKaVRGQhSvH/E1Yiw99Zt5a+PuUyDvTcSIt5jLBe8MTW0B6Ifqxi4P/d5dtBDkr7rjdQuuIp5vqMMD4cUsl456OkCGPpu7zzIoBNmpYXUA9vc6kaMq9dG2P6Mk4o4FZi7DE/UWh0Eg7ryhPb1yaRhOxN1YOeAKPpMRYAyWZBQUpe3+s1wWCXRkYzdO6de+gsKYTCE79fi/glakwxmH81aIoI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfc7e61a-cf02-402c-5fa2-08d59db29e55 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:21.9552 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0901 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Martin [ Upstream commit 5fbd5fc49fc39ac8433da62d16682a1d0217ea4f ] Now that compat_vfp_get() uses the regset API to copy the FPSCR value out to userspace, compat_vfp_set() looks inconsistent. In particular, compat_vfp_set() will fail if called with kbuf != NULL && ubuf == NULL (which is valid usage according to the regset API). This patch fixes compat_vfp_set() to use user_regset_copyin(), similarly to compat_vfp_get(). This also squashes a sparse warning triggered by the cast that drops __user when calling get_user(). Signed-off-by: Dave Martin Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/ptrace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.15.1 diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index a12eb17e7985..01defb4527f4 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -773,18 +773,20 @@ static int compat_vfp_set(struct task_struct *target, { struct user_fpsimd_state *uregs; compat_ulong_t fpscr; - int ret; + int ret, vregs_end_pos; if (pos + count > VFP_STATE_SIZE) return -EIO; uregs = &target->thread.fpsimd_state.user_fpsimd; + vregs_end_pos = VFP_STATE_SIZE - sizeof(compat_ulong_t); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, - VFP_STATE_SIZE - sizeof(compat_ulong_t)); + vregs_end_pos); if (count && !ret) { - ret = get_user(fpscr, (compat_ulong_t *)ubuf); + ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &fpscr, + vregs_end_pos, VFP_STATE_SIZE); if (!ret) { uregs->fpsr = fpscr & VFP_FPSCR_STAT_MASK; uregs->fpcr = fpscr & VFP_FPSCR_CTRL_MASK; From patchwork Mon Apr 9 00:41:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132958 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp654345ljb; Sun, 8 Apr 2018 17:47:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+GPwijb9uFLRlDyDR0/lo18BlTydyOhv+rGWLvZf+lhXIngOzdB111yTppAKKLztD5mvyD X-Received: by 2002:a17:902:1007:: with SMTP id b7-v6mr19873779pla.205.1523234874481; Sun, 08 Apr 2018 17:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234874; cv=none; d=google.com; s=arc-20160816; b=BjU7M3sfMNjg8uR1RlTRR3tjUBvRz9KJTvQESuDo0f1YzgZ8n+4EXelXWypRlGPebt tiFwgNtB3yo0LZhm4AgiYz4q+8EanMNu52DL2W3SFN3Dl5XkCmVtrNKUmumulEttHgPb R8OlmjAyKqxwvEBsOQSm63y6/X9lwjya5+l6+/saIV7t0tsUjhZXRZbSMNioS0cdwrBY cO//4muUJ1eZbd7oXpaImFW35F+pUHbmQmq0S4Xh1xfkm1g2kGfIM1sqVaDJ9rZNSvFl X4DITF8DbDqvShoOBLIX2ujmxBROJ6rM7QxmjxyErzMTuJeJqjxUaiCoq/DsTBXFYfx0 ++Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=cxuAOp+oG6MfqXk4+MG6pfPStGdA8brM5KfHHG4a8dU=; b=AKp14NgCzfzdLS38L0F2C+aOJJ76CuG63KfUKfCTQHoc3yDa7XgyPqqJjrNxFZhRTz 9F/Yyx/5pNtPxaUh9CBKIi+6VuUCkGpo4wOKwD9laNusFduBjOI1TqBgn0BTlB9DAYbp Mh2pm8NywXCDTbYpDR9CaBydbAGGMjOGpYv5adVS73AnDt8kllsnvNzbi6kg9L8M8o98 tMFU8MRQaz9vu6HAvyIAw9kNfL5oYf+Oeu/+jQe7EeYedlOVtd8AfY4xA498hCSuRjkt 6gZWS7v//J9OoJnbR3yvmT22feRd/GGXZ3jg4Sk2WnbnufgeUa7vGx7Ab3IiNOgEfo/5 +nSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=V9IunfQg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b72si12002943pfk.135.2018.04.08.17.47.54; Sun, 08 Apr 2018 17:47:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=V9IunfQg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757012AbeDIArs (ORCPT + 29 others); Sun, 8 Apr 2018 20:47:48 -0400 Received: from mail-sn1nam02on0109.outbound.protection.outlook.com ([104.47.36.109]:10733 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756339AbeDIAlm (ORCPT ); Sun, 8 Apr 2018 20:41:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cxuAOp+oG6MfqXk4+MG6pfPStGdA8brM5KfHHG4a8dU=; b=V9IunfQgQdj0P67ugHiMi+KtBkpmAyptczymnoIfTMGs2yMml4OWxtxBNjRHqrXYXRVdsEpao+5c7gBnko90D7JubK6C8LMw3g4hm66Tqj0vpuQYPAbzOYq/1extdUFWcUAju5g2iyNtQJdVQWERhYvkNXI8D9DkO65YsUb960Q= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1062.namprd21.prod.outlook.com (52.132.128.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:41:40 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:41:40 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 078/101] scsi: fas216: fix sense buffer initialization Thread-Topic: [PATCH AUTOSEL for 3.18 078/101] scsi: fas216: fix sense buffer initialization Thread-Index: AQHTz5uE9NxLRSkex02Is7m7uUFCww== Date: Mon, 9 Apr 2018 00:41:37 +0000 Message-ID: <20180409004042.164920-28-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1062; 7:v4HxZCuJEHWcnXnPqgfvl2izKmn67Ro1w06z4qJVHSJ6CRjhsowyyVnSmR91aBoT9+L6vYyicFp/uV+zhR39PGQQVqnRMvNQyKcY3WNO9wHvbmerS9UYzkzfSbT7vAKHthCKIhuY+EX5+Wa6uDi/TDYauddkX7ZxF+mCxR6KLcdXQ+UhqtuknCwGEi+SYXuogpzlmMJxMXtl0Jz80VChPaED/pLF+eFkgV+7Md4qsIA8u1sghlILJ5eTABd89oTG; 20:cBQXFvN4qJNan4iFXq/LJTDRZ/OIe+U+hIx6UzGK0E0qS3HDwIaRiF8Pi3rAklsPpgY1/oYt00ve8b3zB4uoFXkefrGLwHrToYvaoQ2uEC5uDpHKNDLLfz8QdX82NxGyIdvsHr909F3pHhpB+i9PhN9hgbvjQ4xdKJtiPwtJ9S4= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 8fa3eaf6-752f-42cb-476d-08d59db2a8e0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1062; x-ms-traffictypediagnostic: DM5PR2101MB1062: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB1062; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1062; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(376002)(39380400002)(396003)(346002)(199004)(189003)(68736007)(6512007)(316002)(486006)(6486002)(6666003)(54906003)(5660300001)(110136005)(102836004)(14454004)(99286004)(36756003)(86612001)(72206003)(105586002)(97736004)(106356001)(2906002)(22452003)(1076002)(2900100001)(10090500001)(6436002)(3660700001)(6116002)(3846002)(305945005)(59450400001)(86362001)(66066001)(10290500003)(3280700002)(5250100002)(25786009)(8676002)(81166006)(8936002)(7736002)(478600001)(476003)(81156014)(26005)(4326008)(186003)(2501003)(107886003)(6506007)(2616005)(76176011)(11346002)(446003)(53936002)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1062; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: pDfdeRSFyeEdsYIufuOqj0t3WNlC+whISmY90+S6ygtgRXt0lbk8a1aYC9UpnpO5knvFqEUb/3THOkqJwxXzLz858q2ipOuyiU0CML+TUUumDe8einfefjrzSAWD/eiClHPom5k+iqyLdErFjMexf1757Rywbv77wr8qdOOHof0VqovSdO0Pvmc6mvcGpNTWj1/r2CUQUsW9ghAWw/X7wo/wZpUFUW/RsLHDVYzFI+5an5C7Z5ozvKe+DFlO3MKzO0QMHDXDDZ6XxsqrzRAIGanCOuLulOUFFDNoqhBDoE4ysGIq8SoKrV5TjYnnCtImhOL45Dnjr9eqgB03+zhkDtEc1ar7Y14tPAgqvRYJWRdevUMHAISi93kbPh5SW+WSmG5pV9MIIS9cNO1opJmQdAAMjeOCyPwUrmhOoiypLM0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fa3eaf6-752f-42cb-476d-08d59db2a8e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:37.4084 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1062 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 96d5eaa9bb74d299508d811d865c2c41b38b0301 ] While testing with the ARM specific memset() macro removed, I ran into a compiler warning that shows an old bug: drivers/scsi/arm/fas216.c: In function 'fas216_rq_sns_done': drivers/scsi/arm/fas216.c:2014:40: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] It turns out that the definition of the scsi_cmd structure changed back in linux-2.6.25, so now we clear only four bytes (sizeof(pointer)) instead of 96 (SCSI_SENSE_BUFFERSIZE). I did not check whether we actually need to initialize the buffer here, but it's clear that if we do it, we should use the correct size. Fixes: de25deb18016 ("[SCSI] use dynamically allocated sense buffer") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/arm/fas216.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.1 diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 71cfb1e504c4..80aa67df41fd 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c @@ -2010,7 +2010,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt, * have valid data in the sense buffer that could * confuse the higher levels. */ - memset(SCpnt->sense_buffer, 0, sizeof(SCpnt->sense_buffer)); + memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); //printk("scsi%d.%c: sense buffer: ", info->host->host_no, '0' + SCpnt->device->id); //{ int i; for (i = 0; i < 32; i++) printk("%02x ", SCpnt->sense_buffer[i]); printk("\n"); } /* From patchwork Mon Apr 9 00:41:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132955 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp651452ljb; Sun, 8 Apr 2018 17:42:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx48XS5MAkLEbymMxiadoUeuhLP53flSNE+GYjgV/lTKITvGuZNT8yICv+/kR1sDWo36SAcrd X-Received: by 10.99.124.16 with SMTP id x16mr19553087pgc.201.1523234563752; Sun, 08 Apr 2018 17:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234563; cv=none; d=google.com; s=arc-20160816; b=XC2buFyNSfhwMSOotZpjcGb1tvfWGRHpMJYGuemS0eb9LDUlG0kc2HFbHgjgtr6LNB oVoSQgtzWoV91ju9e/D0Lm3yccwmhykrGXSzSMWO+m0nc97wTZ5HxRkHEPvnL9OrBj7M jzW/WvkMvCx45lRKowRsXXH2i9p+kpGf+Vs9NOOMFHlYfKjeV+4tfjVvLiilvhqe2QdX s1uE+6jQn2s87nT0O1ZskFhs9Cp2otx4OkBsjHB7OH5Z/xxLXbi/5HafY73I75tHjswJ Qr3B3pRy983izIjiil6dUTNMvtNiwc5/aE7DCe16ZGNF8HnKXkKMTydSH9xMmNU0PiRR HDdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=xToftLCkOip8XzocZXMj13wruOVli+B/vwieOr/rDIk=; b=JDpNwCiy/Di7YsOc2ai3EDho6Zuy47toloSBQ9oIDjyBIdF8F+KQUeX3Dm6bAMRkQS 9SGDzNgjo/Yyv4fat2YdG8/A3L6me++VXt6F10ox5Y2vrmQZq0Xth8i+ONdO3/RwtjvV CQas+g7SJPkdnnGfngbiS2D9CDfzC48SxUJADBZ+gC+RGkz0hqFXlWTKElPNAtz0fRVJ udwffEcPzTzuHd7o2uVHGy/eazebPxWLwV9dKyKIcXjvzdHkrqOiUTqttVM4I+AbcxCp OeLNrtEjE/ZxP7objl5n3YUH7jVhkLEwOZ1SV0cUTUxld6VyQ3z61ZFZXs4NMu0q80hZ 2N5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=N84XG3iQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t71si10416584pgb.70.2018.04.08.17.42.43; Sun, 08 Apr 2018 17:42:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=N84XG3iQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756826AbeDIAmk (ORCPT + 29 others); Sun, 8 Apr 2018 20:42:40 -0400 Received: from mail-cys01nam02on0126.outbound.protection.outlook.com ([104.47.37.126]:44046 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756777AbeDIAma (ORCPT ); Sun, 8 Apr 2018 20:42:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xToftLCkOip8XzocZXMj13wruOVli+B/vwieOr/rDIk=; b=N84XG3iQLF8WD3NqhkPyXkjwd/RdImZYPatyUUa45fpeufTk4fD9SpXpaJYpDi9QO5Dui5vJ4WdewWqWCgwW5skSkB+stQd8YlDKWrHLEmfrpZpACdq8FkK72DT8DtwE77MVFzv23DF9msMdm7mOspqQaq5c3o6PfWueIg6nBG4= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1062.namprd21.prod.outlook.com (52.132.128.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:42:21 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:42:21 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , Thomas Gleixner , Len Brown , Andi Kleen , Nicolas Pitre , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Pavel Machek , Bart Van Assche , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 089/101] x86/power: Fix swsusp_arch_resume prototype Thread-Topic: [PATCH AUTOSEL for 3.18 089/101] x86/power: Fix swsusp_arch_resume prototype Thread-Index: AQHTz5uKZ+V1oSlMfUuRo77hwH52BQ== Date: Mon, 9 Apr 2018 00:41:47 +0000 Message-ID: <20180409004042.164920-39-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1062; 7:rj8uWDkEwvpwpVLVNDXZ27sZ6Itc41gJLGYsNV+Es1BG7Ct0iZSgBO3SFTWUhecPC0ZqzF/7aizf88Vr507LJwd0BJsTZ4GRpWLHHt5tfNnupKw/SxIeZtbpv9zsXha1Vsijh+BrDGdh7W4Gy1SGwKsi2Am3NcflfNxMYiOc1Ba92r+jM3wa85u/s0HMq4ksQSh8Ed4Ee2bZgtLs8QZi7M3B1rKWeaK+AtyASewGMGnVHxmVGRv0HuVwM9Ut2lJy; 20:6cz1ZMK4OknhDtxicvBdLUrHXoPGWGDfoFSFFRM7Bh91O/qP9MKUowiWCBuoYPFvoGs6fa8t8oa6HUsfHqujMv7Znho6kdRkoT3zO8/52KIC6zFfaJTlFwHAMQEhmGRedHKxmiCzNhJkmyNsSAbfAMuYUaUuc05XxStMGYdD3Hs= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 389120b1-8f77-4552-8bde-08d59db2c176 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1062; x-ms-traffictypediagnostic: DM5PR2101MB1062: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(42068640409301)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB1062; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1062; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(376002)(39380400002)(396003)(346002)(199004)(189003)(68736007)(6512007)(316002)(486006)(6486002)(6666003)(54906003)(5660300001)(110136005)(102836004)(6306002)(14454004)(99286004)(36756003)(86612001)(72206003)(105586002)(97736004)(106356001)(2906002)(22452003)(1076002)(2900100001)(10090500001)(6436002)(3660700001)(7416002)(6116002)(575784001)(3846002)(305945005)(59450400001)(86362001)(66066001)(10290500003)(3280700002)(5250100002)(25786009)(8676002)(81166006)(8936002)(7736002)(478600001)(476003)(81156014)(26005)(4326008)(186003)(2501003)(107886003)(966005)(6506007)(2616005)(76176011)(11346002)(446003)(53936002)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1062; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: QLHFQNwiXeAj7zGQop5K66ZEurBkKpVcVkkpTpex0dATFFg5S0i8x7eSw+DtGlJ8aZUaEHm6M3tbPaCMRiSus1IucrMJMLylkTXdzwxsPl3h9o59ZpJgwJy0ikiATAd9dX2R3uu/yPF1WQXMBJQHC8hmDOcufjarsAQKfu0WefesboFNh0hZD4v541Z4TkgY3rZ7y4aPyx2Tq6XgTdbKbZ2f7izmWqSkuLKM8+eQZZuckzTeL0N4eICrVRA0zl8xxXmYx9oNufwDVnt60jt82uroPGrwbM5JKvHojGsdewpUMzVNU5wTm4A95Mk8vnQx9VOVQ/7UhHcb4ccROif/u2nrIAB0aL4IKMgodcR9RCXTiXodEP0HDHe2F40fnNZQDNkiVlsxPmjdnTJKGgAO76v2DME+UdBYXzDQ0bwSrfE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 389120b1-8f77-4552-8bde-08d59db2c176 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:47.4553 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1062 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 328008a72d38b5bde6491e463405c34a81a65d3e ] The declaration for swsusp_arch_resume marks it as 'asmlinkage', but the definition in x86-32 does not, and it fails to include the header with the declaration. This leads to a warning when building with link-time-optimizations: kernel/power/power.h:108:23: error: type of 'swsusp_arch_resume' does not match original declaration [-Werror=lto-type-mismatch] extern asmlinkage int swsusp_arch_resume(void); ^ arch/x86/power/hibernate_32.c:148:0: note: 'swsusp_arch_resume' was previously declared here int swsusp_arch_resume(void) This moves the declaration into a globally visible header file and fixes up both x86 definitions to match it. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Len Brown Cc: Andi Kleen Cc: Nicolas Pitre Cc: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Bart Van Assche Link: https://lkml.kernel.org/r/20180202145634.200291-2-arnd@arndb.de Signed-off-by: Sasha Levin --- arch/x86/power/hibernate_32.c | 2 +- arch/x86/power/hibernate_64.c | 2 +- include/linux/suspend.h | 2 ++ kernel/power/power.h | 3 --- 4 files changed, 4 insertions(+), 5 deletions(-) -- 2.15.1 diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index 291226b952a9..77ac4e4deb16 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c @@ -142,7 +142,7 @@ static inline void resume_init_first_level_page_table(pgd_t *pg_dir) #endif } -int swsusp_arch_resume(void) +asmlinkage int swsusp_arch_resume(void) { int error; diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c index 009947d419a6..0e0c773edffc 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c @@ -78,7 +78,7 @@ static int set_up_temporary_mappings(void) return 0; } -int swsusp_arch_resume(void) +asmlinkage int swsusp_arch_resume(void) { int error; diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 3388c1b6f7d8..10a48138e063 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -325,6 +325,8 @@ extern int swsusp_page_is_forbidden(struct page *); extern void swsusp_set_page_free(struct page *); extern void swsusp_unset_page_free(struct page *); extern unsigned long get_safe_page(gfp_t gfp_mask); +extern asmlinkage int swsusp_arch_suspend(void); +extern asmlinkage int swsusp_arch_resume(void); extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); extern int hibernate(void); diff --git a/kernel/power/power.h b/kernel/power/power.h index 2df883a9d3cb..45244cb31c91 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -85,9 +85,6 @@ extern int in_suspend; extern dev_t swsusp_resume_device; extern sector_t swsusp_resume_block; -extern asmlinkage int swsusp_arch_suspend(void); -extern asmlinkage int swsusp_arch_resume(void); - extern int create_basic_memory_bitmaps(void); extern void free_basic_memory_bitmaps(void); extern int hibernate_preallocate_memory(void); From patchwork Mon Apr 9 00:41:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132957 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp652246ljb; Sun, 8 Apr 2018 17:44:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/srmrT3cq8VtlduIBdwxoauUKEq/qvcZ+dKNwwl/cF9p2oaSJyGGzYtxw7YVsd3UUqgg55 X-Received: by 2002:a17:902:7793:: with SMTP id o19-v6mr3334671pll.349.1523234647321; Sun, 08 Apr 2018 17:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234647; cv=none; d=google.com; s=arc-20160816; b=md/Koe37ZukFuxN/jamYpuuau6oaQccekYtOSH/V0NaWsu2NA9jVU4IApCvPTrfkBJ mUMvCd/1UYglyZU7dSPqe/ezisZ1a4KCGTdXurlldatJ/BXnfmqAQnBGG/aZ9znEsHlJ 7lTQCyIgvdRp2FE9PP32Mido9GsCeg1CYPmNyUxJQxI8RkgbhT5RYiQKpc8xXwFuQBCO MGxbyG4E1fo6vj/BUV6nnmoCxtmUz8DH02IFEK2qUUYetCaCkEM2ndoNpzX6yLoQGIJI YhnOqiA7tMw+/HekqLFaUx4PyojfhmPn+Cm6o4Yq2GkQZDINCigFogLpV6rn3L/Vr3cl MfFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=80knjo4JrZ2kR0bo6U335lpJnIlnKb6mr7cMXu/15SA=; b=d3Age8/RHLsHQQ8UjjL7WMAnmet1AOtP2V3K9L9vU2QXojMuWQF/cj24R0v3jrOX6P koryz6TbixnSF828XLm5j5HTgZ3FzTtzSWFA80kcGpkWuJKOpuMRc9aPxzNvsug/zFPE xdt4Ba5WJG4gWfPfRKCe5SED/xkJtixz2TwHy7rWkNVBCCkFzW3L5O6zYea+xg3viCOY xM1Z0U35fERY3Q2EdhUsNh7xf80ypaHKgLGdS3W8z91XX4c2RSzY3yaNya/bT7rageg5 1kgYVfo7aIEvxQxWYiizk1sBJ9y7TD4fYDH78gOwh1fjuqMwJ/oF+L8Ek83VJahjUWF4 FEGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=pAQ2A8Wh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16-v6si12860200plp.621.2018.04.08.17.44.07; Sun, 08 Apr 2018 17:44:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=pAQ2A8Wh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756796AbeDIAme (ORCPT + 29 others); Sun, 8 Apr 2018 20:42:34 -0400 Received: from mail-sn1nam02on0120.outbound.protection.outlook.com ([104.47.36.120]:45955 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756772AbeDIAm2 (ORCPT ); Sun, 8 Apr 2018 20:42:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=80knjo4JrZ2kR0bo6U335lpJnIlnKb6mr7cMXu/15SA=; b=pAQ2A8Wh/9XVN8zHnVBAJ4xCkrBYdaT+RylFeKmos/PtVgYqYbAmv1iiJXNqutajei7LhP54Ny/YqH3sFFpgzOdESlNw6LSQXhfQnXXy4NJOiR9UGry5+REa0bpZGEv6qs5n7zspy220Xbt/N64glup1LSpabkLu50C/lYFK0Uc= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1030.namprd21.prod.outlook.com (52.132.128.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:42:26 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:42:25 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , Steve French , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 095/101] cifs: silence compiler warnings showing up with gcc-8.0.0 Thread-Topic: [PATCH AUTOSEL for 3.18 095/101] cifs: silence compiler warnings showing up with gcc-8.0.0 Thread-Index: AQHTz5uN7jhZmXFu4kyyf9DFqut6EQ== Date: Mon, 9 Apr 2018 00:41:51 +0000 Message-ID: <20180409004042.164920-45-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1030; 7:+FsWjYw6p5js8zKoa76Q8s0JVWG8rZiO0ymeAevv9Gop0ju1cvYvaEhlpiOOC6GKrpfC1QjHrjYYXzLtWWgGMq+kVT5begTPT4vkfxzLBbFQmbKZdTtgo9RRb0Mp13fhyWJfNSRMyWsInKPPDTIfL0dZKMLzz8JaBWiN3VpoeWXAcf5BfVpaCZpuvSh1EMCufyJ1uxrNBroo++1gtggbYzOWZUoVSMhaGd2qIFDo66cACnzimdt/p3HP80LeDz5r; 20:87b075yejGuqd8PUJOR1QfxHgsH577eXLR8hC6P/DDpRxvsNPt94brr2x4iJVcftIDiW4tEhxvqeSVvOu96Fv2tjmJwOtlglXz5oYGLok/busyjCx6/UIh76f4qKXt0ST2tksjZCu+B/mB+mcgbxbEjxJC7OYZixhhGrppqBS/k= X-MS-Office365-Filtering-Correlation-Id: 8d75604a-2ff7-454e-bdd9-08d59db2c3f0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020); SRVR:DM5PR2101MB1030; x-ms-traffictypediagnostic: DM5PR2101MB1030: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB1030; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1030; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(396003)(39380400002)(346002)(39860400002)(376002)(189003)(199004)(7736002)(5250100002)(53936002)(66066001)(97736004)(99286004)(6506007)(68736007)(186003)(26005)(22452003)(86362001)(11346002)(6486002)(486006)(305945005)(316002)(3280700002)(110136005)(76176011)(476003)(102836004)(6666003)(446003)(3660700001)(5660300001)(2616005)(8936002)(8676002)(6512007)(81156014)(81166006)(2906002)(36756003)(6436002)(14454004)(86612001)(10090500001)(54906003)(39060400002)(2501003)(105586002)(25786009)(4326008)(478600001)(10290500003)(1076002)(3846002)(72206003)(6116002)(106356001)(107886003)(2900100001)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1030; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zNLyMufk2vhEkwhMS1fdGPX2yULWRqdgxjGMAkbQwM5FRaEtefo3xV+wAwrDbf3F8e7Etn6bf8B/cC8OfLarEkAvxQH+uJSqHhxtvoo8IlyAc9VoTd63NjGlChQa3bcQ2J2vOgGl/wJXpJrcAa56gc2GuuN0UiYaA4XfVMrd7/6eQyTdLEjQp4BRA7cddsPLkeqhN6kZeHaxVRE8EZljSULeRzNb9z0s7li80oJ4FrtLLy7iplFe0gt5HXxd8jMwxlvDPzYb+TJL0ZhBI8m284NahvAP38u8Hxm5DFgnlevZYavhSPzIKHxYAoqZJZUVvpo2hTiGOgiTTDeoc/QnOgTp64ft7+7zMSHvwrPF4kMduozGiKdVTZAPEh6yw1VySmPdmrDabzAhB/WKyJHAgPstdm2SI4aTRFb7UohgU9Y= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d75604a-2ff7-454e-bdd9-08d59db2c3f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:51.7366 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1030 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit ade7db991b47ab3016a414468164f4966bd08202 ] This bug was fixed before, but came up again with the latest compiler in another function: fs/cifs/cifssmb.c: In function 'CIFSSMBSetEA': fs/cifs/cifssmb.c:6362:3: error: 'strncpy' offset 8 is out of the bounds [0, 4] [-Werror=array-bounds] strncpy(parm_data->list[0].name, ea_name, name_len); Let's apply the same fix that was used for the other instances. Fixes: b2a3ad9ca502 ("cifs: silence compiler warnings showing up with gcc-4.7.0") Signed-off-by: Arnd Bergmann Signed-off-by: Steve French Signed-off-by: Sasha Levin --- fs/cifs/cifssmb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.15.1 diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index b2218b755dab..fdb72e4dc776 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -6413,9 +6413,7 @@ SetEARetry: pSMB->InformationLevel = cpu_to_le16(SMB_SET_FILE_EA); - parm_data = - (struct fealist *) (((char *) &pSMB->hdr.Protocol) + - offset); + parm_data = (void *)pSMB + offsetof(struct smb_hdr, Protocol) + offset; pSMB->ParameterOffset = cpu_to_le16(param_offset); pSMB->DataOffset = cpu_to_le16(offset); pSMB->SetupCount = 1; From patchwork Mon Apr 9 00:41:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132956 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp651856ljb; Sun, 8 Apr 2018 17:43:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+c3EQFEvjFjEZVE2ke034lYhG7I8l35ij1S4BJPKvqp7y7XfDpwTT1VXtb9Hr+MG2QsY+y X-Received: by 10.98.159.129 with SMTP id v1mr26871654pfk.25.1523234608899; Sun, 08 Apr 2018 17:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234608; cv=none; d=google.com; s=arc-20160816; b=wNljbMRBJa3QaWyuw/UNAUHtQmGeJ7T89OzzxhSA9BL8c2eE7bcidXjazIPFeKjL83 ad8e7/4VQTf5VByzZc8Z7hx7iPYHojJAIT7fsXP5VIMuUFOFGqRs6zp+o9EwIqQMqc3Z MqGsP6p2FBIki0lonqtIHRsCpbhnnveNxSPuYDzluJkT9eL8hJbMp8v3SWJTntDDPPMe 5kNEbZR8kPaXZgTVBjcof5DeaLhpWpph4XVTcGw0mIt2D4maasdfLuahuRd2cxRio7LP VfW8ETMXR8EHk813W4tLYfpkDy+PF7lsabvcQU/hTSOdN0+cnHk1bDcb2XF5k/AKQBQn N8Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=l9Qh9daUiCJOtiFVeI7ZVtEog8KCK7r9m58IgC1W1/o=; b=gvFNg2m6/NmPaax3pbuL6nS4BcJFqcYrTQMWnt4Eq/VlxSvvM/9S9H/tKU+yiQY2Sz YYwTZ5uUBNxjf+Gl9mic3xTusG1Al3jxCdU1bKdVT778a6i4dIYqhMRoWR8tpc4bmR8C +8GLfVAHnuwECcNHrb6FPCJQhPbvpDDcN8PKj9bwuo360XOC5VUxo0Jcp6HJbaJT/iOi +FQ3miNaZMTDw3jx+KrO3kZOfLq5wkRYnSRTD8bV/aWg1vU322bil+/VnJziCpUm3aUx ZLekFFMJUgjI0Nse5bAPNdQhSi4rmjvm7Sc1OSb8rh+WFHForXvn43rIwFvmQYdWVz32 84wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=eozvAQx8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n77si11750471pfh.307.2018.04.08.17.43.28; Sun, 08 Apr 2018 17:43:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=eozvAQx8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932796AbeDIAnY (ORCPT + 29 others); Sun, 8 Apr 2018 20:43:24 -0400 Received: from mail-sn1nam02on0133.outbound.protection.outlook.com ([104.47.36.133]:59745 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756794AbeDIAmf (ORCPT ); Sun, 8 Apr 2018 20:42:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=l9Qh9daUiCJOtiFVeI7ZVtEog8KCK7r9m58IgC1W1/o=; b=eozvAQx8J4wBacoKiQe7IG96pRgzao32PIGkYejxS0ShmE3DtRNaN7nlb9XiEFq3hKjEMvQCM7lIpXiyLapQF8p+aP7nxY1YUA5UwfEKmPKY7ekA3eI2hUa5cxminuPM92blwGhmX010JNv8d4Luwu/uHP8u6RJGQ+gd/z36s6c= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1029.namprd21.prod.outlook.com (52.132.128.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:42:29 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:42:29 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Mark Salter , Marc Zyngier , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 101/101] irqchip/gic-v3: Change pr_debug message to pr_devel Thread-Topic: [PATCH AUTOSEL for 3.18 101/101] irqchip/gic-v3: Change pr_debug message to pr_devel Thread-Index: AQHTz5uP+MoLNiNrBU290svySM1EeQ== Date: Mon, 9 Apr 2018 00:41:55 +0000 Message-ID: <20180409004042.164920-51-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1029; 7:fFoXy6f1/jkHSYU7R6+KEIjZco7nS0SC3lNZ/ukA4Un6HkDqvNs/DNrj3oQT+i9FkXGKpufToUHdHE9ZnyVIxmT+uGmrnLs80UocemrvBgIUGhQ7UDQdzdtduXKSoXORbYU2/nGxIuVvCqTEc931l+JHI+r9bO9lh73vnZmYK+zCGGXc5Xx8oO5K7RnbRej6n9n2MpSQaHlqX3M6gGShYC8LB0gZjIWVqaSZsayWBwDC+/m7f9AE7z2NXuVmkQ3e; 20:baAKljSfGuNc0qAtwwXebOpHWAyvnoG6hyRAPfpHiNxZCE/namoBNf0mXNlNinfONFDCQGutlYB5unWN4pO6AIGBcN6+qT/cejHst0CEpoYAUG4sI27dy2P2huV2vqQTEU71fekds/0b/sYK1NCu68GGGO/tETwzEIhnudCZwOM= X-MS-Office365-Filtering-Correlation-Id: 70008c1c-bb5d-40ad-7d6e-08d59db2c617 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020); SRVR:DM5PR2101MB1029; x-ms-traffictypediagnostic: DM5PR2101MB1029: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB1029; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1029; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(376002)(346002)(39860400002)(366004)(189003)(199004)(7736002)(5250100002)(53936002)(66066001)(97736004)(22452003)(99286004)(68736007)(186003)(6506007)(26005)(2616005)(6486002)(86362001)(15650500001)(11346002)(486006)(305945005)(59450400001)(316002)(3280700002)(110136005)(76176011)(476003)(102836004)(6666003)(446003)(3660700001)(5660300001)(8936002)(8676002)(6512007)(81166006)(81156014)(2906002)(6436002)(36756003)(14454004)(86612001)(10090500001)(54906003)(2501003)(105586002)(25786009)(4326008)(478600001)(10290500003)(1076002)(3846002)(72206003)(6116002)(106356001)(107886003)(2900100001)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1029; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: d/18/eAQwjAV9moiXF0j8YTNpHxErKIggRjGVQjzhFyxtH0vWCIcG4YaQ7NDOzs1CrUZOlvtOSGqTn9CpvqES5WChcbjL42mpYEskzPNm7tWhXP107KbHSaBj6GdAEebif5qgKVp7MAew2ltk9E0lBSVQdTqukt3dpw7s2vmDEm0k27oYGud2JVb2vACx3z4kI8Z1YZjdV8rnzHVkg29a/6sDpPUtUxiBYA3P3ccEm/u2f6lV/91Po33APEnwUqQH8rA3AK4UoXCCrYiMRgyzSQrBKEvTt55CixnDjFUrepF9NHKnbw5ZTL6WmTxsuEgFMVOarwPKz9mUhn1hwm3Mv/JVjgtIn1BFYyZzscvl+7dQVaORIicpStlOs5R/0GKdwjWT/VqJM8Ii/Fdpr4YLuJxo+XHmbw3DOvoljLqEpk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70008c1c-bb5d-40ad-7d6e-08d59db2c617 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:55.7522 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1029 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Salter [ Upstream commit b6dd4d83dc2f78cebc9a7e6e7e4bc2be4d29b94d ] The pr_debug() in gic-v3 gic_send_sgi() can trigger a circular locking warning: GICv3: CPU10: ICC_SGI1R_EL1 5000400 ====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #1 Tainted: G W ------------------------------------------------------ dynamic_debug01/1873 is trying to acquire lock: ((console_sem).lock){-...}, at: [<0000000099c891ec>] down_trylock+0x20/0x4c but task is already holding lock: (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->lock){-.-.}: __lock_acquire+0x3b4/0x6e0 lock_acquire+0xf4/0x2a8 _raw_spin_lock+0x4c/0x60 task_fork_fair+0x3c/0x148 sched_fork+0x10c/0x214 copy_process.isra.32.part.33+0x4e8/0x14f0 _do_fork+0xe8/0x78c kernel_thread+0x48/0x54 rest_init+0x34/0x2a4 start_kernel+0x45c/0x488 -> #1 (&p->pi_lock){-.-.}: __lock_acquire+0x3b4/0x6e0 lock_acquire+0xf4/0x2a8 _raw_spin_lock_irqsave+0x58/0x70 try_to_wake_up+0x48/0x600 wake_up_process+0x28/0x34 __up.isra.0+0x60/0x6c up+0x60/0x68 __up_console_sem+0x4c/0x7c console_unlock+0x328/0x634 vprintk_emit+0x25c/0x390 dev_vprintk_emit+0xc4/0x1fc dev_printk_emit+0x88/0xa8 __dev_printk+0x58/0x9c _dev_info+0x84/0xa8 usb_new_device+0x100/0x474 hub_port_connect+0x280/0x92c hub_event+0x740/0xa84 process_one_work+0x240/0x70c worker_thread+0x60/0x400 kthread+0x110/0x13c ret_from_fork+0x10/0x18 -> #0 ((console_sem).lock){-...}: validate_chain.isra.34+0x6e4/0xa20 __lock_acquire+0x3b4/0x6e0 lock_acquire+0xf4/0x2a8 _raw_spin_lock_irqsave+0x58/0x70 down_trylock+0x20/0x4c __down_trylock_console_sem+0x3c/0x9c console_trylock+0x20/0xb0 vprintk_emit+0x254/0x390 vprintk_default+0x58/0x90 vprintk_func+0xbc/0x164 printk+0x80/0xa0 __dynamic_pr_debug+0x84/0xac gic_raise_softirq+0x184/0x18c smp_cross_call+0xac/0x218 smp_send_reschedule+0x3c/0x48 resched_curr+0x60/0x9c check_preempt_curr+0x70/0xdc wake_up_new_task+0x310/0x470 _do_fork+0x188/0x78c SyS_clone+0x44/0x50 __sys_trace_return+0x0/0x4 other info that might help us debug this: Chain exists of: (console_sem).lock --> &p->pi_lock --> &rq->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->lock); lock(&p->pi_lock); lock(&rq->lock); lock((console_sem).lock); *** DEADLOCK *** 2 locks held by dynamic_debug01/1873: #0: (&p->pi_lock){-.-.}, at: [<000000001366df53>] wake_up_new_task+0x40/0x470 #1: (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc stack backtrace: CPU: 10 PID: 1873 Comm: dynamic_debug01 Tainted: G W 4.15.0+ #1 Hardware name: GIGABYTE R120-T34-00/MT30-GS2-00, BIOS T48 10/02/2017 Call trace: dump_backtrace+0x0/0x188 show_stack+0x24/0x2c dump_stack+0xa4/0xe0 print_circular_bug.isra.31+0x29c/0x2b8 check_prev_add.constprop.39+0x6c8/0x6dc validate_chain.isra.34+0x6e4/0xa20 __lock_acquire+0x3b4/0x6e0 lock_acquire+0xf4/0x2a8 _raw_spin_lock_irqsave+0x58/0x70 down_trylock+0x20/0x4c __down_trylock_console_sem+0x3c/0x9c console_trylock+0x20/0xb0 vprintk_emit+0x254/0x390 vprintk_default+0x58/0x90 vprintk_func+0xbc/0x164 printk+0x80/0xa0 __dynamic_pr_debug+0x84/0xac gic_raise_softirq+0x184/0x18c smp_cross_call+0xac/0x218 smp_send_reschedule+0x3c/0x48 resched_curr+0x60/0x9c check_preempt_curr+0x70/0xdc wake_up_new_task+0x310/0x470 _do_fork+0x188/0x78c SyS_clone+0x44/0x50 __sys_trace_return+0x0/0x4 GICv3: CPU0: ICC_SGI1R_EL1 12000 This could be fixed with printk_deferred() but that might lessen its usefulness for debugging. So change it to pr_devel to keep it out of production kernels. Developers working on gic-v3 can enable it as needed in their kernels. Signed-off-by: Mark Salter Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- drivers/irqchip/irq-gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.1 diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index ec8468829aef..b08de05bf627 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -488,7 +488,7 @@ static void gic_send_sgi(u64 cluster_id, u16 tlist, unsigned int irq) MPIDR_TO_SGI_AFFINITY(cluster_id, 1) | tlist << ICC_SGI1R_TARGET_LIST_SHIFT); - pr_debug("CPU%d: ICC_SGI1R_EL1 %llx\n", smp_processor_id(), val); + pr_devel("CPU%d: ICC_SGI1R_EL1 %llx\n", smp_processor_id(), val); gic_write_sgi1r(val); }