Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1702467ybb; Thu, 26 Mar 2020 05:54:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuePbLotuuXaweB9wtvayuN+nwNW/5PVnHjJD7qRYTZNUgS8x6+fXoDBMtAzcH263guogW5 X-Received: by 2002:a4a:ba0b:: with SMTP id b11mr5014426oop.92.1585227294658; Thu, 26 Mar 2020 05:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585227294; cv=none; d=google.com; s=arc-20160816; b=jg2ILo8Qg9P4LahuuSZPeiUH2oTsDC720O3ClKwC7qFrmne5lSKZjKA9pAWkJ19BGi N5DUSDy1uBPvlyDIZGF2W2QJpav9nFwDRW/W7k8WCpcAmintZPSf6pgL9HLCsY/WjJZ0 q7DJPsqTKVa7/k5pCtwoNlrd033jF/8gL4+q0AGo7O6KTGjK+B0HbWg/P9oijcJPEv6d kTfgpgj1bCxUs8XkAgaQvdkv23TUR5fsHONCiC4D1KVrI5xRfzDS0HRAVbgJ75WVBYIl eYPpgZdVsK0UgpKMuaYqLEUy34O9+WcXS+Fm4gP8eA9tyjralNAc2Ue/b2lbY4LBX+0P sWvQ== 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=pv5nl1zmDcq3y5iwkiuJhYXlqL7JGHrLvXca9WF8M7U=; b=V7W7jiO7vW6kArb49g646K/tFrQJ9H1fFx3mXR+xCEbdbvPlvbrbD4Lv9mwOpDlwgO v4LaR6S8Yr82w7LtoDPOf06QJpDQBQISsnnoKoDxDhVClCXzOssyYJ8tqKXFQ/MWPITj vGMY/vQ2dThudTlmKVcodWsOOgJE8sVAkXOqKccTmZvyI9PgV4EmEHwERuiElQ8GEeHp JbQIpCa3ll/jYKdJYVfEMYCBZrs6ZhLxYtkqGCZeHxa8fDbRbPRFS8opnaRpiBLr5JME uB0T2gM+jVR5031u0RUr94fVwPAOW7bIyYXRK1dB90qyM9k1L29pT+Uw5iQ5+o4z4Muo ryXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=LMyGOtON; 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 z3si1040280oth.163.2020.03.26.05.54.33; Thu, 26 Mar 2020 05:54:54 -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=LMyGOtON; 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 S1728152AbgCZMxm (ORCPT + 99 others); Thu, 26 Mar 2020 08:53:42 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:62547 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728065AbgCZMxm (ORCPT ); Thu, 26 Mar 2020 08:53:42 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48p4fq29TYz9vBnF; Thu, 26 Mar 2020 13:53:39 +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=LMyGOtON; 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 90yt0EtupaJb; Thu, 26 Mar 2020 13:53:39 +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 48p4fq0qPRz9vBnC; Thu, 26 Mar 2020 13:53:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1585227219; bh=pv5nl1zmDcq3y5iwkiuJhYXlqL7JGHrLvXca9WF8M7U=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=LMyGOtONLwl4lZL1yJByBQT5ZaVwcGGqx08lFVKYcLFc/Kf+UTGbH5Ee8OxEw2tJa rd8ZRoai5oUExchjaSlAltOy2MaOCBekxlIT0odeIug2+9m2lVTlbk3mJs7Qjmw/j5 thaq7bCNspyOR1zahy2HM9D+5UM5pM5w+NqwHNZU= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6C2D88B7BC; Thu, 26 Mar 2020 13:53:40 +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 IbawcdGDWZPr; Thu, 26 Mar 2020 13:53:40 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 93C7D8B7BA; Thu, 26 Mar 2020 13:53:39 +0100 (CET) Subject: Re: [PATCH v5 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions. To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , mikey@neuling.org Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <87imizdbaz.fsf@mpe.ellerman.id.au> <25a7f050-f241-6035-e778-16b1ca9928f3@c-s.fr> <87k13axoda.fsf@mpe.ellerman.id.au> From: Christophe Leroy Message-ID: Date: Thu, 26 Mar 2020 13:53:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <87k13axoda.fsf@mpe.ellerman.id.au> 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 24/03/2020 à 07:23, Michael Ellerman a écrit : > Christophe Leroy writes: >> On 03/20/2020 02:12 AM, Michael Ellerman wrote: >>> Christophe Leroy writes: >>>> Move ADV_DEBUG_REGS functions out of ptrace.c, into >>>> ptrace-adv.c and ptrace-noadv.c >>>> >>>> Signed-off-by: Christophe Leroy >>>> --- >>>> v4: Leave hw_breakpoint.h for ptrace.c >>>> --- >>>> arch/powerpc/kernel/ptrace/Makefile | 4 + >>>> arch/powerpc/kernel/ptrace/ptrace-adv.c | 468 ++++++++++++++++ >>>> arch/powerpc/kernel/ptrace/ptrace-decl.h | 5 + >>>> arch/powerpc/kernel/ptrace/ptrace-noadv.c | 236 ++++++++ >>>> arch/powerpc/kernel/ptrace/ptrace.c | 650 ---------------------- >>>> 5 files changed, 713 insertions(+), 650 deletions(-) >>>> create mode 100644 arch/powerpc/kernel/ptrace/ptrace-adv.c >>>> create mode 100644 arch/powerpc/kernel/ptrace/ptrace-noadv.c >>> >>> This is somehow breaking the ptrace-hwbreak selftest on Power8: >>> >>> test: ptrace-hwbreak >>> tags: git_version:v5.6-rc6-892-g7a285a6067d6 >>> 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: Ok >>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, RW, len: 6: Ok >>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, WO, len: 6: Ok >>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, RO, len: 6: Fail >>> failure: ptrace-hwbreak >>> >>> I haven't had time to work out why yet. >>> >> >> A (big) part of commit c3f68b0478e7 ("powerpc/watchpoint: Fix ptrace >> code that muck around with address/len") was lost during rebase. >> >> I'll send a fix, up to you to squash it in or commit it as is. > > Thanks. > One person asked me if I sent the fix already. So yes, it is there: https://patchwork.ozlabs.org/patch/1259348/ Christophe