Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757628Ab0KKAjZ (ORCPT ); Wed, 10 Nov 2010 19:39:25 -0500 Received: from mga02.intel.com ([134.134.136.20]:2555 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753616Ab0KKAjX convert rfc822-to-8bit (ORCPT ); Wed, 10 Nov 2010 19:39:23 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,180,1288594800"; d="scan'208";a="572336743" From: "Hefty, Sean" To: Roland Dreier , Vasiliy Kulikov CC: "kernel-janitors@vger.kernel.org" , Roland Dreier , Hal Rosenstock , Alex Chiang , Andi Kleen , Greg Kroah-Hartman , Julia Lawall , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Wed, 10 Nov 2010 16:39:20 -0800 Subject: RE: [PATCH] infiniband: core: fix information leak to userland Thread-Topic: [PATCH] infiniband: core: fix information leak to userland Thread-Index: AcuBM5nWmLc0beQzSEWbJbpgtMiz9AAAuTYA Message-ID: References: <1289054481-18145-1-git-send-email-segooon@gmail.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1063 Lines: 19 > Sean, what is intended for qp_state handling here? It seems > ib_copy_qp_attr_to_user() should either clear it or set it to something > sensible. I'm not sure what the original intent was, but both libibcm and librdmacm provide the qp_state as input to the init_qp_attr calls. It doesn't end up mattering if the kernel returns the value because the corresponding call in libibverbs (ibv_copy_qp_attr_from_kern) doesn't copy out the qp_state. So, the value that was originally specified ends up being used. The flow looks something like this: qp_attr.qp_state = INIT; cmd.qp_state = qp_attr.qp_state; write(..cmd..); ibv_copy_qp_attr_from_kern(&qp_attr, cmd.resp) I agree that it makes sense for ib_copy_qp_attr_to_user() to set the qp_state. Deciding what to do in libibverbs seems more troublesome. - Sean -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/