[{"id":5226,"web_url":"https://patchwork.libcamera.org/comment/5226/","msgid":"<20200617002931.GN913@pendragon.ideasonboard.com>","date":"2020-06-17T00:29:31","subject":"Re: [libcamera-devel] [PATCH 2/2] v4l2: v4l2_compat_manager: Use\n\topenat64 and mmap64","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Tue, Jun 16, 2020 at 07:56:33PM +0900, Paul Elder wrote:\n> Since we set _FILE_OFFSET_BITS to 32 to force the various open and mmap\n> symbols that we export to not be the 64-bit versions, our dlsym to get\n> the original open and mmap calls will not automatically be converted to\n> their 64-bit versions. Since we intercept both 32-bit and 64-bit\n> versions of open and mmap, we should be using the 64-bit version to\n> service both. Fetch the 64-bit versions of openat and mmap directly.\n\nAh, this answer a question from the review of 1/2 :-) Shouldn't this\npatch be squashed with 1/2 to avoid bisection breakages ?\n\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  src/v4l2/v4l2_compat_manager.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n> index f928760..9298c0f 100644\n> --- a/src/v4l2/v4l2_compat_manager.cpp\n> +++ b/src/v4l2/v4l2_compat_manager.cpp\n> @@ -39,11 +39,11 @@ void get_symbol(T &func, const char *name)\n>  V4L2CompatManager::V4L2CompatManager()\n>  \t: cm_(nullptr)\n>  {\n> -\tget_symbol(fops_.openat, \"openat\");\n> +\tget_symbol(fops_.openat, \"openat64\");\n>  \tget_symbol(fops_.dup, \"dup\");\n>  \tget_symbol(fops_.close, \"close\");\n>  \tget_symbol(fops_.ioctl, \"ioctl\");\n> -\tget_symbol(fops_.mmap, \"mmap\");\n> +\tget_symbol(fops_.mmap, \"mmap64\");\n>  \tget_symbol(fops_.munmap, \"munmap\");\n>  }\n>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E2EB603D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Jun 2020 02:29:54 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C6DBDF9;\n\tWed, 17 Jun 2020 02:29:53 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"L+vt09vY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592353794;\n\tbh=mZESRKwHUxUW7JZ41dHVUCbguluAS0ilCoUMWl58C/Q=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=L+vt09vYwlpg/wTwkTeDjnsJhjPdzeS7PU8bOnVqhdeCaDn90Zr2LsmQOUGKp4xpp\n\tMPqsSbkw8mcHygT5O2pHHRdEnWzyPEtyQPaEEM4rny1JeuVAoX1vHvFangbBvjqHHq\n\t6j7I5eBGCn53F97AdwTHAm5c6W65Fsis0uluF0Uk=","Date":"Wed, 17 Jun 2020 03:29:31 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200617002931.GN913@pendragon.ideasonboard.com>","References":"<20200616105633.57717-1-paul.elder@ideasonboard.com>\n\t<20200616105633.57717-2-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200616105633.57717-2-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 2/2] v4l2: v4l2_compat_manager: Use\n\topenat64 and mmap64","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 17 Jun 2020 00:29:54 -0000"}}]