From patchwork Sun Sep 14 13:47:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 4901401 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 857A7BEEA5 for ; Sun, 14 Sep 2014 13:48:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5D1820219 for ; Sun, 14 Sep 2014 13:48:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDFF72026F for ; Sun, 14 Sep 2014 13:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752502AbaINNsJ (ORCPT ); Sun, 14 Sep 2014 09:48:09 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:36233 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494AbaINNsJ (ORCPT ); Sun, 14 Sep 2014 09:48:09 -0400 Received: by mail-wi0-f174.google.com with SMTP id n3so2874172wiv.13 for ; Sun, 14 Sep 2014 06:48:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/mBugmX7Qj2aQY7S/AsmhPxsfH3Y9sU3oI6C9MGYWYM=; b=MzliqFNUzuTLq5iPa4Ugf9YZMxqOqXvLHllvEn3XvQ42pGwvUc3TYYDG76l0S6U0F5 CGDUtvWwq6aa84t4a5/Dei2SH7RxL017v/ZW/mG6dkyN8IlK6jmMeZ1qYFFIBr5n3H8L 654hEk89l0cdzmBHshkBjGF1pvLIoFzupExAcUPG0PC7VO6VYXOJ/DCEwyRBDf7Py2g7 rtt40FlDSnyfwtupd4CoV4GIIztAhhNOT1zPWkTmqQrWAGRwDnw4vHnBmXqp8Jo3MeeT tVGSZ/slD41HeU6U0BQpSzpnyv51iQP3w/UjzWFdzC3Yf7SolAO6SzwSGySCKj6AOHrI gVWg== X-Gm-Message-State: ALoCoQks3qua2tf6icaoEYv1CRTkbPhgp1eMSh4xEklqaHdXHCM/28htK3ER1ssDtTlEce6pHEZ7 X-Received: by 10.194.7.136 with SMTP id j8mr25800687wja.62.1410702487636; Sun, 14 Sep 2014 06:48:07 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id hy9sm11234654wjb.27.2014.09.14.06.48.06 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 14 Sep 2014 06:48:07 -0700 (PDT) From: Eli Cohen X-Google-Original-From: Eli Cohen To: roland@kernel.org, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, ogerlitz@mellanox.com, amirv@mellanox.com, Eli Cohen Subject: [PATCH for-next 3/6] IB/core: Avoid leakage from kernel to user space Date: Sun, 14 Sep 2014 16:47:52 +0300 Message-Id: <1410702475-28826-4-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410702475-28826-1-git-send-email-eli@mellanox.com> References: <1410702475-28826-1-git-send-email-eli@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clear the reserved field of struct ib_uverbs_async_event_desc which is copied to user space. Signed-off-by: Eli Cohen Reviewed-by: Yann Droneaud --- drivers/infiniband/core/uverbs_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index c73b22a257fe..b21af1eaf503 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -477,6 +477,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file, entry->desc.async.element = element; entry->desc.async.event_type = event; + entry->desc.async.reserved = 0; entry->counter = counter; list_add_tail(&entry->list, &file->async_file->event_list);