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 1E179CFB43F for ; Mon, 7 Oct 2024 09:05:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9039E6B00EA; Mon, 7 Oct 2024 05:05:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B3DF6B00EB; Mon, 7 Oct 2024 05:05:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A1956B00EE; Mon, 7 Oct 2024 05:05:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5E0BE6B00EA for ; Mon, 7 Oct 2024 05:05:45 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id CC1821215DB for ; Mon, 7 Oct 2024 09:05:44 +0000 (UTC) X-FDA: 82646223408.25.3118E12 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf17.hostedemail.com (Postfix) with ESMTP id 1A0E140002 for ; Mon, 7 Oct 2024 09:05:42 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=A+13tIXI; spf=pass (imf17.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728291875; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Ett2xjQZ8D21NPmTCOhI79aQp6/XeHJ22wS5O5Ga1vs=; b=Nafw+gz6wF/6lHeMijVdpOvB5XoQ9LA4mF6VDjJ4u5/YKAp2JWCes7X+C7Q9crsY4F8A33 HaVcl0b3OOr9RLgRfjTwCI/jR906vEW3KKP0Gj4VaksecZn4UFceH8/rU1/ij0dt03657A tCJ2+/j/Z5UztYTFCBUftyst4LDXnj4= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=A+13tIXI; spf=pass (imf17.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728291875; a=rsa-sha256; cv=none; b=6sGtKNmJz0eDVZDWNjWVCE4tLB5YhhqqAq7p5MTgIgn9JsWaeKn2X8DjG80VWGIWsztLEa PYP48vXI9mFNDcBAxOISp/E0o6PM4Eqj9Pj1uczGZq7G5AR4uq/wThDEQf82iBdK+O1s9x zBoVzvu6Dg4L8e2ciQF4HHNOVdya+KU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AF9095C4448; Mon, 7 Oct 2024 09:05:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 057C3C4CEC6; Mon, 7 Oct 2024 09:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728291941; bh=uQeNvsiSV1kj3jk5hB6wIWiHs0hBMW7OkluGU+OeX3w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A+13tIXI6PXQBoHMp7h3fIsc954/fJ6T2DXmsGuUWbR29gm2C/jcG8G1CKA8BGvTj SYj5c2Igz8mAe2QUyCKaYV9UCUPwDKM1cFRCylVFzcvlAtgQy8R9pJfke1LibUbeim ptpPntUkGBXKvafVHVOOz3DeHz0EHtBWXfdwoK9I= Date: Mon, 7 Oct 2024 11:05:38 +0200 From: Greg KH To: Jeongjun Park Cc: akpm@linux-foundation.org, usama.anjum@collabora.com, peterx@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mm: remove the newlines, which are added for unknown reasons and interfere with bug analysis Message-ID: <2024100700-animal-upriver-fb7c@gregkh> References: <20241007065307.4158-1-aha310510@gmail.com> <2024100748-exhume-overgrown-bf0d@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 1A0E140002 X-Stat-Signature: kt7gc3jx869ecp7kii95k9pteoqc7jjg X-HE-Tag: 1728291942-506450 X-HE-Meta: U2FsdGVkX1/yhttooN3Dgl7MqAWaKWcq7YZuYYrFwHD5tD9yGqtHw1xsK3cCEn4DbDloFmEgoq1UrlzSDtMKUEkS1PcQKh7ti+8wjCsNgbC28HKmoYSZ4zF1bwqzEk8rO0VSSftue0dUXiXMNVZoeMkWpLUkHfWoHT4oNd8VBlwsFGkAGKb/0T0Y1PxuWlh+3MzM7Cf+cVuJNvUxZR+wtB4XcBGZyOD3OWtWaGukwzCMN7jrXQldly5XgcrZrzweA+TdIi3LA5T9ZBYrAklU0ludMpDpWlwVSrCoyUCCnYryprrb5uQQA48whvDvJf1Z8YU/EZCV87PflBRh8Fmvj2ctRlwF5pCe3ZtHFe8wqNKI9RRigxY9j8xG4PI0k8y4E0qAjrskSAFhXyOkdOrTgHB5gim5/7k0rD38BTaM8YYn1uKMG0M6gyfgw1wi9vajn0oL2mQkrSQ9JGHwcl7NJuwYV8RdcQmyX8ioO0oq1VjLxoazYGTfCiBiCeJbjb+iMgcJ1mWuAJLtnj0OxuFQeeYSza6dHFBPpIaQV0I0Py/nscaeyRhsv64qaBztgfO2Oh6KCr9F+xhRxCmtmA/ynB10VVVc80lIxnCZi6rHtelh3UUJE3tbZo7U0L7OBO4GgehOKr+QwQwvhqIpCEIsWoTdfmIJP67DMbFT90C0ln2pzqs6Yz4CYJNqBPmLaHESXdRabjnPtNrC6YA+ns4KfGJwb0pPCYKDdNypkYKMkB2MckwLV7wQeKVciax06+B3YXx8hnpuAqiunNU3EtvwKI/UfPE70VOybl5rZ0a297DD0ulvTthzfd4ptBzCFZuluag6v+ZpeQWXM2SPNmkme4aP28UiP8srrpCFSaVv0QPespn/Jbf0GaoLkNxA6/iCCksRSGQOMy+zUfLHXK/foOml9TJ4eaKUfQv6tBMYZbjhCANWodhIGrcKeqA/RP2Q2mvQd8SwcgaIZXOqdTu pvZM2sJK 3aEzc64reFDQhx6RE6pfsS2mjlrIoWw/v0tTsFmY2Atr4OjVUrh8luFi0NGT+7X9pR146lO06c2CI5EN+t8iFZbAEw56mT8vtWbF8Fg2+G+kNcjMu9TSkmgdevopLRE7a1cyBw7QUcOo2MbnYhLPUpueYA5xU1xruJTZRgDdD9PcHscdTFVrVpm/GHmy+c7qJkvIicfInPyZm0JqzlX3ZH6kcUIAG0t/lVGP28DaBK+Rs7jQZ1WP5m3Pw2HOXaAwepPW73ZuhaGz+Zy1jah4zyqTyyeS+UDu3446owibwp7XiYK57BTYWZd1CYcznDjqrgaviBzBxwFN5GgNtMmA9pQdL+q3zxPpEecuVbvRpF4yvW1mZKMZ5SDgCPTga1vJrhH4Az6wKmSEFKC+A+T1ALc4S0kdYjyaAC50zlEu+3boXY9kFUD5WbxNbouqsoTJJOvDL8euxNPgUbBu9p8tANqsgl841wS/u+J3u7gVRB/SRYzpg9wOYgaTmpEfWemv2zJv9 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: List-Subscribe: List-Unsubscribe: On Mon, Oct 07, 2024 at 05:57:18PM +0900, Jeongjun Park wrote: > Greg KH wrote: > > > > On Mon, Oct 07, 2024 at 03:53:07PM +0900, Jeongjun Park wrote: > > > Looking at the source code links for mm/memory.c in the sample reports > > > in the syzbot report links [1]. > > > > > > it looks like the line numbers are designated as lines that have been > > > increased by 1. This may seem like a problem with syzkaller or the > > > addr2line program that assigns the line numbers, but there is no problem > > > with either of them. > > > > > > In the previous commit d61ea1cb0095 ("userfaultfd: UFFD_FEATURE_WP_ASYNC"), > > > when modifying mm/memory.c, an unknown line break is added to the very first > > > line of the file. However, the git.kernel.org site displays the source code > > > with the added line break removed, so even though addr2line has assigned > > > the correct line number, it looks like the line number has increased by 1. > > > > > > This may seem like a trivial thing, but I think it would be appropriate > > > to remove all the newline characters added to the upstream and stable > > > versions, as they are not only incorrect in terms of code style but also > > > hinder bug analysis. > > > > > > [1] > > > > > > https://syzkaller.appspot.com/bug?extid=4145b11cdf925264bff4 > > > https://syzkaller.appspot.com/bug?extid=fa43f1b63e3aa6f66329 > > > https://syzkaller.appspot.com/bug?extid=890a1df7294175947697 > > > > > > Fixes: d61ea1cb0095 ("userfaultfd: UFFD_FEATURE_WP_ASYNC") > > > Cc: stable@vger.kernel.org > > > Signed-off-by: Jeongjun Park > > > --- > > > mm/memory.c | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/mm/memory.c b/mm/memory.c > > > index 2366578015ad..7dffe8749014 100644 > > > --- a/mm/memory.c > > > +++ b/mm/memory.c > > > @@ -1,4 +1,3 @@ > > > - > > > > This sounds like you have broken tools that can not handle an empty line > > in a file. > > > > Why not fix those? > > As I mentioned above, there is no problem with addr2line's ability to parse > the code line that called the function in the calltrace of the crash report. > > However, when the source code of mm/memory.c is printed on the screen on the > git.kernel.org site, the line break character that exists in the first line > of the file is deleted and printed, so as a result, all code lines in the > mm/memory.c file are located at line numbers that are -1 less than the > actual line. > > You can understand it easily if you compare the source code of mm/memory.c > on github and git.kernel.org. > > https://github.com/torvalds/linux/blob/master/mm/memory.c > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/memory.c > > Since I cannot modify the source code printing function of the git.kernel.org > site, the best solution I can suggest is to remove the unnecessary line break > character that exists in all versions. I would recommend fixing the git.kernel.org code, it is all open source and can be fixed up, as odds are other projects/repos would like to have it fixed as well. thanks, greg k-h