Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2121530ybp; Thu, 10 Oct 2019 02:33:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzodXzxHaKBPojfqjOjw/VH8S9GDHda9UEn5BuvQ8q6oV4kFIlvDx/VKzuNnEtAE5K/dWW+ X-Received: by 2002:aa7:d888:: with SMTP id u8mr6941160edq.144.1570700009258; Thu, 10 Oct 2019 02:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570700009; cv=none; d=google.com; s=arc-20160816; b=xm6Nw3v1Xs1CYgrxNTi1sAlT1hmPCSgpsn1yyjv5V+TPWZF/Cz2cvAlnVqrZu66huP tfybvx6rdrPjs5PXuk2/2DDKekyxedfrDr0iwe0q6HRfd6Zt4D29FuL6FCBmFboB214H iW8FMxagfKLXAtaQVxyf+9JUuuRNHAhrxYp/5XpgYXVnhbpVpwfeBWs0cOJ3gSTKhuy/ Sbhr/yMlH9KqqUGo2k3ZTqduGd6lWvonWQ+mj2tBAADE//PYgwmCHVr0H9B8Wkb8GYdI FdrhiZ+6AQZFaRa9ipWSt4Fq4tfli2mvywzZqWmKSktdrUNSaRE2CCK5JIfgTzh56eeG vu+Q== 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=AykK97M7er2vvsv5jIrpdgMqJu5mfszKCg1SulVxerg=; b=JSos117ge/afdgvJxiJ0rdy8sa4ifwpo/jM3abEG6sTq5l+9NYBOIe7ORmNt90wcz8 qt60tRpM0ye5lzUjOg+iYDww9kIjzCqaBJmuCVHPRJCfm485RtMfpBfGa0uIIEKPJU6T NoK5QqifQyrkHXP8yhqunUoW2rpDTyFTZJhGw18wCet27hAeDKcKW/HRPMo8H1SSKLHd AJzpI27Lvx/1MNV3utBH9p25BM0SxfQuyU14SyVzcybMzBH8NZ1xNtijuXQ5OjdD0rwV A547BwvtS/jaTPaegoECJ25I12DMt4YBCRNdZ5i/FoOwFSjkfugEClPTYhKhkOnT2EDG B2cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=Mi+LBXie; 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 j17si2703661ejd.314.2019.10.10.02.33.05; Thu, 10 Oct 2019 02:33:29 -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=Mi+LBXie; 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 S2387943AbfJJJaa (ORCPT + 99 others); Thu, 10 Oct 2019 05:30:30 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:35411 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727320AbfJJJaa (ORCPT ); Thu, 10 Oct 2019 05:30:30 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46pm5t70dPz9tyg3; Thu, 10 Oct 2019 11:30:26 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=Mi+LBXie; 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 bGdkoNBMdE8L; Thu, 10 Oct 2019 11:30:26 +0200 (CEST) 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 46pm5t5kgwz9tyfl; Thu, 10 Oct 2019 11:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1570699826; bh=AykK97M7er2vvsv5jIrpdgMqJu5mfszKCg1SulVxerg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Mi+LBXieYs1bXqMMcVBxGt0xJEsWJQxna+rH76Uo5f8WlQ8yvbgQynDlslYkEmKP9 wDxkjFiEtlOjZhz9hE2b1rpXa76g7GNgWkt39bnymL7AWiPXOQZMJWSfZu1GfSkHTc BjMG7D4v7nWbpz3LA4ZXlm7AUWOSWU8hwKG6rFTA= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DE7468B7B2; Thu, 10 Oct 2019 11:30:27 +0200 (CEST) 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 vHcJKjrjLiae; Thu, 10 Oct 2019 11:30:27 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 4699B8B78B; Thu, 10 Oct 2019 11:30:27 +0200 (CEST) Subject: Re: [PATCH v4 0/5] Powerpc/Watchpoint: Few important fixes To: Ravi Bangoria Cc: mpe@ellerman.id.au, mikey@neuling.org, npiggin@gmail.com, benh@kernel.crashing.org, paulus@samba.org, naveen.n.rao@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20190925040630.6948-1-ravi.bangoria@linux.ibm.com> <19b222ce-3013-7de5-1c04-48c6fd00fe81@linux.ibm.com> <0d98e256-44ee-f920-cb2f-f79545584769@c-s.fr> <3e31e5f7-f948-512a-054c-9ad10103ccc0@linux.ibm.com> From: Christophe Leroy Message-ID: Date: Thu, 10 Oct 2019 11:30:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <3e31e5f7-f948-512a-054c-9ad10103ccc0@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 10/10/2019 à 06:44, Ravi Bangoria a écrit : > >>> @Christophe, Is patch5 works for you on 8xx? >>> >> >> Getting the following : >> >> root@vgoip:~# ./ptrace-hwbreak >> test: ptrace-hwbreak >> tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty >> PTRACE_SET_DEBUGREG, WO, len: 1: Ok >> PTRACE_SET_DEBUGREG, WO, len: 2: Ok >> PTRACE_SET_DEBUGREG, WO, len: 4: Ok >> PTRACE_SET_DEBUGREG, WO, len: 8: Ok >> PTRACE_SET_DEBUGREG, RO, len: 1: Ok >> PTRACE_SET_DEBUGREG, RO, len: 2: Ok >> PTRACE_SET_DEBUGREG, RO, len: 4: Ok >> PTRACE_SET_DEBUGREG, RO, len: 8: Ok >> PTRACE_SET_DEBUGREG, RW, len: 1: Ok >> PTRACE_SET_DEBUGREG, RW, len: 2: Ok >> PTRACE_SET_DEBUGREG, RW, len: 4: Ok >> PTRACE_SET_DEBUGREG, RW, len: 8: Ok >> PPC_PTRACE_SETHWDEBUG, MODE_EXACT, WO, len: 1: Ok >> PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RO, len: 1: Ok >> PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RW, len: 1: Ok >> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, WO, len: 6: Ok >> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, RO, len: 6: Fail >> failure: ptrace-hwbreak >> > > Thanks Christophe. I don't have any 8xx box. I checked qemu and it seems > qemu emulation for 8xx is not yet supported. So I can't debug this. Can > you please check why it's failing? > First issue: we get a mismatch between the parent and the child, because len 8 test generates two reads/writes while the parent installs the breakpoint only once. Changing glvar from __u64 to unsigned long fixes the problem. Then I get: test: ptrace-hwbreak tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty PTRACE_SET_DEBUGREG, WO, len: 1: Ok PTRACE_SET_DEBUGREG, WO, len: 2: Ok PTRACE_SET_DEBUGREG, WO, len: 4: Ok PTRACE_SET_DEBUGREG, RO, len: 1: Ok PTRACE_SET_DEBUGREG, RO, len: 2: Ok PTRACE_SET_DEBUGREG, RO, len: 4: Ok PTRACE_SET_DEBUGREG, RW, len: 1: Ok PTRACE_SET_DEBUGREG, RW, len: 2: Ok PTRACE_SET_DEBUGREG, RW, len: 4: Ok PPC_PTRACE_SETHWDEBUG, MODE_EXACT, WO, len: 1: Ok PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RO, len: 1: Ok PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RW, len: 1: Ok PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, WO, len: 6: Fail failure: ptrace-hwbreak Which shows that PPC_PTRACE_SETHWDEBUG doesn't work in MODE_RANGE Christophe