Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp114843ybg; Mon, 8 Jun 2020 18:01:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3IH5ev40FvSFXKtB0q4Vugzu9cVW34a39wQyg1/SBph4aMXtG+42+nCe6uEaHTUf3GtMo X-Received: by 2002:a17:906:6b8e:: with SMTP id l14mr24018613ejr.32.1591664507829; Mon, 08 Jun 2020 18:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664507; cv=none; d=google.com; s=arc-20160816; b=IWwWHq0gOda1k3g083TksyQwvPx6AUyx+egyGgp2V4J2u7NCbA8UeiJveay9gl47eY Wdj4f7hcdAPudQJHCQsSrDiHenY7Ga0rbSWA6tJ1/V3bUBhMYStHvqDRDZRcEIOax7B1 m1ofRt8hfpj0AQc6LZ+7cVEIp5+wHCaovw86HMHCCcmmjeJ7z+c9N43CcNynTQKM0bEC kVzkgVOvV3GFcbOJlwCXkPs0noEnLWzq2SAFg5yEKDI4D6uKmjEYyWNSacnRt0RFd63o wg5wxWYxzXrWi5C7GxfSdAguWNcgC/QcrcyvYODaU5GSV2DNZs0vQDvUFP704nZ88ziu 8qvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:reply-to:subject:mime-version :dkim-signature:dkim-filter; bh=EO/Fm0G63JOSK4LfY2ZRNq1/w1KrmQFpGKU7em5qlVA=; b=yAqj7IiR1v+XAHfdbSXu8iyc2qUQsA1ZGfdCn+RLLEiBpKgKNuGBhFxIclTAZTKGbn XkK5gLR/AEEnMjG498MSXeIZ4BP9TvcvnGcc7AKW9Qq69tz2rge2p9XWpXFk/puDf7Qe lm9UT0Sv+iecZ0OfxwB8Q5DTrGVq0uIMcmIjTfwTYbyOoPh9nrWfPTCks61Uum+2v4gC Mfk4jtAPeD8DxEQF95V8vTMX+db//2ImgoBuF7cf/xn8v3dHEQiaq27jV7UBTfYWX6qX Er1y3HpXfPix+wj4UfqoCirUROJD+eHPrNLjfIunr6X/RtHNjw5kPyH4a9mGCv70dNii qWzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=tKQGVlOs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si9861285edy.606.2020.06.08.18.01.25; Mon, 08 Jun 2020 18:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=tKQGVlOs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388083AbgFIA6d (ORCPT + 99 others); Mon, 8 Jun 2020 20:58:33 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:46323 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728376AbgFIA6H (ORCPT ); Mon, 8 Jun 2020 20:58:07 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20200609005804epoutp01ef6ac74f464d5f9795455ba99c62c593~WujvK9NXb0873508735epoutp01G for ; Tue, 9 Jun 2020 00:58:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20200609005804epoutp01ef6ac74f464d5f9795455ba99c62c593~WujvK9NXb0873508735epoutp01G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1591664284; bh=EO/Fm0G63JOSK4LfY2ZRNq1/w1KrmQFpGKU7em5qlVA=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=tKQGVlOsoXtBkyyLu6A1gK6yIoOp3mbVlC6SYXeizJuD23cn5H2iBk2RUJbCx8Kbf QFbvpJ5ogZDLCI6UAhuxHksz1XRegzO+PJYc78DFWG0sKNbUza9KDA+q4uRe9f1VHW l/asICSr0lGWuba0d737f3AzQBX8LJqilT5UjuTw= Received: from epcpadp2 (unknown [182.195.40.12]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20200609005803epcas1p362b3776cefe3f1f54bde1cccdb7081e9~Wujurjld11119911199epcas1p3j; Tue, 9 Jun 2020 00:58:03 +0000 (GMT) Mime-Version: 1.0 Subject: RE: [RFC PATCH 3/5] scsi: ufs: Introduce HPB module Reply-To: daejun7.park@samsung.com From: Daejun Park To: Avri Altman , Daejun Park , ALIM AKHTAR , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , "tomas.winkler@intel.com" CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <1932274274.141591664283763.JavaMail.epsvc@epcpadp2> Date: Tue, 09 Jun 2020 09:53:48 +0900 X-CMS-MailID: 20200609005348epcms2p8daabb4503ed03de4b109c97f3a7641ce Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20200605011604epcms2p8bec8ef6682583d7248dc7d9dc1bfc882 References: <336371513.41591320902369.JavaMail.epsvc@epcpadp1> <963815509.21591320301642.JavaMail.epsvc@epcpadp1> <231786897.01591320001492.JavaMail.epsvc@epcpadp1> <231786897.01591322101492.JavaMail.epsvc@epcpadp1> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +static int ufshpb_get_dev_info(struct ufs_hba *hba, > > + struct ufshpb_dev_info *hpb_dev_info, > > + u8 *desc_buf) > > +{ > > + int ret; > How about here, before doing anything, check that the descriptors are in proper size? OK, I will add a size check for the descriptor. Thanks, Daejun