From patchwork Wed Feb 8 20:20:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Marshall X-Patchwork-Id: 9563475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D1E260146 for ; Wed, 8 Feb 2017 21:24:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD136284D8 for ; Wed, 8 Feb 2017 21:24:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C12CC284FF; Wed, 8 Feb 2017 21:24:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E97B284D8 for ; Wed, 8 Feb 2017 21:24:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751589AbdBHVYj (ORCPT ); Wed, 8 Feb 2017 16:24:39 -0500 Received: from mail-yb0-f179.google.com ([209.85.213.179]:34443 "EHLO mail-yb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751209AbdBHVYf (ORCPT ); Wed, 8 Feb 2017 16:24:35 -0500 Received: by mail-yb0-f179.google.com with SMTP id j82so49837557ybg.1 for ; Wed, 08 Feb 2017 13:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=MjgsXy3Y5Dy8JdvSCfIBAGl7zjnpPzbP02Qgc4efTwg=; b=q6i49hMKhiTOCIMB9qNojySwoHDkXmptsKFOsgmtRtHaClNAU4548rsdjuPTlibbRp FGum5RcjPjMYOH4MCgNj7/vyxnwYU6JuJPRzE89w26/RzX6jCX3n84zW8GcGo/jdlLXN pU3Uq/sId3lp1oMvAJ5/mZT3yUdUAdQ4gJPQ7WkIb9DBpToIjemw+xNE87DkC6DSUT6d 5QHLj+yd1o2TO48SVfWuVq+E7eX+MoMbaFCVxwIsOleB+PBa3oXKFyAkjnyL0k6hSoqz vEdqiouWr8A09HEQtJsbtT3GD71OltAZXBF+zdD7zyAD2daj0VI/hu70LieY6EG3celv 7i6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MjgsXy3Y5Dy8JdvSCfIBAGl7zjnpPzbP02Qgc4efTwg=; b=T4hrmc+F+u0dTOGF60iwkOLpID67V6LmXVMkHU56oCib5gVJ9W8yY8ssFvB/vBVjja IKlCrEJWW8qCFZKfFi9ccrwxrsuJuWq19mayiLm/6F3qkorI7L2SoCLHiaSOgup5G3Hf fm40wVwVAIjydEvqVMk1pOaSD6a2XOvzKNQeHwUmGT0F03xE1wU9GPPTi4EpJ7bJpHKM LGgEyZzo3a5U85YFbr61PqIiiipO1or+9cGscZI8j/sBV42vUNPEXGQLOJA3tro5Jen5 27VFkNjQLbTdkWpkpEUMdN+B56QD5uJm329JuXh3rhnrPjtSxaxYBtkL+IZTT5rIUnYR UHbg== X-Gm-Message-State: AMke39krcJT92fPs3NjxweE1kh66gKB8LcJmtS2YxVZqr3NJAwDpfdxBAjgzYs2MaO8PnA== X-Received: by 10.37.17.134 with SMTP id 128mr6696165ybr.159.1486585229724; Wed, 08 Feb 2017 12:20:29 -0800 (PST) Received: from logtruck.clemson.edu ([2620:103:a003:102:738d:d49:574b:6717]) by smtp.gmail.com with ESMTPSA id n185sm4390716ywe.17.2017.02.08.12.20.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 12:20:28 -0800 (PST) From: hubcap X-Google-Original-From: hubcap To: viro@zeniv.linux.org.uk Cc: Mike Marshall , linux-fsdevel@vger.kernel.org Subject: [PATCH] orangefs: fix buffer size mis-match between kernel space and user space. Date: Wed, 8 Feb 2017 15:20:20 -0500 Message-Id: <20170208202020.4147-1-hubcap@logtruck.clemson.edu> X-Mailer: git-send-email 2.9.3 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mike Marshall The deamon through which the kernel module communicates with the userspace part of Orangefs, the "client-core", sends initialization data to the kernel module with ioctl. The initialization data was built by the client-core in a 2k buffer and copy_from_user'd into a 1k buffer in the kernel module. When more than 1k of initialization data needed to be sent, some was lost, reducing the usability of the control by which debug levels are set. This patch sets the kernel side buffer to 2K to match the userspace side... Signed-off-by: Mike Marshall --- fs/orangefs/orangefs-dev-proto.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/orangefs/orangefs-dev-proto.h b/fs/orangefs/orangefs-dev-proto.h index a3d84ff..f380f9ed 100644 --- a/fs/orangefs/orangefs-dev-proto.h +++ b/fs/orangefs/orangefs-dev-proto.h @@ -50,8 +50,7 @@ * Misc constants. Please retain them as multiples of 8! * Otherwise 32-64 bit interactions will be messed up :) */ -#define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000400 -#define ORANGEFS_MAX_DEBUG_ARRAY_LEN 0x00000800 +#define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000800 /* * The maximum number of directory entries in a single request is 96.