[PATCH 7/7] Skip the entry if the sys_func field is NULL

H.J. Lu hjl.tools at gmail.com
Mon Feb 6 21:18:05 UTC 2012


On Mon, Feb 6, 2012 at 1:09 PM, Denys Vlasenko <dvlasenk at redhat.com> wrote:
> On 02/06/2012 04:43 PM, H.J. Lu wrote:
>>
>> On Mon, Feb 6, 2012 at 7:24 AM, Dmitry V. Levin<ldv at altlinux.org>  wrote:
>>>
>>> Hi,
>>>
>>> On Fri, Feb 03, 2012 at 10:19:55AM -0800, H.J. Lu wrote:
>>>>
>>>> Hi,
>>>>
>>>> This patch avoids segfault when there are holes in system call table.
>>>> It can happen with syscall (number, ...) and number is in those holes.
>>>
>>>
>>> We don't have sysent tables with holes yet, do we?
>>
>>
>> I am working on such a target, x32.
>
>
> How many holes are in its syscall table?
>
> Even though the performance hit of checking sysent[scno].sys_func != NULL
> is small, I would prefer to not take it, by ensuring that
> all sysent[i].sys_func are non-NULL.
>
> Currently, only ia64 and mips have largish gaps in syscall numbers.
> They simply added lots of
>
>        { MA,   0,      printargs,              "SYS_926"       }, /* 926 */
>        { MA,   0,      printargs,              "SYS_927"       }, /* 927 */
>        { MA,   0,      printargs,              "SYS_928"       }, /* 928 */
>        { MA,   0,      printargs,              "SYS_929"       }, /* 929 */
>
> lines to fill them. Can x32 do the same?
>

X32 has many holes.  A big one is

	[312 ... 511] = {},

-- 
H.J.




More information about the Strace-devel mailing list