From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbdGON0g (ORCPT ); Sat, 15 Jul 2017 09:26:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbdGON0f (ORCPT ); Sat, 15 Jul 2017 09:26:35 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 553BD356C3 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 553BD356C3 Date: Sat, 15 Jul 2017 08:26:34 -0500 From: Josh Poimboeuf To: Mike Galbraith Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH] debug: fix WARN_ON_ONCE() for modules Message-ID: <20170715132634.w4ytbyidwpb5zzsp@treble> References: <1500100197.27838.21.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1500100197.27838.21.camel@gmx.de> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 15 Jul 2017 13:26:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 15, 2017 at 08:29:57AM +0200, Mike Galbraith wrote: > On Sat, 2017-07-15 at 00:10 -0500, Josh Poimboeuf wrote: > > > > The bug table was made writable for vmlinux, which relies on > > vmlinux.lds.S and vmlinux.lds.h for laying out the sections. However, > > it wasn't made writable for modules, which rely on the ELF section > > header flags. > > It seems vmlinux sort of relies on your fix too.  objdump did show > vmlinux __bug_table as being READONLY, but that (lie) is now gone. Yeah, those ELF bits are ignored by the kernel. It sets its own protections during boot, e.g. mark_rodata_ro(). -- Josh