Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4356028ybi; Tue, 11 Jun 2019 05:26:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzKy9S9Iy8iAig0MRC35yQZ55w9Nh8pARZAbmCKAGBZCeUAMK1PJf1uwVjMhoFLPAJp6Sa X-Received: by 2002:a17:90a:3581:: with SMTP id r1mr17179244pjb.53.1560255972680; Tue, 11 Jun 2019 05:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560255972; cv=none; d=google.com; s=arc-20160816; b=Vd5VP6L7n19Sgjtv6BdvjJ/nrh7qnzUesRXx36ojiEHOTfyGNTpfq74OShbKu7yb4g qaELWXOCW85ZP5gxJfyq3uVFex+q2gbmy4Gu608phjaYTOw3xXebevD2574uOAftG/oY 1xifeH25ua+ynoIa3wJmhpyVSQ5MKmKEv4vL/Zl87qmaNK6to7pLKXg0UFepV0wDymtg cQD4CFXuIM0OgkIfcrrLWu8qH2BWBjkxMdnMvAih272WaUbe4P1MW1qdZwitfbc5e82B TvmFpLZngzopaRk1mMROBFh7XJGMisMM1oDcvFgpnVzBLGJhDW6kvbDQ37u7tDmyObQV kFIg== 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; bh=QukcMNGwZckUnii5x0hqUwmjRq1rlJQHMCtyQ0Z8UYY=; b=aVW1jGKanVhUN4nbHcqlzeM+Ne14WKcR89qrTSObIjckHbuoRQ2qzyGEf/9ixpMJWT tKicDp8a2AbmOkK+W9QEwiEPcVbjhl9HGHPaUtqjLgWHJxKj7QN8eUrn56dUjZ8RcSr6 ITZKTiQMsdvZbfC5WDk3cmdO69/VbSQY7GW91vIMGz/UV6BNdAu024xd1slxo4uCFd2j ZlcqSq+vwDwf4pYM181NzGM1N3Zk2v4gg5tYRKCSqRIPedg+gz+H1HWMgaekWLH9inKe qCgYEiMikkGeSBnRC6pk4R5qxNlZh7dI0cFp6lLhb1dKY2HRyQJt4sMFB1Xwdhx/cZl5 qfAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=pnpCqfjp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y62si12188862pgy.362.2019.06.11.05.25.55; Tue, 11 Jun 2019 05:26:12 -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=@alien8.de header.s=dkim header.b=pnpCqfjp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390083AbfFKL4y (ORCPT + 99 others); Tue, 11 Jun 2019 07:56:54 -0400 Received: from mail.skyhub.de ([5.9.137.197]:35390 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389499AbfFKL4y (ORCPT ); Tue, 11 Jun 2019 07:56:54 -0400 Received: from zn.tnic (p200300EC2F0A6800DC92A88D55C2D513.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:6800:dc92:a88d:55c2:d513]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id CC9F21EC0467; Tue, 11 Jun 2019 13:56:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1560254211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=QukcMNGwZckUnii5x0hqUwmjRq1rlJQHMCtyQ0Z8UYY=; b=pnpCqfjp/JTTeaGIsxUClj6wZjVmlGUmmX/r6HmRNnoLGEWgqXFfkDNSEqoXl1CwLtGWmG 3WXVYFeZWUgZdYROGprUTVIKezGTXxbqmTGfBYosVD6Xdf7H7DMDa0qHJYsVn7+MkJCOsn bbSOc4P5r72saQcFPaXyQ50MzJz0mxU= Date: Tue, 11 Jun 2019 13:56:51 +0200 From: Borislav Petkov To: Benjamin Herrenschmidt Cc: James Morse , "Hawa, Hanna" , "robh+dt@kernel.org" , "Woodhouse, David" , "paulmck@linux.ibm.com" , "mchehab@kernel.org" , "mark.rutland@arm.com" , "gregkh@linuxfoundation.org" , "davem@davemloft.net" , "nicolas.ferre@microchip.com" , "devicetree@vger.kernel.org" , "Shenhar, Talel" , "linux-kernel@vger.kernel.org" , "Chocron, Jonathan" , "Krupnik, Ronen" , "linux-edac@vger.kernel.org" , "Hanoch, Uri" Subject: Re: [PATCH 2/2] edac: add support for Amazon's Annapurna Labs EDAC Message-ID: <20190611115651.GD31772@zn.tnic> References: <1559211329-13098-3-git-send-email-hhhawa@amazon.com> <20190531051400.GA2275@cz.tnic> <32431fa2-2285-6c41-ce32-09630205bb54@arm.com> <9a2aaf4a9545ed30568a0613e64bc3f57f047799.camel@kernel.crashing.org> <20190608090556.GA32464@zn.tnic> <1ae5e7a3464f9d8e16b112cd371957ea20472864.camel@kernel.crashing.org> <68446361fd1e742b284555b96b638fe6b5218b8b.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <68446361fd1e742b284555b96b638fe6b5218b8b.camel@kernel.crashing.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 05:21:39PM +1000, Benjamin Herrenschmidt wrote: > So looking again ... all the registration/removal of edac devices seem > to already be protected by mutexes, so that's not a problem. > > Tell me more about what specific races you think we might have here, > I'm not sure I follow... Well, as I said "it might work or it might set your cat on fire." For example, one of the error logging paths is edac_mc_handle_error() and that thing mostly operates using the *mci pointer which should be ok but then it calls the "trace_mc_event" tracepoint and I'd suppose that tracepoints can do lockless but I'm not sure. So what needs to happen is for paths which weren't called by multiple EDAC agents in parallel but need to get called in parallel now due to ARM drivers wanting to do that, to get audited that they're safe. Situation is easy if you have one platform driver where you can synchronize things in the driver but since you guys need to do separate drivers for whatever reason, then that would need to be done prior. Makes more sense? -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.