Received: by 10.192.165.156 with SMTP id m28csp1055980imm; Wed, 11 Apr 2018 11:35:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx49RT2DuRTU4FJdY00iL+7uakb/NhGrOJL1iRcZgc8y0hC27g/dgwMqyPqQKWPqPC3iPk73h X-Received: by 10.101.98.22 with SMTP id d22mr4345144pgv.344.1523471748994; Wed, 11 Apr 2018 11:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523471748; cv=none; d=google.com; s=arc-20160816; b=0EN/0Nzv6a0ZhvuNEfpkpNjrXWoyJzFi224uFKSBocZlQr3R5g2akmAmAlquYA1lhb pPKZgQG8glcdir7LqcYLX9qJeuCjpbUUeH3b34MlPBh6vnUrtAhDm1RgMEnR9avax2D0 OwY8KUpluL3S9WN9gjddeHhP225xPRL7XkwcMae2dYjtgd/ypNTY79sTVAwbT2011J6l FbtTsBziwwpK+g6K/jUAERUmuQZ1DDwlMxVpHTS5sLkahCOQ4RsRft8tkwGuumxUYZci 2SIu8XmXzSwzoNRsdhbH8Uaf3ePffs18m3K/F94b8Sv68uqxi2tH95weUC/QqWC0rv/+ oD6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=NXk5XnneGq5BVYAYcs7ZJ/pmSvNCtpXtEabvpMbBA0M=; b=l/IZB3mUqA8odbSUwPTCYD5Oj37IEtrkoGmOcmda5rSwDRReveqGeB/Lq3KBOnnO31 m/Av+jQkQTtWNO+Kn/puwqpRwdiLGnq1zgO4z+t8XdJCsdlHyRIqkbc8fwQEf3sJdkap BMLoHVlJ+rkVCvi+HGCVxd4jT0Nm8z6LVAlyzC05mhZRKFpzD8n93SF0iSQWXIS4cv/3 7daVWuHZKbLMhC3B280I2n4bStLd+2Jd32dxz1Nlu1JQT0E+qE95yH5dGbrUJ+bE+McP Z6rcRDUhBk4sUBeyfBkraj08wDTi9Wk7K6FAfLmuHY+9yv3/QTXzw3lgUA6mxWFc1cP4 vGUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=COyWEFRg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si1277976pfd.267.2018.04.11.11.35.12; Wed, 11 Apr 2018 11:35:48 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=COyWEFRg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752915AbeDKScc (ORCPT + 99 others); Wed, 11 Apr 2018 14:32:32 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:47620 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777AbeDKScb (ORCPT ); Wed, 11 Apr 2018 14:32:31 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3BIVWCV180131; Wed, 11 Apr 2018 18:32:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=NXk5XnneGq5BVYAYcs7ZJ/pmSvNCtpXtEabvpMbBA0M=; b=COyWEFRgDtxjeGuIMP8Xjqo1ANts7kWJWU7KGaMTAqsjWuwjhRKpHBsSxe52XqkA8EK9 W4jn6cbld/SMwtbBxoMseqmBsu1CamyZc+SkyJ+4yY93EUuLDvv4zjs3x9/o/zlp9dAI 5EeQuWw+nJiTFasmNQ9OLMY1IwrDnVM5cj7RoJ3LE8vKyRkR4k+YABqfHMecCGNChify vX4xuHxpfr/OoHZANzuYNfBirLRORBOT6Xx/PKCq3axmQYvEFqRnF3kWKGUHnbBE2SFO cmtf9MHgqbNVpVdpLD5qPIk+VYm/phTRALb9XkdKFPSdpVYZBa6M6eEs28Mb3yKawIYI Ag== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2h6ny3gkxg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Apr 2018 18:32:28 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w3BIWRl7021183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Apr 2018 18:32:27 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3BIWQ2X023791; Wed, 11 Apr 2018 18:32:26 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 11 Apr 2018 11:32:26 -0700 Date: Wed, 11 Apr 2018 21:32:16 +0300 From: Dan Carpenter To: Greg Hartman Cc: Alistair Strachan , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com, maco@android.com, devel@driverdev.osuosl.org, kernel-team@android.com Subject: Re: [PATCH] staging: Android: Add 'vsoc' driver for cuttlefish. Message-ID: <20180411183216.hn7l5djgrzezomtr@mwanda> References: <20180410190647.82986-1-astrachan@google.com> <20180411080536.sw6tesgi3vqgxxpn@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8860 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=467 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804110171 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2018 at 10:49:47AM -0700, Greg Hartman wrote: > > + /* Ensure that the offset is within shared memory */ > > + if (((uint64_t)arg->offset) + region_p->region_begin_offset + > > + sizeof(uint32_t) > region_p->region_end_offset) > > I'm not certain if I understand the overflow. > > arg->offset, region_begin_offset, and region_end_offset are all uint32. > Ah... You're right. I didn't read carefully. Sorry for the noise. regards, dan carpenter