Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp627773ybi; Fri, 21 Jun 2019 05:36:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxez7O067eEGHeURxSwmc38nHgZe/+yOVr0Ey1C89dfCLEPRjkZGmWD+kcC4zKmYRufDahS X-Received: by 2002:a17:902:2ba7:: with SMTP id l36mr129894807plb.334.1561120565211; Fri, 21 Jun 2019 05:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561120565; cv=none; d=google.com; s=arc-20160816; b=WG99Lxel7aLe7wCRXEG7H6vqiaREF/eqQadHB8jLiJrNQmoihW80pnn98bYkPH31f8 6iaDViRiNgEViexsxkFA9+k7N1Igkfc39NoUTay+JBfngx0ZEhMoD79/AKYj4g/Ny1/Q 16EhBaiRTCfMRc4IGIGg03Lhj5Hw4EIeRrnTY792cYOA+uLVvtbpaGeeTpSufSScIOo0 Um+azhEsDrtP3LnM+oeusPeUQf3oGT6LkZ2GnjhDKAxp993OFvajbYuilebFEXGNxOML wyUwUml1EPeQVSW5q3qC2GnxNvGK14+GEkxl4LAx/I9ogOpgYDwIS8cML3ypyFqiNeSg zRjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=aqxEk3AuS673sQy1r/sDm4ajZZG6+YPzSlY8zRvcZgI=; b=pjU6ACWK37tYLCeoHr7TTQXX1TJ8ttkFQiRzX0FZkwJrYagmvsQmU3Cg7G61lzS0j4 rqgjDYcLZrprAwj2ExZSmqWpXExi1VTJga0hGzKLZlugD3L7KOy+5UPYg5vDwsUyNGLM jUrZjxHfPo/Y+ueMlQZtr8BmZqBiitdSCgH2un/S8I0EHT790sTwni6ZPTHm5iQ/dv10 9R0Ep83fI2Goyli9hdH+neuGgxdz1e5/7zgXPdFbRN7i2N8QZXBw8yzWQtNxEdYUNh/9 WMD4WF0yFlhStV74hhXKVRQwZQxvKr4PzmRA+Y+yaUC5lMHP7WXQH8Bq+CFHSYkarJAZ rawg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tq-group.com header.s=key1 header.b=EBbxJy8m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si2476548pgn.212.2019.06.21.05.35.48; Fri, 21 Jun 2019 05:36:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@tq-group.com header.s=key1 header.b=EBbxJy8m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726716AbfFUMfe (ORCPT + 99 others); Fri, 21 Jun 2019 08:35:34 -0400 Received: from mx1.tq-group.com ([62.157.118.193]:39003 "EHLO mx1.tq-group.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbfFUMfe (ORCPT ); Fri, 21 Jun 2019 08:35:34 -0400 X-IronPort-AV: E=Sophos;i="5.62,400,1554760800"; d="scan'208";a="7910699" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 21 Jun 2019 14:35:32 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 21 Jun 2019 14:35:32 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 21 Jun 2019 14:35:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1561120532; x=1592656532; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=5tDcdFA7jt8oRJCaRznIaC8jGoQmD68px+5NZuAjsmM=; b=EBbxJy8mZJFU6+uPddrVEBEOugyrubakp1oD3LsqOslvl/CZo5fDxZbM HatbJuyRnWa79a8POBo8M7Y7dzAhcCWQnDH08/xH2W+MjAA+BGnfeK1XZ 0bSl4PvF7ZcytPOZtnlHoAOGcHVcejqfDNDMKFm+1Fs1DjBDnAM0JMHik B9BUm6qaC0kwTR+kqePvQKHn3pkMUGaZUrpT6X+j6LoEnPp58G7/7uQfl +fh10r9sTeU7LQ+qO1hcDDZcaTuFyeEKTF/kDqO0epMtvohnRSLNGgzNd umeeOyZ7hT/0SO/D4MtogO0ThrEBIdXZYuqTzUX4oSoMRYiZTgPSCEZQP Q==; X-IronPort-AV: E=Sophos;i="5.62,400,1554760800"; d="scan'208";a="7910698" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 21 Jun 2019 14:35:32 +0200 Received: from schifferm-ubuntu4.tq-net.de (schifferm-ubuntu4.tq-net.de [10.117.49.26]) by vtuxmail01.tq-net.de (Postfix) with ESMTPA id 957D7280074; Fri, 21 Jun 2019 14:35:51 +0200 (CEST) Message-ID: Subject: Re: [PATCH modules v2 0/2] Fix handling of exit unwinding sections (on ARM) From: Matthias Schiffer To: Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, Jessica Yu Date: Fri, 21 Jun 2019 14:35:29 +0200 In-Reply-To: <20190607104912.6252-1-matthias.schiffer@ew.tq-group.com> References: <20190607104912.6252-1-matthias.schiffer@ew.tq-group.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-06-07 at 12:49 +0200, Matthias Schiffer wrote: > For some time (050d18d1c651 "ARM: 8650/1: module: handle negative > R_ARM_PREL31 addends correctly", v4.11+), building a kernel without > CONFIG_MODULE_UNLOAD would lead to module loads failing on ARM > systems with > certain memory layouts, with messages like: > > imx_sdma: section 16 reloc 0 sym '': relocation 42 out of range > (0x7f015260 -> 0xc0f5a5e8) > > (0x7f015260 is in the module load area, 0xc0f5a5e8 a regular vmalloc > address; relocation 42 is R_ARM_PREL31) > > This is caused by relocatiosn in the .ARM.extab.exit.text and > .ARM.exidx.exit.text sections referencing the .exit.text section. As > the > module loader will omit loading .exit.text without > CONFIG_MODULE_UNLOAD, > there will be relocations from loaded to unloaded sections; the > resulting > huge offsets trigger the sanity checks added in 050d18d1c651. > > IA64 might be affected by a similar issue - sections with names like > .IA_64.unwind.exit.text and .IA_64.unwind_info.exit.text appear in > the ld > script - but I don't know much about that arch. > > Also, I'm not sure if this is stable-worthy - just enabling > CONFIG_MODULE_UNLOAD should be a viable workaround on affected > kernels. > > v2: Use __weak function as suggested by Jessica Hi Russell, this patch series is still waiting for your thoughts - in reponse to v1, Jessica already offered to take it through her tree if you give your Acked-by. Thanks, Matthias > > > Matthias Schiffer (2): > module: allow arch overrides for .exit section names > ARM: module: recognize unwind exit sections > > arch/arm/kernel/module.c | 7 +++++++ > include/linux/moduleloader.h | 5 +++++ > kernel/module.c | 7 ++++++- > 3 files changed, 18 insertions(+), 1 deletion(-) >