Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp970172imm; Wed, 10 Oct 2018 07:12:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV629wm9JJHJwS1iURbOVwFS30Xv769hIS5KONGGZVm1LiQ43Owl7fdECdnBpdbxjNqZgiIYb X-Received: by 2002:a62:d206:: with SMTP id c6-v6mr14897640pfg.8.1539180739254; Wed, 10 Oct 2018 07:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539180739; cv=none; d=google.com; s=arc-20160816; b=LUiQF1YGs6C6ZEncedQSE2+PRfhcT9oqwT3vLIdFfaQauU0jHiusmjCrpRqq7DZL6K 1SZtw8EzddWQyJdLBlZt6bOoLUEqEe+38fPHnI/Jb1JOOrhm8xcclgfee3oDRvrVLsyk qqvk7zbibLYeIAzqSRjEsYxG9YKqflvUO3tDAZ8EGaAPg8cxPJyVrtfwZXHvnUzowFVi 57OfWKs5hkNfxccFm56cRlDUYh24Q4fY+jLbDpWdDCz77+4wh/hxYT4XJ7FvlFhTvZsX KmNY4vn8GU66DSi6rfczE7Y4KbDwTMaXdKCFbPtFJN3S76zbH2SMfKnljiC3dTtPSij2 KeXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=qqbDLdIEdNTs0tgr1V/w5VM+uk8xLdPlBBIIJEGqKkE=; b=YA+AZ1AWGOHriZl2jDsn0dBe8p43kV2YTNZFg8WcyW9RJjqMlEz3hZpvZIq5+rqlWe LRGjmVgZYPuhG1f8ZsUbuFPsTLreVGzVcxQTfI1EidqylwVgOnV7K5D7WfvCgFkBfAoZ SDLTUnORSXtWp+cde3y2vKIcOLgmzzLNffZI1uTYsAePjcjrNQR1lbGdqvXliTb1Evyd Fiw7tq3tw2um+s66dIDBcsCUgvo5AtTMX+L0XAm/VNHztFfBftOKJRgVBf/zutQ6uL6l JzCDaoWtWUcBdR4OVr2ha4Jo9J3FqK64AoXe/posh2Hl+p6s9COvLF3LsrrXv/qWh1Zg Z6Ug== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 g8-v6si95914plt.434.2018.10.10.07.12.04; Wed, 10 Oct 2018 07:12:19 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbeJJVbx (ORCPT + 99 others); Wed, 10 Oct 2018 17:31:53 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:49398 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726890AbeJJVbx (ORCPT ); Wed, 10 Oct 2018 17:31:53 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with ESMTPS (AES256-SHA encrypted); 10 Oct 2018 15:14:40 +0200 Received: from dev-l-vrt-136.mtl.labs.mlnx (dev-l-vrt-136.mtl.labs.mlnx [10.134.136.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w9AD9oQT003274; Wed, 10 Oct 2018 16:09:50 +0300 Received: from dev-l-vrt-136.mtl.labs.mlnx (localhost [127.0.0.1]) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id w9AD9oVm022232; Wed, 10 Oct 2018 16:09:50 +0300 Received: (from moshe@localhost) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id w9AD9nfJ022231; Wed, 10 Oct 2018 16:09:49 +0300 From: Moshe Shemesh To: "David S. Miller" Cc: Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Moshe Shemesh Subject: [PATCH net 0/3] devlink param type string fixes Date: Wed, 10 Oct 2018 16:09:24 +0300 Message-Id: <1539176967-22172-1-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset fixes devlink param infrastructure for string param type. The devlink param infrastructure doesn't handle copying the string data correctly. The first two patches fix it and the third patch adds helper function to safely copy string value without exceeding DEVLINK_PARAM_MAX_STRING_VALUE. Moshe Shemesh (3): devlink: Fix param set handling for string type devlink: Fix param cmode driverinit for string type devlink: Add helper function for safely copy string param include/net/devlink.h | 12 ++++++++++-- net/core/devlink.c | 43 +++++++++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 8 deletions(-) -- 1.8.3.1