Received: by 10.213.65.68 with SMTP id h4csp2159966imn; Mon, 2 Apr 2018 02:13:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx491IrQ6JgfvDE0bOEcQPa/lomdmmcbSkUvUOmGISHiYfVP7BuuWHma1HB11tTocDWEvAk5D X-Received: by 10.98.137.15 with SMTP id v15mr6723855pfd.95.1522660400654; Mon, 02 Apr 2018 02:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522660400; cv=none; d=google.com; s=arc-20160816; b=oh/l32yMevT7wPU1xPk05e1QyVK9kOxV/QBaLaWDxQYNyCjOBVmjZ7UEbeoWW1DUh8 1ppfSPJNRjbbZ7J2lkFnnME7LBIxY92JlDCw2R59F7UH4NamzFqBYwcKWb6UEjiiCMQD L+wuYRPcxDqSfJFhfz5kjm1xv1PJoSIpJDntmIyCmuP3ugwhWPKWzFYR98qu5HE/ZPUb oJISVXpXXdiWnXf8qa1x69llGK9moLdhe4XJcQW8Zh8lMv5udLLOcxn36TBURTLkRn82 lGUpVafBGZ6jV97n2o7IeKOLGOaReBa1/Kz93h0Ijt8tU3B/OKqCL0+SFGeMWXUrqlWf nUHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0W6X99Od8oNrQCleJSNnEOGs7aj4vUNl5ziSk72ABeg=; b=sdPwVRTm8KmZGwUjlIHue8dLzGKeBhcnPHkb38WIUmTDIEJ8Exau8+8/pEKio7hvWg tZTLlhCbgB6j+0OarfZoTVOu6lmaR2gMbMJWbRPlJChDu31pmjnwpRitsy2/5Cz4yS8O rDlllrQRCpOwcKAqUQNFs7M/KOJSrvVxdDJn06+d+Kk9e2nNp/lfdDZx+vpz/Y/pngh6 zfwLSHgUPGiXxIJhLFtjBkF+PIjvJtt/IZWDZcjGOynvFx8kliWzOiNCBh0QdTmRgC9A GX7B0D3QbZVkdzdhVRcZtyg80bVowPHWqotCV/BMcHkPlxHmvBYLO7Kv4t0d/B1Tnejz HJ/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=ahLkancx; 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 y87si2812394pfi.141.2018.04.02.02.13.07; Mon, 02 Apr 2018 02:13:20 -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; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=ahLkancx; 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 S1754303AbeDBJLs (ORCPT + 99 others); Mon, 2 Apr 2018 05:11:48 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:52633 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262AbeDBJLp (ORCPT ); Mon, 2 Apr 2018 05:11:45 -0400 Received: by mail-wm0-f43.google.com with SMTP id g8so240144wmd.2 for ; Mon, 02 Apr 2018 02:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0W6X99Od8oNrQCleJSNnEOGs7aj4vUNl5ziSk72ABeg=; b=ahLkancx55Z70PG5Nafkpu8gBRSSIxli5EDV5iYarth0vR2mFMl1DZ6LhRRUMxSW0a Fe1sjEbKCgxqaRwjoQVw6VmC3utGAlrWKC45T3I7LWAjf9ESB3ygg0uKjIt52F5KO2J2 pPcmcIDv8/Uoq8joCvpvtk1CJt9mwigEyZfzLcrZvONHvDAr8L0Q/kRjWL8pHs07YN8H MVEh/SsjgzfYJSZD7LSRoSu0SFfP6p1LU5OkodYknwPvkMhUH10GQeiYHfm4GCHz+eK5 0K+m8VV1lhuKdYFQh7z6QB4IzL29f8mJ4U5aimChMJOnvNA/W2YbncZyV99eerwQwGtN twqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0W6X99Od8oNrQCleJSNnEOGs7aj4vUNl5ziSk72ABeg=; b=K7TZKWy+VynUc57ft5i6Fs7TfhwZiOdVVMdI0n7h7TaDzZjN3D3i4b4IZEbMqCD5fY kD3M0yw/l+W4GEtRYt89Z1m5bTolgUJNRcWgZZq/sP5C51KUWt7sRNl2mH16IwgvM4ZM GU+E62GlE4R97UAfn0NSJX1O9FBQg3drhmrL3bHeojp6B5xtuHkZYgrJtEfC1HeQm+LE /DPe29uZluZ36fo7PLo4oTLbzCdnBlnfQDpU8t1dcEJWUb59+nQS5AGRdI8skopOkni6 Rnr7/K6WBUcjROK6xsFxnS3d+lv4OmgKs88+BVwo7pSxSVGZLahMvSd/YWX5HLf3VMIq WNVw== X-Gm-Message-State: AElRT7E+yKkptvhn9ALlRhAzyiixRP1rjVE1Jw2Fk1RaG94nje4E5u5w a0tKGAE10z1KuapCrmCBQqPCWA== X-Received: by 10.28.213.209 with SMTP id m200mr251099wmg.83.1522660304532; Mon, 02 Apr 2018 02:11:44 -0700 (PDT) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id m7sm12595568wrb.61.2018.04.02.02.11.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Apr 2018 02:11:43 -0700 (PDT) Date: Mon, 2 Apr 2018 11:11:43 +0200 From: Jiri Pirko To: "Eric W. Biederman" Cc: Rahul Lakkireddy , "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 Subject: Re: [PATCH net-next v2 1/2] fs/crashdd: add API to collect hardware dump in second kernel Message-ID: <20180402091143.GD3313@nanopsycho> References: <296ffbd47fd4f30238689e636bd2480683224227.1521888444.git.rahul.lakkireddy@chelsio.com> <20180330103907.GC3313@nanopsycho> <20180330105156.GA24344@chelsio.com> <87k1tt2yo7.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k1tt2yo7.fsf@xmission.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fri, Mar 30, 2018 at 08:42:00PM CEST, ebiederm@xmission.com wrote: >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. Yeah. I still don't see how you link the dump and the device. Rahul, did you look at the patchset I pointed out? Thanks!