From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753268AbdC0Ozv (ORCPT ); Mon, 27 Mar 2017 10:55:51 -0400 Received: from odin.sdf-eu.org ([178.63.35.194]:62539 "EHLO sdfeu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292AbdC0Ozn (ORCPT ); Mon, 27 Mar 2017 10:55:43 -0400 X-Greylist: delayed 567 seconds by postgrey-1.27 at vger.kernel.org; Mon, 27 Mar 2017 10:55:43 EDT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 27 Mar 2017 16:45:42 +0200 From: none To: Linux Kernel , linux-x86_64@vger.kernel.org Subject: Getting the way a SIGSEGV append when catching a SIGSEGV from within X-Priority: 1 (Highest) Message-ID: User-Agent: Roundcube Webmail/1.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, There’s three way to perform an invalid memory access : The attempt to execute/jump at an invalid address. The attempt to read at an invalid address. The attempt to write at an invalid address. Determining the execute case with rt_sigaction is easy : the last value of eip match the value of the address which caused the segfault. But how to know if the SIGSEGV occurred by a read or by a write attempt ? In the same time shouldn’t that information belong in the mmu ?