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 856B7CFB440 for ; Mon, 7 Oct 2024 11:31:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CFADE6B00B8; Mon, 7 Oct 2024 07:31:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C838A6B00E3; Mon, 7 Oct 2024 07:31:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B23B16B00E4; Mon, 7 Oct 2024 07:31:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8FF206B00B8 for ; Mon, 7 Oct 2024 07:31:26 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2F2001C6F28 for ; Mon, 7 Oct 2024 11:31:26 +0000 (UTC) X-FDA: 82646590572.04.C26C952 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by imf26.hostedemail.com (Postfix) with ESMTP id 0EE58140016 for ; Mon, 7 Oct 2024 11:31:23 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=DnhDtAE1; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf26.hostedemail.com: domain of Usama.Anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=Usama.Anjum@collabora.com; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728300536; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9onN0rTwv0VDbke7yVsL14uwCLFnY8cP6ctLDOhwCTs=; b=YHaAhK2nEvjykLhLEJxHKfJywK0Tf3iK4go7npsyX4wJg6d6k5xdowQu8DFcBqcvBRiQRl 3nrsnH6Ir2BWImSVzsKr0naa3tztCchXILZJ6b0q2nzGrQ0D23zXpEtd1e1NoEY8gDAgje LNgJHZ5RwkKWJGAte075mECnwQgA3/Q= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1728300536; a=rsa-sha256; cv=pass; b=yZjxg0ceglziihm7p8uss5p6C2Hd19wpAwmczbyeGRUFa0Dkt5EMPi2LrYBI2CJ/MwOe6y gmcyqYZHFct6AlZJ1GLuUQDlSz9AUhpPirLU+puhUMIStqC0jqZkliBJM+RWqU1Aio5Kgu 8qfhK+G2io0KJkarG/W0gCgZrTBE0gA= ARC-Authentication-Results: i=2; imf26.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=DnhDtAE1; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf26.hostedemail.com: domain of Usama.Anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=Usama.Anjum@collabora.com; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Seal: i=1; a=rsa-sha256; t=1728300673; cv=none; d=zohomail.com; s=zohoarc; b=OpPE9fAAnOFuLxarIZG8HMCPijywuOof1PxDeoPioRi//9dAuaSNfgHCRKvd4DhhtQ1iqDnTCPP9gn2+b+TpvyNfBx73u6TVdXVEcaGUt8hqocx+0EoY/EZYZUTQk8+OFYOlPS9QcDGke79fzEgzzOwAfzYMAJetFSrZA7allaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728300673; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=9onN0rTwv0VDbke7yVsL14uwCLFnY8cP6ctLDOhwCTs=; b=lm+VbNGUBLSUigrWCBl3aICzGSejqX1d8gk5I14F3246aw5CbRb+EAdztLzKUD0/WL+9XSp9nqHFPiBczIOjz3HP8hyKjIOzjxsvzJY12XpXcSHhMyIKr8v0HH2v8tdT7H5FTltnU/3i8nk9JHE3mba5D4LXJqv4jFbhqlcFr6E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=Usama.Anjum@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1728300673; s=zohomail; d=collabora.com; i=Usama.Anjum@collabora.com; h=Message-ID:Date:Date:MIME-Version:Cc:Cc:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=9onN0rTwv0VDbke7yVsL14uwCLFnY8cP6ctLDOhwCTs=; b=DnhDtAE1dKIFov3oPuoZ2ubL3IOmlklo/ppKKWMXJMe11jWW6sQWe8PB26UGXlaf 7tKEivakd6o6h3rPq9PrlFzXzbUOt1x/AaPuvGBHHIhJEP8VT5dSK4iPH5Li78ZFCTf a/6ol31BsT+ubNn0UzGvWdFzXudLmtrF61K00Cuo= Received: by mx.zohomail.com with SMTPS id 1728300670434664.2188885986342; Mon, 7 Oct 2024 04:31:10 -0700 (PDT) Message-ID: <697607de-5a01-4581-93a9-f4895f8a5739@collabora.com> Date: Mon, 7 Oct 2024 16:31:03 +0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Usama.Anjum@collabora.com, akpm@linux-foundation.org, 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 To: Jeongjun Park , Greg KH References: <20241007065307.4158-1-aha310510@gmail.com> <2024100748-exhume-overgrown-bf0d@gregkh> <2024100700-animal-upriver-fb7c@gregkh> Content-Language: en-US From: Muhammad Usama Anjum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 0EE58140016 X-Stat-Signature: qkrmzbro9m4bsd94s8shiozdxj5hqhgk X-Rspam-User: X-HE-Tag: 1728300683-980007 X-HE-Meta: U2FsdGVkX1/H9XgrPbXaTqO04lNIb99uNcPNq6PhowluSWiCjU20pO04OMxXP2xcFHvBoczVGMMgqA9IwxhLjTnjHg/y/PuTAKKQJpWIHjwdSHK1eNT681Gt7SFnlbR6itJ1cyu2bC0Z3PA7FsyW64mV5aoTDp9Wn/QGGsfLjL2dI1rnCLLogl1SGqlL4O0E7QX5LosQUVrVZv2wD8A37mU9eLY1VQWss506BCH0i31UVjP6jIEEBZFSxO//nUwASbM1/nGeL+tQgOhiBL0al559GGD+fpsEFakL+vjJB2+0FfOhwbaKYwQSaKjGSBPe0t673I0Qmi1u/qZPdz9Dp70H56ifrxOnblSkOqhS+3VVJmS5gYBS2gMAMinqridC6uo9Vi5D/67HkVeX+cwYsY8V35UCIYMiYUv7wZaXk/BR8RI+G0YSRY0Suu75MPswcs+UoBzMtFIDITgKr/RwxiZOe7IlzmQ4YqlLfgGI/tYUHp79jTZH+GZLZxtS2W+E9XQGtoGEPrCI8psoS2RbJas/aR+Pq1aP7Itf3WIoUs9FKl2r5jqOEKp7m0/EeGx7Gs7QnmHUjZ2YJDbCKX/nvFnfQGx425JWygx9wi9nt0O/HrCCBD3wBtTrW9/yYljm8HFdqIH/fdkuROjj1mqgXxlPWLiP2ubjGewMB+aajR+i81V8q80dN92UDab+dZs5hDwQzZSgoalyNwBhLcz/DiogLzuuJArj+DBsP0lZ8AvsYTlp634XTAhqh9/GW8kHNrcJl9uJox/7m4YR1YFoqrOwUELWegELhcxRQHe/QwG8Ynf3uTzPsdAnV1mDiBixbyMP2ACd6MVkSusef80vOz/7NBBYvHzv5uaPAF+XTMuOaM6q6EV+zNzWDn3gYIeXDsl1I7iW1HMb8AgWn/HWwLQipolxjgUg5eWKfOVlCQkBGg5MwN7NkWYVtxXjyc6RZv9HMLi9jFcSWNlmZa2 8Cb79i+o QB2v9TEpIFH+TgYQRXBH9pute7n8zeOQDqUlqdQhl6jesN8usiLWIbBd78ebaMELXxUSV8FrmdGTj+5/PIgHwaRnANwv94JTl371n4fPSk/8i+mKuEjE7ld58jYOkyp8O6mQYfBTvHIlpCa8Las60WJPE4ZfnS3h94HmCBJNJsJjzkQMZXl0HddDab7LOEdLkxlGu+FyDwqfdW5UKil6CDcgkvsqeekOLyUqWYuinRa6P4aGTzu8UWupOyZTsjYRgDsC26U95AoCeVHjjDNhvwca/AS+pfCwevWGyDkpYo+X8YMYGaWkxUccSdI4YXMrJMYSdBMe+svBFm9nFNlYOJwusroY5/VbUd2n0gaYJJ0cmHQNQs42hAzXTZYfgUFsgVPbD0S2J9dsceHkxgZSTkW5xfTD7n9mzP+botGcELdIOzwjJKkWEma/61XRBf9iLWjuwINwCaQ+uJKU+ebFDtqCsXxU/ajp/JIWJq42ckJAeL+xG3Vn+UHIm3zSxQdurLX1Pxk55NovwgpzfiykLLDwXH84W1Rmakc3RHqcv69b2WuyHem5nhzZuAg== 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 10/7/24 4:24 PM, Jeongjun Park wrote: > Greg KH wrote: >> >> 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. >> > > Oh, I just realized that this website is open source and written in C. > > This seems to be the correct git repository, so I'll commit here. > > https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/cgit.git Get latest tag from https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/ instead. https://kernelnewbies.org/FirstKernelPatch could be helpful in understanding some missing details. > > Regards, > Jeongjun Park > >> thanks, >> >> greg k-h -- BR, Muhammad Usama Anjum