Re: [PATCH -mm v2] coredump: extend core dump note section tocontain file names of mapped files

From: Oleg Nesterov
Date: Tue Sep 18 2012 - 13:34:01 EST


On 09/18, Oleg Nesterov wrote:
>
> On 09/18, Roland McGrath wrote:
> >
> > It's doubtful that rolling your own single loop actually performs better
> > than just calling strlen and memcpy.

Ah, I misread your message, sorry...

> This is needed to advance 'name' if d_path() fails with !ENAMETOOLONG.
> Probably needs a comment.
>
> Or perhaps 'filename = ""' case can handle this case itself. In this
> case we do not even need strlen(), remaining = name - filename.

Yes, but you strlen + memcpy as you suggested will work too.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/