Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3653298ybh; Tue, 17 Mar 2020 04:11:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsFcp4y9JBoYXbe/Q6l6vgfOHcm+AgkV1wyD6F4Y690g5uYdb5dA1ALqqffbBqM58dMtwYb X-Received: by 2002:a9d:4810:: with SMTP id c16mr3375909otf.248.1584443501082; Tue, 17 Mar 2020 04:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584443501; cv=none; d=google.com; s=arc-20160816; b=vs6ZKoMI26d9MfFjWgYDZPOfpn+PaxI8U6x2onkRkI2CrwxxlWKapYYlZDZIA1/69H hS8rDWHS3J8j5RqA+xbK/nzOHYmp/mOWm+rLdZJxxF5Cn9WX13vZsWS75/SW44UDYtN/ E5XEqZiehte7MT40DK1WWGHJUjBqKEIYRJNDnJWjdFl5DdQk64sDbxL+KCGpVALrAJqU ccPzn9oCjStBhPDde+sQ0N7FhGuXCwdhVZg7VbMuWh99EkgC679UnmgF1BQVVolSnZLE 4CYgDN3NIiNaB+MIZUTSfjSkuFk0+2UbVhdCJM0887UJCZIZqmA94Oq73gm460cdJBSA igLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=5ZVaxgAPu7tRLwzrgx0YFwBG2He1G66cpQN69Xz0K3I=; b=MiY8jNDxY95hT4KpRZH21ZCaNxPwv8UTgbWpM4Zaqu+pKmBXjmyN/YSFhzfjn6bkXk iy/FfAFEx8RPo9F4az+Yz3gqRqpesfFLjfovVeAPmdluUIvAfowYT+zz29KUN/yWQMq8 PSSmgr49AkZPrEk2rPCDOl6iWS5XbsFtc2P1HECYNP8CxuLJIjsdPeTFyl4MwRDvb4R4 4hODEQC4MUKuHYdyUvvMInG5scjjFrY2zJ0JFIqUamgJyrGs9T7lbypDya6KTMbgN6HO kn9RdvfILy1hsG//VJVut7ZEKWdEIAUmdBGRIRYtBwJavjxTqqtdOIMm9NvzH1dZat9d C7Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=S2qnvktO; 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 l13si1680577otb.102.2020.03.17.04.11.28; Tue, 17 Mar 2020 04:11:41 -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=@c-s.fr header.s=mail header.b=S2qnvktO; 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 S1729169AbgCQLK6 (ORCPT + 99 others); Tue, 17 Mar 2020 07:10:58 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:46442 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbgCQLK4 (ORCPT ); Tue, 17 Mar 2020 07:10:56 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48hVpQ3gWvz9tyNL; Tue, 17 Mar 2020 12:10:54 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=S2qnvktO; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id tw69ROBWa6CW; Tue, 17 Mar 2020 12:10:54 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48hVpQ2R82z9tyNJ; Tue, 17 Mar 2020 12:10:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1584443454; bh=5ZVaxgAPu7tRLwzrgx0YFwBG2He1G66cpQN69Xz0K3I=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=S2qnvktOMP0HeIE4yDIfvL8NtDojuzvqd6Yono4mp4tlyid+D2eqdC6uNj7eRj0wX FHOC+zMWLqjaAGqnuE6tHE824l/AcsFlrF5NTK4eYimJ4TADfjMOC7LIMWoIaVbqU3 KBCSot4jqb+oEXLpaQSdetJWRycgM8DaB8UQoGGI= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 654358B785; Tue, 17 Mar 2020 12:10:54 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id emwlBXj-XvrU; Tue, 17 Mar 2020 12:10:54 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7E44B8B787; Tue, 17 Mar 2020 12:10:46 +0100 (CET) Subject: Re: [PATCH 14/15] powerpc/watchpoint/xmon: Don't allow breakpoint overwriting To: Ravi Bangoria , mpe@ellerman.id.au, mikey@neuling.org Cc: apopple@linux.ibm.com, paulus@samba.org, npiggin@gmail.com, naveen.n.rao@linux.vnet.ibm.com, peterz@infradead.org, jolsa@kernel.org, oleg@redhat.com, fweisbec@gmail.com, mingo@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20200309085806.155823-1-ravi.bangoria@linux.ibm.com> <20200309085806.155823-15-ravi.bangoria@linux.ibm.com> From: Christophe Leroy Message-ID: Date: Tue, 17 Mar 2020 12:10:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200309085806.155823-15-ravi.bangoria@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 09/03/2020 à 09:58, Ravi Bangoria a écrit : > Xmon allows overwriting breakpoints because it's supported by only > one dawr. But with multiple dawrs, overwriting becomes ambiguous > or unnecessary complicated. So let's not allow it. Could we drop this completely (I mean the functionnality, not the patch). Christophe > > Signed-off-by: Ravi Bangoria > --- > arch/powerpc/xmon/xmon.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c > index 0ca0d29f99c6..ac18fe3e4295 100644 > --- a/arch/powerpc/xmon/xmon.c > +++ b/arch/powerpc/xmon/xmon.c > @@ -1381,6 +1381,10 @@ bpt_cmds(void) > printf("Hardware data breakpoint not supported on this cpu\n"); > break; > } > + if (dabr.enabled) { > + printf("Couldn't find free breakpoint register\n"); > + break; > + } > mode = 7; > cmd = inchar(); > if (cmd == 'r') >