From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50209C433FE for ; Fri, 7 Jan 2022 23:51:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD26A6B0074; Fri, 7 Jan 2022 18:51:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B813F6B0075; Fri, 7 Jan 2022 18:51:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A96CA6B0078; Fri, 7 Jan 2022 18:51:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0201.hostedemail.com [216.40.44.201]) by kanga.kvack.org (Postfix) with ESMTP id 986926B0074 for ; Fri, 7 Jan 2022 18:51:16 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 502EB181CAC56 for ; Fri, 7 Jan 2022 23:51:16 +0000 (UTC) X-FDA: 79005139752.16.E31ACA9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf17.hostedemail.com (Postfix) with ESMTP id BF7D94000C for ; Fri, 7 Jan 2022 23:51:15 +0000 (UTC) Received: from mail.kernel.org (unknown [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EC90861E77; Fri, 7 Jan 2022 23:51:14 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 3389660F3A; Fri, 7 Jan 2022 23:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1641599474; bh=yOsOeSv/wlGNjga0fJsyxc4HfwJ06Uk8e97pXTHHLz0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Bskey3cL0BDMSe/u+YyciKNQaeNVEqTwnc05Ydqm4s81X2vhOIGTUi9IUPn4mXtVD 4dK7N05SG+Wa1JhTinJAMQXRi7mInMoKte1SlYmESBpX9QQrQFrM8O0M6XEuzbTo4f ALyyUi/IoTrlARIFT/c1863ZDORJLeO/etb2NuW0= Date: Fri, 7 Jan 2022 15:51:12 -0800 From: Andrew Morton To: Helge Deller Cc: Linux Kernel , linux-mm@kvack.org, linux-parisc@vger.kernel.org Subject: Re: [PATCH] usercopy: Do not fail on memory from former init sections Message-Id: <20220107155112.30671fe4bb53ea71029f5a6d@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: BF7D94000C X-Stat-Signature: udt5q6eg19aqbknat56r8r9rnqyoo3go Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Bskey3cL; dmarc=none; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam11 X-HE-Tag: 1641599475-916067 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 7 Jan 2022 01:19:24 +0100 Helge Deller wrote: > On some platforms the memory area between the _stext and the _etext > symbols includes the init sections (parisc and csky). If the init > sections are freed after bootup, the kernel may reuse this memory. > > In one test the usercopy checks if the given address is inside the .text > section (from _stext to _etext), and it wrongly fails on the mentioned > platforms if the memory is from the former init section. > > Fix this failure by first checking against the init sections before > checking against the _stext/_etext section. > > Signed-off-by: Helge Deller > Fixes: 98400ad75e95 ("parisc: Fix backtrace to always include init funtion names") Wait. 98400ad75e95 is actually called Revert "parisc: Fix backtrace to always include init funtion names" and it reverts 279917e27edc2. This isn't making a lot of sense. And neither 98400ad75e95 nor 279917e27edc2 touch csky. And I really wouldn't want to jam a patch into mm/usercopy.c at this point in the life of 5.16 anyway. I'll drop this patch. Please revisit and clarify all these things. A lot!