Received: by 10.213.65.68 with SMTP id h4csp606354imn; Fri, 30 Mar 2018 11:44:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+fA4F2IgtMbnsb+tiEBafMCdImfI15JatY1ISM1l/iiTBiWiTKburnj7pyRicXW2VhixdD X-Received: by 2002:a17:902:82cb:: with SMTP id u11-v6mr99412plz.369.1522435471760; Fri, 30 Mar 2018 11:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522435471; cv=none; d=google.com; s=arc-20160816; b=gYRj2drPVaAM/FdvtgwC3ETyjOSQDvNKf0PgN/hLY9kbC73HkXRoaPwECDJv1/vYZ8 l7XJrvfTm8DrUIm/MoYXKCDL41L4A8c4dIouJtTOgWaw/j7tz44oZ/V5XvXG+nvQhAcV VlRddYzLJ/svxb1kAfcBkNh07l2hmCHUK571VwEmTZbJyaWxRAkONnExB/2u/bOCQGsM UQddBUoda44LSdVLyZ5aGyV4/uLlLNp5HnOsaIwDca3zJfBGzRgQMWMzr0HFb4Jw8rb0 tAZ5XTQ0/lM3aylmRxQT/jjkNkMuaJRKpyTihyiLVuZOjw4g957fmtgC6EqGt9rwcmP5 15Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=FZpCLSBSUltowyAs3x0mYdp5MfZksiD3s38rpETOKtk=; b=hNad20R2AUffqb2YYlEXzIYkTpxBPFCnSjXrXW4VSBhidn+kbIDLgM9vcV/rCgTkfU I6ZhbrulR1KuXCjrhZJdGicc28g53jw9I6LUi/xoLHBATgfio/oQEn4HkQws23886iT3 BBrfILsgWvUP9Z/SiU0DQsV7czjIj8zeh/OR9YAcG6OhMmjZm1bzUolktIjMSM1YI+Hm WsPqUHrpSOCPm+Qrw9sFCMYbnIR+t0kNm/fhgiJhHWAwCBYBk3K/cF1M0abEdcYtAAgR MhqMV80RfOeGDBB3wPmHlQ4BeWEw0tgFS1DAWJRcS5rxlUqLLKnTOQIMblH4JLER5isH wh5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n23si5949259pgd.345.2018.03.30.11.44.17; Fri, 30 Mar 2018 11:44:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752478AbeC3SnL (ORCPT + 99 others); Fri, 30 Mar 2018 14:43:11 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:34091 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbeC3SnI (ORCPT ); Fri, 30 Mar 2018 14:43:08 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f1yzQ-0001pA-DZ; Fri, 30 Mar 2018 12:43:04 -0600 Received: from 67-3-145-25.omah.qwest.net ([67.3.145.25] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f1yzP-0005Kk-QP; Fri, 30 Mar 2018 12:43:04 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Rahul Lakkireddy Cc: Jiri Pirko , "netdev\@vger.kernel.org" , "linux-fsdevel\@vger.kernel.org" , "kexec\@lists.infradead.org" , "linux-kernel\@vger.kernel.org" , "davem\@davemloft.net" , "viro\@zeniv.linux.org.uk" , "stephen\@networkplumber.org" , "akpm\@linux-foundation.org" , "torvalds\@linux-foundation.org" , Ganesh GR , Nirranjan Kirubaharan , Indranil Choudhury References: <296ffbd47fd4f30238689e636bd2480683224227.1521888444.git.rahul.lakkireddy@chelsio.com> <20180330103907.GC3313@nanopsycho> <20180330105156.GA24344@chelsio.com> Date: Fri, 30 Mar 2018 13:42:00 -0500 In-Reply-To: <20180330105156.GA24344@chelsio.com> (Rahul Lakkireddy's message of "Fri, 30 Mar 2018 16:21:57 +0530") Message-ID: <87k1tt2yo7.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1f1yzP-0005Kk-QP;;;mid=<87k1tt2yo7.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=67.3.145.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18fJdImGsH74Ul+UtgYC354BgLiwhpflbQ= X-SA-Exim-Connect-IP: 67.3.145.25 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa06.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4997] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Rahul Lakkireddy X-Spam-Relay-Country: X-Spam-Timing: total 254 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 2.8 (1.1%), b_tie_ro: 1.98 (0.8%), parse: 1.04 (0.4%), extract_message_metadata: 16 (6.3%), get_uri_detail_list: 2.1 (0.8%), tests_pri_-1000: 7 (2.6%), tests_pri_-950: 1.11 (0.4%), tests_pri_-900: 0.96 (0.4%), tests_pri_-400: 23 (9.2%), check_bayes: 22 (8.7%), b_tokenize: 7 (2.8%), b_tok_get_all: 7 (2.8%), b_comp_prob: 2.5 (1.0%), b_tok_touch_all: 3.3 (1.3%), b_finish: 0.65 (0.3%), tests_pri_0: 193 (75.8%), check_dkim_signature: 0.46 (0.2%), check_dkim_adsp: 2.3 (0.9%), tests_pri_500: 7 (2.6%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH net-next v2 1/2] fs/crashdd: add API to collect hardware dump in second kernel X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rahul Lakkireddy writes: > On Friday, March 03/30/18, 2018 at 16:09:07 +0530, Jiri Pirko wrote: >> Sat, Mar 24, 2018 at 11:56:33AM CET, rahul.lakkireddy@chelsio.com wrote: >> >Add a new module crashdd that exports the /sys/kernel/crashdd/ >> >directory in second kernel, containing collected hardware/firmware >> >dumps. >> > >> >The sequence of actions done by device drivers to append their device >> >specific hardware/firmware logs to /sys/kernel/crashdd/ directory are >> >as follows: >> > >> >1. During probe (before hardware is initialized), device drivers >> >register to the crashdd module (via crashdd_add_dump()), with >> >callback function, along with buffer size and log name needed for >> >firmware/hardware log collection. >> > >> >2. Crashdd creates a driver's directory under >> >/sys/kernel/crashdd/. Then, it allocates the buffer with >> >> This smells. I need to identify the exact ASIC instance that produced >> the dump. To identify by driver name does not help me if I have multiple >> instances of the same driver. This looks wrong to me. This looks like >> a job for devlink where you have 1 devlink instance per 1 ASIC instance. >> >> Please see: >> http://patchwork.ozlabs.org/project/netdev/list/?series=36524 >> >> I bevieve that the solution in the patchset could be used for >> your usecase too. >> >> > > The sysfs approach proposed here had been dropped in favour exporting > the dumps as ELF notes in /proc/vmcore. > > Will be posting the new patches soon. The concern was actually how you identify which device that came from. Where you read the identifier changes but sysfs or /proc/vmcore the change remains valid. Eric