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 28A84CFB43F for ; Mon, 7 Oct 2024 11:25:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 705E66B00F0; Mon, 7 Oct 2024 07:25:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B5D46B00F6; Mon, 7 Oct 2024 07:25:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57CE86B00F7; Mon, 7 Oct 2024 07:25:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3A6DC6B00F0 for ; Mon, 7 Oct 2024 07:25:12 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E4F7F8170C for ; Mon, 7 Oct 2024 11:25:11 +0000 (UTC) X-FDA: 82646574822.03.718EA57 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by imf06.hostedemail.com (Postfix) with ESMTP id 15E9A180012 for ; Mon, 7 Oct 2024 11:25:08 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=M6Gf3UdG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf06.hostedemail.com: domain of aha310510@gmail.com designates 209.85.215.175 as permitted sender) smtp.mailfrom=aha310510@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728300210; a=rsa-sha256; cv=none; b=oMT/1HnZxsv18V+42jFVj7CVAXh1V7d2+e81cIFoZ/A9AaaRGmD8Yg/vDDXAhkOd7+Atoe sci+PTLKYh+jf354LeDB7unmJ6OK4zhcNrLbQEmZqckHynuGiFxy+a96vPXvFpjktBbA2y X4ZduDhUOU0cQkwv3raKHe3+Exwo1zc= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=M6Gf3UdG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf06.hostedemail.com: domain of aha310510@gmail.com designates 209.85.215.175 as permitted sender) smtp.mailfrom=aha310510@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728300210; 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=U3YexuiR3za6kMQkwo2K27sxCN4TTv4QAQuWzfsA9Do=; b=cyOoY32fzTfKutEURLplc4fbCirT+jQEjMIInolkkBcEUfIMTiRYSb+ZXHUtv4ETfQPqjL UwPSiA+TgfkPF9ZhI7QYdOwek04A3m+6xamohrlOYvRK74ZNQE+Sp+zfLtzCQp8u/pPojo wh50j6kMKW/PiNxqQaUE5UTpQHUqyHI= Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-7c1324be8easo3797240a12.1 for ; Mon, 07 Oct 2024 04:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728300308; x=1728905108; darn=kvack.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U3YexuiR3za6kMQkwo2K27sxCN4TTv4QAQuWzfsA9Do=; b=M6Gf3UdGB6fW4Ac74lA8Oq7a0hklAVQadNPrxPkQnB8I+l3iiFdFvmy6soFwkZX1vI /I8ztS3+qzn/zIcEHG63t5hvMijyq6Iaox49boQikyGqISwQt5kQ08l9UF3dfEaTq6ZD w7ZJOX48uJdHtD8vdNZJpnI8Si8bvxbP+/DiTaCsTapOnmv9HjK2b42IPSOMYgmN9ykP ubIvurv++8kOsEgbjdSATaG9q9aYOHYsL+Aat5efq7HVFs4PzrXBsRtCAI07dR35WfOX S9TCEqMb+cds7ihDXBkRTwrkLp2kCie6Vz3F6wKHWiHdE5XSzm8qVNC5PPZKZrh6pnjm u+7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728300308; x=1728905108; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U3YexuiR3za6kMQkwo2K27sxCN4TTv4QAQuWzfsA9Do=; b=a0Mn+56eAG8iPFGy3btTH61oryEouXaUXuWuiNO4IpK8/RSNjoEZOxrREQqAS+Osrq dt9wAoLdEj4n+2jbM0h3PAnyFAF1mbJ8Bsix5K0y87lP9Bmd4cjUz+8mRCT+UvCeJNQW jNe4nCpFuBgml4efVF1VpQDLZ2bfU58v8g0W5NnM50/Bpk9Eo7nqAinGH2HyEZz7hsPn 7cRfIQ46cssI/v9DDZvaFKbDM7HVO6eN0PAxB5O/5RcDNwBlMqQ7xMV4JYu8mHzUlvxv i6RuxhWSeMzfdisBMZ2s/FeCG48pWIuQJj8c/sQHRDQvENAb20+EKwsEKspT9YeyIcDQ 4VUw== X-Forwarded-Encrypted: i=1; AJvYcCWBc9cUUcNwSWLTVssRSqAN76HsXJQcmj1MB9cbNnxHiDE66EQf0kUyhmTst/F8Z7NFFF3S5KFItQ==@kvack.org X-Gm-Message-State: AOJu0Yyj27xfQP0PHx5HToB61WrVlW+nYECUlfubFSzp7aTZG2mN+4M9 wv9Z/VGO7BWvL4l7wPaIrXRkVmnflmEgAFyvNIbxIiYbTSFWMNgU006OLOb0allTiRdDpx/A+gW RsWni9Si8wEraRdJAyG9Ftjw4AwE= X-Google-Smtp-Source: AGHT+IF3CIKrBLV0mvm5p043y3wzMRFSX6+s7kpZqjTk4Z/J2XvAGUZ8zbk+MOjiyAzjg9TKwaKeWWLQ9sZtpNLNE9U= X-Received: by 2002:a17:90b:4a49:b0:2d8:a943:87d1 with SMTP id 98e67ed59e1d1-2e1b395fb43mr23220434a91.13.1728300307553; Mon, 07 Oct 2024 04:25:07 -0700 (PDT) MIME-Version: 1.0 References: <20241007065307.4158-1-aha310510@gmail.com> <2024100748-exhume-overgrown-bf0d@gregkh> <2024100700-animal-upriver-fb7c@gregkh> In-Reply-To: <2024100700-animal-upriver-fb7c@gregkh> From: Jeongjun Park Date: Mon, 7 Oct 2024 20:24:57 +0900 Message-ID: Subject: Re: [PATCH] mm: remove the newlines, which are added for unknown reasons and interfere with bug analysis To: Greg KH 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 Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 15E9A180012 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: dqor7kmzmxjxjsumpjpo9w5cp1tyjn7z X-HE-Tag: 1728300308-110969 X-HE-Meta: U2FsdGVkX18uSPYXBe0opILnW2bSsp0tLyUW/m0o4jSpbFWg7088uyT75h6ZTaOscIONlRzxQ+i3ixHBF40jdaqTia9KIYfGSwqHoX7tFxyUCK+3Hc2iTIXkK9DoN+WYOk02ei9Y5aVkvZHrS92A356r7QP/KzZyK+sr/zXPPYntBD87uWThGEJwOmeePumdnVu0uJ3zGRE0lQ19esmkx6PIYNjCXSjuHzo5NYdkqXZiJlTqzMiAg1NQTdtPlUHlJRaahtMzp3PI8Sb94xtvYdxJjSqaB032GbYPYz3qhsSzqlSA1sUUjD8XexVMLDuA72e4i3e9pvFU9OhmsP1ShyOII8cM2yV5jLxO7v+/pXEnE8srg3Pb/jYcKNUJJ9PRta3ExJ0s7ewH6viQNKylxeLQRUnHx5sqykewMG59doxH/Jm+lU9nsSsCsq2a2nlbjXwSOC8Vh+aimLuAa0jrQsyCUOv0eCBvdgHa0+WcBd64qMYUQVanFkpgUAnEYeI8yen2HvcXySOYibYdQUIDPbcXlyn6MA2JYY7OHr4COYRCerg0HGQ4DvdgGhwiwo3Q3XaHWh2qvzGqnNcMG87UKi3CaKAaGNZnjIsY4ZogZP3c5ZY9kV0SshM1qan05pKLyYIr8MW7LW/h1UU10sTkOvVrqzxvBIMypYGIukoBvxQxD+5KUWluNUGU3p1PY3PvlgE/LT1dxiMj2kqS0/LB/VRVQTIJcpRrD7ccIY9tBFwg1O17b5v3QsrmUmUERvc9xA98TiZWA6qXwbvTfGFYjOsFG1S6ouG1y9lEpv6dogY3oxV+mF+5bKw81w8LUqH0qjzODD4NRNdjLDwlIAXBEDSh2+RFG/R92TUemP3jvHR4i/ME5168w81qxu72zvcVyjacgf3F3TOL7oebz3vhicDQlmwYuM58zHgtAWnIK+iMN7SpoEW7viMCfRBGYXIG5N7nXLh2BxD2QMrAxug A4dsLy2y a1QwULDyXr/CaAa6AOKE9TBhd2SWdEHuexBqyfj2BICJHK8DQ3mgeLSkGBjds+r3tYlGmxHUIZIa728o/HZSr80uvqK7J0MzeZDaqALn9sYxqgp48Sn2hLo4UlbiiwAGsHhZ78QKfxhILI2rhPwCiKyFb0f/V3gVHBD1lu9URE6PpNFiKb87ZQVK3XopTiCydZn/2VUImvKUHTwxneqijMrU7ixEny6XGSTFhWQKd9irwDDtnxPJAMsuAesuEu8wcF+KCWRXL2+a2PMdd2pQ1SWLK98B/DsTr6UHeFisqZlwQNvo+PA6L0421BXgA+mhSIGk7mNT6oF6bCZuqbfgKzFm4HMw9ttxwJpxTUgC5RV4VVedTIpy7PVkphYKcR+A+re7klbjGz42VXRCE4K2mejVezYSHvSFFAgMHBV8gNeP/TocT8yYyy/QPigTost+buSAByjlcFFBBBafpJaveqG2otH2zk2SWpIs1WuGTxxTLrpg+ZvZbZ49xGJ3Pti0LtPCX 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: 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 Regards, Jeongjun Park > thanks, > > greg k-h