Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1091384imm; Wed, 11 Jul 2018 17:09:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpevT4iNrnQiHkCmfJXMm/EHeI3IE/JBwstR6r7xU5IVqJsnTA2/EfjeLOjF0fOZlGJmpdR8 X-Received: by 2002:a17:902:8a87:: with SMTP id p7-v6mr629230plo.281.1531354168288; Wed, 11 Jul 2018 17:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531354168; cv=none; d=google.com; s=arc-20160816; b=jDx0B1GjjO+MnC5ul6ebIl/1Bk4+5aWRQXarAIQ2IuOzRtolifrKj/u2PqC5KnnHif rGsYCbIehAEmSXpf6AoQ5KIvoHFcCFMOWQMdnLxFIymEECzHYYk1S0imAuX9HgFsEnX/ iI+hZGVa+Mc88hSQQTiUIQzraR4U4SZG/plwdOhC+u8nGNrgaCkRgYiTIMwC3bNhFRDI BHuDxZulbEPAo9PKdZdh+ctIzJuLFgjSr0YlpJymtbq+NNaw5WVbE+RmgzxyG3rIydZQ jEO0jYQQNLLMDooQDWRqzSWsjhNgCSl/LpB6OGIzsnwy9xSShcWAFqv6jM9k7jvWOBX8 jMrg== 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 :content-id: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=eTXhXtKzZdRQgR7+tLsqwIN6jpymc7vE6c9N5UWX88U=; b=LFef8e1uuIPI0Q9gzuz2JjFgjlA+86fyqSIzBx1kw9UUXa5MBo/MlD1PPfirJyr3Vl KMlZVXR4kQ4xBaqr0ewNBI+o9SLllhmy/bXws/CjWEfSs9jkaSMjQzslplGiTHY7+ZqN H50JNGFezdTyat9bPCPOtFBVmZNZJwoaGho2QtaMPr8kVY4Bb+CgVRTsBotf43/Ri0zP 7esZ+0CiAfRnnoXFo4+V3L7J7QLgG8XV0d9lHW4NoNPsWyZnkKJUbJpx+rk6HMChuWgY aGPtGWMfj1UgbHd76BoWXwxiAIMRIzRfEs7NXlB0/S19hqY6/jQsZUcTVUkxwQv1kEXU TdFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=IAX5mQ9J; 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=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c192-v6si21967400pfg.347.2018.07.11.17.09.13; Wed, 11 Jul 2018 17:09: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=@Mellanox.com header.s=selector1 header.b=IAX5mQ9J; 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=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389478AbeGKTQY (ORCPT + 99 others); Wed, 11 Jul 2018 15:16:24 -0400 Received: from mail-eopbgr10084.outbound.protection.outlook.com ([40.107.1.84]:14256 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726457AbeGKTQY (ORCPT ); Wed, 11 Jul 2018 15:16:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eTXhXtKzZdRQgR7+tLsqwIN6jpymc7vE6c9N5UWX88U=; b=IAX5mQ9J38C2oyG0HCyp0VuLnh0sqPeieVH497ujse/aW2fnzDIZ2MV2fLOdKT5PkRQWqFfADKJvl+GwrKFyuc1R2ETeWUtGa6qydu2O8cJSG9iAqoDvCsi8YbMz09fq8EmJ1shN/6IfjxJBoQ/cK3EMD52RTVCJEFHegniNl4M= Received: from DB6PR0502MB2901.eurprd05.prod.outlook.com (10.172.249.140) by DB6PR0502MB2902.eurprd05.prod.outlook.com (10.172.249.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Wed, 11 Jul 2018 19:10:38 +0000 Received: from DB6PR0502MB2901.eurprd05.prod.outlook.com ([fe80::68db:4d69:9ef5:f7e0]) by DB6PR0502MB2901.eurprd05.prod.outlook.com ([fe80::68db:4d69:9ef5:f7e0%2]) with mapi id 15.20.0952.017; Wed, 11 Jul 2018 19:10:38 +0000 From: Saeed Mahameed To: "jannh@google.com" , "davem@davemloft.net" , "leon@kernel.org" CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" Subject: Re: [PATCH net v2] net/mlx5: fix uaccess beyond "count" in debugfs read/write handlers Thread-Topic: [PATCH net v2] net/mlx5: fix uaccess beyond "count" in debugfs read/write handlers Thread-Index: AQHUFWZ9EShNbOvOz0qKYfq8Ca06e6SKauUA Date: Wed, 11 Jul 2018 19:10:38 +0000 Message-ID: <063e455ca5fc8af9f888eb9afd03f24f4320db25.camel@mellanox.com> References: <20180706201809.105152-1-jannh@google.com> In-Reply-To: <20180706201809.105152-1-jannh@google.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Evolution 3.28.2 (3.28.2-1.fc28) authentication-results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0502MB2902;7:SgX0PVUN1dJjqrr2RhLlm6jbHi6GkjGoiuuw6sFjUpM+xDS8ztEzC969l3yZ+Kr19dbN+rD7esBXuHMrz8ymEoP+68tS56SGo7hWYAIPzkCRBPLIeWaEl9HcAu9C1dZz/0Yd8xjqXwB/HsLhK52P0Y9Ru82IswF8/tCHd1RpHvjBZiNJEMC1hm9sLLl7rCKsRSNobb9UXMTZ627pWBXdjOYV9RErveP7InM7GMomFwVYP0sKDHMCDqwOZMb5tuut x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 39c08413-4c1d-42e5-319e-08d5e761fcee x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020);SRVR:DB6PR0502MB2902; x-ms-traffictypediagnostic: DB6PR0502MB2902: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(192374486261705)(211936372134217)(153496737603132)(17755550239193); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:DB6PR0502MB2902;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0502MB2902; x-forefront-prvs: 0730093765 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(346002)(136003)(376002)(366004)(199004)(189003)(6246003)(256004)(476003)(3846002)(186003)(118296001)(106356001)(14444005)(2900100001)(105586002)(54906003)(14454004)(446003)(2616005)(6116002)(110136005)(11346002)(2906002)(25786009)(6506007)(305945005)(66066001)(76176011)(6486002)(36756003)(26005)(50226002)(2501003)(4326008)(99286004)(7736002)(6436002)(229853002)(102836004)(5250100002)(81166006)(2201001)(8676002)(8936002)(5660300001)(478600001)(97736004)(6512007)(53936002)(486006)(81156014)(316002)(86362001)(68736007)(99106002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0502MB2902;H:DB6PR0502MB2901.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:3; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: AU8lL4Ejp1wg3Uzf0dm4H31VKttamXSTNdy1f6cwzI1tR7o3kLti9KQx7bgmJpPTQ9YuSLLaMyT0dkYEjuJUG1eq5eB2jzm2jDOP6l5HYFCrYjww0EmXksLN1OyiaupGq5e0oNesGupHh1iY1SciZ6r0t4BnL0W/ggddokQ1EXQIkDR873N9DPa45scKRpt+i03ESa5nyJLEjAcWExbZ5W+N3PbaHP0z35w3T2zkuRxBu5sQtPa3MibCltRRYnrZwyTOytaLoQ7CDAboa48tVm8i7ApXHqYyHL5P5WaWImr7LT3XZG1UYo/jmSfEnIaNL3S657BS/u/XqVAwZgpG0NqjfWuCcxPQW5Rr0BVDm24= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <72918A0A00DFAC49B498D4A7054AE0BC@eurprd05.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39c08413-4c1d-42e5-319e-08d5e761fcee X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jul 2018 19:10:38.2764 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0502MB2902 Sender: linux-kernel-owner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