Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753925AbbFDUXi (ORCPT ); Thu, 4 Jun 2015 16:23:38 -0400 Received: from mail-qc0-f181.google.com ([209.85.216.181]:33089 "EHLO mail-qc0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752184AbbFDUXg (ORCPT ); Thu, 4 Jun 2015 16:23:36 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Thu, 4 Jun 2015 16:29:15 -0400 (EDT) To: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Stephane Eranian Subject: perf: aux buffer and mmaping PROT_WRITE Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 666 Lines: 17 So I came across this issue when improving mmap() support in the perf_fuzzer. For AUX buffers, you can specify PROT_WRITE when allocating the buffer using mmap(), and it will return a buffer just fine, but if you actually try to write anything you get an instant SIGBUS. Is this expected behavior? It seems like we should fail the initial allocation if we ask for a writable buffer but it is not writable. Vince -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/