From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751992AbdCAGoe (ORCPT ); Wed, 1 Mar 2017 01:44:34 -0500 Received: from ozlabs.org ([103.22.144.67]:52801 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725AbdCAGoY (ORCPT ); Wed, 1 Mar 2017 01:44:24 -0500 From: Michael Ellerman To: Jason Baron , David Daney , Steven Rostedt , Sachin Sant Cc: linux-mips@linux-mips.org, Chris Metcalf , Russell King , Ralf Baechle , LKML , Rabin Vincent , Paul Mackerras , Anton Blanchard , linuxppc-dev@lists.ozlabs.org, Ingo Molnar , linux-arm-kernel@lists.infradead.org, Zhigang Lu Subject: Re: [PATCH] jump_label: align jump_entry table to at least 4-bytes In-Reply-To: <23989c10-7b47-3fda-f790-25b539704bec@akamai.com> References: <1488221364-13905-1-git-send-email-jbaron@akamai.com> <93219edf-0f6d-5cc7-309c-c998f16fe7ac@akamai.com> <20170227160601.5b79a1fe@gandalf.local.home> <6db89a8d-6053-51d1-5fd4-bae0179a5ebd@caviumnetworks.com> <20170227170911.2280ca3e@gandalf.local.home> <7fa95eea-20be-611c-2b63-fca600779465@caviumnetworks.com> <20170227173630.57fff459@gandalf.local.home> <7bd72716-feea-073f-741c-04212ebd0802@caviumnetworks.com> <68fe24ea-7795-24d8-211b-9d8a50affe9f@akamai.com> <510FF566-011D-4199-86F7-2BB4DBF36434@linux.vnet.ibm.com> <20170228112144.65455de5@gandalf.local.home> <1de00727-de97-f887-78bd-dd49131cdf61@akamai.com> <999e2c3f-698c-703c-67a9-26aea3c97dc0@caviumnetworks.com> <542488db-5c59-afa5-6d1d-a437c87bc613@akamai.com> <912fa97a-aa1d-c0e4-dc83-fc5c745db1c1@caviumnetworks.com> <23989c10-7b47-3fda-f790-25b53 9704bec@akamai.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Wed, 01 Mar 2017 17:34:51 +1100 Message-ID: <871suh5wtw.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jason Baron writes: ... > I also checked all the other .ko files and they were properly aligned. > So I think this should hopefully work, and I like that its not a > per-arch fix. > > Sachin, sorry to bother you again, but I'm hoping you can try David's > latest patch to scripts/module-common.lds, just to test in your setup. It does fix the problem. I was reproducing with crc_t10dif: [ 695.890552] ------------[ cut here ]------------ [ 695.890709] WARNING: CPU: 15 PID: 3019 at ../kernel/jump_label.c:287 static_key_set_entries+0x74/0xa0 [ 695.890710] Modules linked in: crc_t10dif(+) crct10dif_generic crct10dif_common ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter ip_tables xt_conntrack x_tables nf_nat nf_conntrack bridge stp llc dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c kvm virtio_balloon binfmt_misc autofs4 virtio_net virtio_pci virtio_ring virtio Which had: [21] __jump_table PROGBITS 0000000000000000 0004e8 000018 00 WA 0 0 1 And now has: [18] __jump_table PROGBITS 0000000000000000 0004d0 000018 00 WA 0 0 8 And all other modules have an alignment of 8 on __jump_table, as expected. I'm inclined to merge a version of the balign patch for powerpc anyway, just to be on the safe side. I guess the old code was coping fine with the unaligned keys, but it still makes me nervous. cheers