From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757853AbdKGQB4 (ORCPT ); Tue, 7 Nov 2017 11:01:56 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:55685 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbdKGQBy (ORCPT ); Tue, 7 Nov 2017 11:01:54 -0500 X-Google-Smtp-Source: ABhQp+Rqrn9eVIBWllLz3gUNbZCC9u6xphi+E1MUWRqNaEpzwsETf51aZMKW54xRWTKK1ydZvh/OoQ== Date: Tue, 7 Nov 2017 17:01:50 +0100 From: Ingo Molnar To: Josh Poimboeuf Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] objtool: Move sync check to a script Message-ID: <20171107160150.wqruwwwxxqqgk2jm@gmail.com> References: <20171107094621.kfpykhbncikmeyms@gmail.com> <20171107133108.ddwhwpa7b4bfrvmr@treble> <20171107150554.sbyrdxq4rv4zfkyt@gmail.com> <20171107151128.toevpxr4dcbshpgv@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171107151128.toevpxr4dcbshpgv@treble> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Josh Poimboeuf wrote: > On Tue, Nov 07, 2017 at 04:05:54PM +0100, Ingo Molnar wrote: > > > > * Josh Poimboeuf wrote: > > > > > On Tue, Nov 07, 2017 at 10:46:21AM +0100, Ingo Molnar wrote: > > > > Hm, this doesn't actually warn - it outputs the diff: > > > > > > > > triton:~/tip/tools/objtool> ./sync-check.sh > > > > triton:~/tip/tools/objtool> 99a100,109 > > > > > /* Identifiers for segment registers */ > > > > > #define INAT_SEG_REG_IGNORE 0 > > > > > #define INAT_SEG_REG_DEFAULT 1 > > > > > #define INAT_SEG_REG_CS 2 > > > > > #define INAT_SEG_REG_SS 3 > > > > > #define INAT_SEG_REG_DS 4 > > > > > #define INAT_SEG_REG_ES 5 > > > > > #define INAT_SEG_REG_FS 6 > > > > > #define INAT_SEG_REG_GS 7 > > > > > > > > > > > > > I fixed it to do: > > > > > > > > diff $file ../../$file > /dev/null || > > > > > > > > (note the removal of '&') > > > > > > > > Then it outputs the right thing: > > > > > > > > triton:~/tip/tools/objtool> ./sync-check.sh > > > > Warning: synced file at 'tools/objtool/arch/x86/include/asm/inat.h' differs from latest kernel version at 'arch/x86/include/asm/inat.h' > > > > > > Ah. I guess '&>' is a bash-ism, shorthand for redirecting both stdout > > > and stderr. It worked for me with bash 4.4.12. I guess you used a > > > different default shell? > > > > No, I use bash too, but note that the script uses SH: > > > > #!/bin/sh > > I guess your /bin/sh is different than mine :-) > > $ ls -l /bin/sh > lrwxrwxrwx. 1 root root 4 Aug 8 06:03 /bin/sh -> bash Yeah: triton:~/tip> ls -l /bin/sh lrwxrwxrwx 1 root root 4 Jul 28 2016 /bin/sh -> dash Mystery solved! :-) Thanks, Ingo