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 X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AE8DC04AB1 for ; Sat, 11 May 2019 13:21:59 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 261102184C for ; Sat, 11 May 2019 13:21:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="txZD3Rkz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 261102184C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1hPRwZ-00084R-38; Sat, 11 May 2019 09:21:39 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1hPRwX-00084K-54 for kernelnewbies@kernelnewbies.org; Sat, 11 May 2019 09:21:37 -0400 Received: by mail-wm1-x343.google.com with SMTP id f204so4426022wme.0 for ; Sat, 11 May 2019 06:21:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nj1mLlNpTX8n8lWm3PeXOSe9btRhnxPUelnnFibWAVk=; b=txZD3RkzTOBOMqdKYrvse85JzIAihM9csHXRVCXv8H9Sa2iFYE7O3626kXDMe8fMfH cTXOLB0oRbor4PvMdE5wfpgxJX1+sRsyOdCfu5TeRrqtKQJhorlSNPeXMxgXE2O4XEEP eLesUPHMlShy6W5RcCvsgrfizuyeUoTnsTsVF07LKy897vTb3Pz/hC2/lTYSMbIS+qVS PQ/uARI+XgrNafuu7cGf/W5xUynjirZnpb6+pnrF1UfkFwzOlSGUUJAw8XjZVwGFCuCv 3gc6KxnKH8Ww2mh99sHW4Vac5/cjp+gv6FT4kuLkuYZ8s1SUxUoHQzx8cAS5G9squ6tv 2cTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nj1mLlNpTX8n8lWm3PeXOSe9btRhnxPUelnnFibWAVk=; b=l0RVwuFhVk71feNiRNz/yNHCa+LbVqUoUfsn9sLfsY27wI6efAhykQD6vQchYGN977 GUPH9hNtyK6mGsGMBEQC4QMYYYqz7grOk0VE+ucaU+9b6MXVRBgb74DZe3+1XVjzNt/Q sA8xwoA47SIgYYcax4JEYlXiHqgkEat+3sIUa3PXssn0BRaRpD+kluSsKd4IcsF355vw +EnC00HfzUGvl41DAS2lr4pgYUl0HbxgUf9B8jcadk7Kro3jPaYnq3ojYFsTFRV3wOLn N6unz+gI6OBm700IYjM+0Ltq85jskJSYw1wiBlZkFqsfAkzQEJCBC2Tn5EHRe+pvNMRj /ZPA== X-Gm-Message-State: APjAAAV/9aBckChYbJ5b9JFOMnCK70n+m75L9PDcY6ATGlkOAwPXwb3M YTQIaf2PGCsj1V/k4ZZABBvsj0oGifImWVmwt8M= X-Google-Smtp-Source: APXvYqzOi3mkm+QCByE9nnp8bS99E2Zjz9p++8li2ppOyFAaxmyKXizhzaV2oMXOieSUcJmVAKvP3/NfRXCIsF9t1mg= X-Received: by 2002:a1c:98d0:: with SMTP id a199mr10289388wme.140.1557580833843; Sat, 11 May 2019 06:20:33 -0700 (PDT) MIME-Version: 1.0 References: <5de6f762.7230c.16a96a52517.Coremail.wuzhouhui14@mails.ucas.ac.cn> <7229.1557547129@turing-police> In-Reply-To: <7229.1557547129@turing-police> From: Aruna Hewapathirane Date: Sat, 11 May 2019 09:20:22 -0400 Message-ID: Subject: Re: how to determine whether the source code is same between two kernels To: =?UTF-8?Q?Valdis_Kl=C4=93tnieks?= Cc: wuzhouhui , kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5612520272259831856==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============5612520272259831856== Content-Type: multipart/alternative; boundary="0000000000004f71b305889c8c4c" --0000000000004f71b305889c8c4c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 10, 2019 at 11:58 PM Valdis Kl=C4=93tnieks wrote: > On Fri, 10 May 2019 22:11:31 -0400, Aruna Hewapathirane said: > > > > Suppose I have two kernels, one is A.B.C build by people Tom. And > > > the other is A.B.C build by Jerry. The source code have been deleted > > > Run diff vmlinuz-Tom vmlinuz-Jerry and see if they differ. Then just t= o > > Don't even bother. If Tom and Jerry both did builds, the binaries *will* > differ, because... > > % dmesg | grep 'Linux vers' > [ 0.000000] Linux version 5.1.0-rc5-next-20190416-dirty > (source@turing-police) (gcc version 9.0.1 20190328 (Red Hat 9.0.1-0.12) > (GCC)) #664 SMP PREEMPT Wed Apr 17 12:31:51 EDT 2019 > Seriously ? Since when are you working for turing-police ? But yes agreed... at least it gives someone a reasonably sane path to follow... nothing lost in trying right :) > There's a datestamp, a build number, and a compiler version in there. > > Also, since vmlinuz is a binary file, /bin/cmp is a better choice than > diff. > Agreed. --0000000000004f71b305889c8c4c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, May 10, 2019 at 11:58 PM Valdis Kl=C4=93tnieks <valdis.kletnieks@vt.edu> wrote:<= br>
On Fri, 10 May 2= 019 22:11:31 -0400, Aruna Hewapathirane said:

> > Suppose I have two kernels, one is A.B.C build by people Tom. And=
> > the other is A.B.C build by Jerry. The source code have been dele= ted

> Run diff vmlinuz-Tom vmlinuz-Jerry and see if they differ. Then just= =C2=A0 to

Don't even bother.=C2=A0 If Tom and Jerry both did builds, the binaries= *will* differ, because...

% dmesg | grep 'Linux vers'
[=C2=A0 =C2=A0 0.000000] Linux version 5.1.0-rc5-next-20190416-dirty (sourc= e@turing-police) (gcc version 9.0.1 20190328 (Red Hat 9.0.1-0.12) (GCC)) #6= 64 SMP PREEMPT Wed Apr 17 12:31:51 EDT 2019

=
Seriously ? Since when are you working for turing-police ? But yes agr= eed...=C2=A0 at least it gives someone a
reasonably sane pat= h to follow... nothing lost in trying right :)


There's a datestamp, a build number, and a compiler version in there.
Also, since vmlinuz is a binary file, /bin/cmp is a better choice than diff= .
Agreed.



=C2=A0
--0000000000004f71b305889c8c4c-- --===============5612520272259831856== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============5612520272259831856==--