Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3529913pxy; Mon, 26 Apr 2021 04:05:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJya5TH+aRN+HJEWcvLo5I5pyPLGVlRAtVcIco0DJN0wWhJ0DHUmHEDTrg3dAIW4ldReISDb X-Received: by 2002:a17:906:3e4a:: with SMTP id t10mr17927020eji.553.1619435150291; Mon, 26 Apr 2021 04:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619435150; cv=none; d=google.com; s=arc-20160816; b=m8JcMJDT/KG7qJiBGjaIMHfOOA1quQAw7VBLQDiWYwCwom/EH2DIrcx5aT3HzFV/ld xKwUwyYVwnwf4R7kY0cJbDHBE2NN+lOp7IGZbr0Ra5ag8cgFcKAb/dcw+cnxLG+0U5re AX26NFQpWbq7rS2x27ZmW6zDR8StOwcdkA3A/r2bzmWuM5ebhOIci0lUeeMiZTh+eTdu 71WlnUar6X3xJyDk0TsmiAHrdATNte3vbbTaAxJOY79DQjrb+aMILl+kfTCkC0UZ4fho ycREF3VYiOYeNd1SoJCg3h2dCrweAlaQM9tu7SHzloQ+9Ykg0I2oYU/+FKgymQpIZGmm uQNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jhkDCiDbD3dtlOrKi/5BJLtDDAnpNEhS5Hg5hY/KW74=; b=D+F9E3p5SctER3d+OISCUIuNGPHj4+IH5wPzkwwyb2n9cMs49ZL/E42lx7kvRIYFpO iqNzsV9qBTif5/UgjRxV+3YoLXpRQ5azdLSdrVeOeBJZsxGmxeBIboCmsN6swW786IEa qvBkbDv3PKlyWq/Ch+Y5nx/5P0r/J1YcemQAMbHR1hA5dZMjncQiDTvOYJBu9XMXXtUZ iq/+KWj/IM14lV5YQrIRtOuAnuPE/bbL5ojzKU1B8Bi7HiBht8rO5ldYYXv5n+1O43kz 7llo/kcWK1TAqMN3JuqxYx6IOrBpOHYKlpFCKyt5c5Z/JiuYfB1BADVl+0EBGNdV50de uDLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="F/L2H45P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si9580248ejq.263.2021.04.26.04.05.26; Mon, 26 Apr 2021 04:05:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="F/L2H45P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233144AbhDZLFM (ORCPT + 99 others); Mon, 26 Apr 2021 07:05:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:36754 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232878AbhDZLFK (ORCPT ); Mon, 26 Apr 2021 07:05:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1619435068; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jhkDCiDbD3dtlOrKi/5BJLtDDAnpNEhS5Hg5hY/KW74=; b=F/L2H45PgMTLn/0UXVDSHCqeu1VpNDUD6+kzRnoL4tmCWMJiUXKho1maND2JFBn3IT62Yl qcF7tBnAvZ1yIvU2blCl3+9O1NwkQob4a5VvimqbiIfsz0IiNoygskbQHfI53WTlGyAxkG izV0O9xiHLiCtzGQQvLsmCssL3HB+Qk= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B804BAD69; Mon, 26 Apr 2021 11:04:28 +0000 (UTC) Date: Mon, 26 Apr 2021 13:04:28 +0200 From: Petr Mladek To: Stephen Boyd Cc: Andrew Morton , linux-kernel@vger.kernel.org, Jiri Olsa , Alexei Starovoitov , Jessica Yu , Evan Green , Hsin-Yi Wang , Steven Rostedt , Andy Shevchenko , Matthew Wilcox Subject: Re: [PATCH v5 04/13] dump_stack: Add vmlinux build ID to stack traces Message-ID: References: <20210420215003.3510247-1-swboyd@chromium.org> <20210420215003.3510247-5-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210420215003.3510247-5-swboyd@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2021-04-20 14:49:54, Stephen Boyd wrote: > Add the running kernel's build ID[1] to the stacktrace information > header. This makes it simpler for developers to locate the vmlinux with > full debuginfo for a particular kernel stacktrace. Combined with > scripts/decode_stracktrace.sh, a developer can download the correct > vmlinux from a debuginfod[2] server and find the exact file and line > number for the functions plus offsets in a stacktrace. > > diff --git a/include/linux/buildid.h b/include/linux/buildid.h > index f375900cf9ed..3b7a0ff4642f 100644 > --- a/include/linux/buildid.h > +++ b/include/linux/buildid.h > @@ -10,7 +10,11 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id, > __u32 *size); > int build_id_parse_buf(const void *buf, unsigned char *build_id, u32 buf_size); > > +#if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) || IS_ENABLED(CONFIG_CRASH_CORE) Why is this enabled for CONFIG_CRASH_CORE, please? Is some crash_core code going to printk it id even when CONFIG_STACKTRACE_BUILD_ID is disabled? Anyway, this condition should be added in the patch when a code is really going to depend on it. Or the intention should be explained in the commit message at least. > extern unsigned char vmlinux_build_id[BUILD_ID_SIZE_MAX]; > void init_vmlinux_build_id(void); > +#else > +static inline void init_vmlinux_build_id(void) { } > +#endif Otherwise, the patch looks good to me. Best Regards, Petr