Bug #81472 [PATCH]: Cannot support large linux major/minor device number when read /proc/self/maps

From: Date: Fri, 24 Sep 2021 06:16:37 +0000
Subject: Bug #81472 [PATCH]: Cannot support large linux major/minor device number when read /proc/self/maps
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236793@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81472&edit=1 ID: 81472 Patch added by: lin.a.yang@intel.com Reported by: lin dot a dot yang at intel dot com Summary: Cannot support large linux major/minor device number when read /proc/self/maps Status: Open Type: Bug Package: *General Issues Operating System: linux PHP Version: master-Git-2021-09-24 (Git) Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: Support large device major/minor number On GitHub: https://github.com/php/php-src/pull/7512 Patch: https://github.com/php/php-src/pull/7512.patch Previous Comments: ------------------------------------------------------------------------ [2021-09-24 06:14:39] lin dot a dot yang at intel dot com Description: ------------ Latest linux kernel already uses a large number (12 bits for major device, 20 bits for minor device). https://github.com/torvalds/linux/blob/master/include/linux/kdev_t.h#L10-L11 The current code only supports previous standard (5 chars) when read /proc/self/maps file during enable opcache.huge_code_pages, which means 8 bits for major and 8 bits for minor device. https://github.com/php/php-src/blob/3cd5f2685ba87c1a5804799ef97580a5b38983b5/ext/opcache/ZendAccelerator.c#L3013 It will fail to find the text segment if device number is out of that range. It can be easily fixed by increasing the device string size to 9 chars when do fscanf. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81472&edit=1

« previous php.bugs (#236793) next »