tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Where is that trap coming from?



On Fri, Feb 08, 2019 at 03:19:07PM +0000, Emmanuel Dreyfus wrote:
> As I understand, that means SIGSEGV is not caused by userland
> code, but by kernel code. I assume that if I do a SCSI command
> that access unmapped memory, I would get something like this?
> But no thread seems to be undergoing a tape I/O.

You need to check the details of the system call, e.g. if I do a write(2),
and pass a buffer of, say, 16k, but use nbytes = 64k it will most likely
cause a SIGSEGV when the kernel tries to access a page beyound the 16k
allocated userland buffer. This access is on behalf of the user, so the
kernel will signal the process, and this looks like what you see here.

Martin


Home | Main Index | Thread Index | Old Index