Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2767551pxf; Sun, 4 Apr 2021 14:00:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCFSb+vxitkh1nBBCrFTzZmr3sRYmWuqWL8p7MeZsNRbuMuGmciP+vq6Iz3Qfc0lqkLZQE X-Received: by 2002:aa7:c9c8:: with SMTP id i8mr27398571edt.193.1617570035706; Sun, 04 Apr 2021 14:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617570035; cv=none; d=google.com; s=arc-20160816; b=lRdE5f1dOf1pK1vRqlVpXwrj5qoQr/t+O569q1pb1EBiWSoigKsU+zcQ2E6V2gbRoo Z//nS+4nYCkjTDfWdUqdwEx81c5mIBWnpXhytbMJXZoQvuassDcgwikIYWDZVTM7+RcB E9YtdlqblQ/4gxxLuuY/HGsJg3xzbW/woaigpFP3vxxFIsVUoWXp99D35EJ8lUzEizgr D+qlUUec1bVCbsDQxIyNulAnlijKyrRPCJIxl8XS39pKx8kOnBNmK+ZNHkSYVPlCQZpd VXplNhDGiIxQn9Aag08aGe89k8m0D0S9HMy5LjPgRjzlGt0h+jHVfpv6wB3vEedAeIpj voBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=xH7KuWjQLG2yYUJvdiA+v4gnGAfQaHKXlFD09N+b6yo=; b=kPbySfAB1hKkXqSI9Wa84Zli3Sn9IAT76nsZmZFBNJ5ouiudu/mL+lOnEjHFjkWlz+ ROi5UXWEGdZQBwUOgnj9JA6Qy3xhEULbcMFndLiEJAHhC1ArTVTgZYnVVoH41PDMmeA/ RBowGM+UQoSMOoqyM43FDfyW/0bwW1pP+/t/pqpGdW6Ry9lJ3cGcGgZXhy2XKWzd0L+l TVUbEJ7rTt3BFmfzEiG79lQqprD97kn7qn5fS97cLsAZukpqgy3YbI8gvCfyOoqwX6KA CkQqaubGynoNMCgcdauZM5wZeY0sDuV9yUMgF3ZtgsvQVUngjnWrueHLNkBf+HyKcQdu EG8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si11269250edr.463.2021.04.04.14.00.12; Sun, 04 Apr 2021 14:00:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231618AbhDDUxZ (ORCPT + 99 others); Sun, 4 Apr 2021 16:53:25 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:42993 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230220AbhDDUxW (ORCPT ); Sun, 4 Apr 2021 16:53:22 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lT9kB-0046DQ-4X; Sun, 04 Apr 2021 22:53:15 +0200 Received: from dynamic-089-012-130-202.89.12.pool.telefonica.de ([89.12.130.202] helo=[192.168.1.10]) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (envelope-from ) id 1lT9kA-001lL7-U1; Sun, 04 Apr 2021 22:53:15 +0200 Subject: Re: [PATCH] ia64: module: fix symbolizer crash on fdescr To: Sergei Trofimovich , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org References: <20210403074803.3309096-1-slyfox@gentoo.org> From: John Paul Adrian Glaubitz Message-ID: Date: Sun, 4 Apr 2021 22:53:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210403074803.3309096-1-slyfox@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 89.12.130.202 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sergei! On 4/3/21 9:48 AM, Sergei Trofimovich wrote: > Noticed failure as a crash on ia64 when tried to symbolize all > backtraces collected by page_owner=on: > > $ cat /sys/kernel/debug/page_owner > > > CPU: 1 PID: 2074 Comm: cat Not tainted 5.12.0-rc4 #226 > Hardware name: hp server rx3600, BIOS 04.03 04/08/2008 > ip is at dereference_module_function_descriptor+0x41/0x100 > > Crash happens at dereference_module_function_descriptor() due to > use-after-free when dereferencing ".opd" section header. > > All section headers are already freed after module is laoded > successfully. > > To keep symbolizer working the change stores ".opd" address > and size after module is relocated to a new place and before > section headers are discarded. > > To make similar errors less obscure module_finalize() now > zeroes out all variables relevant to module loading only. Typo: s/zeroes/zero/. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913