From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4BD38C6FD18 for ; Tue, 25 Apr 2023 13:53:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0B7B786267; Tue, 25 Apr 2023 15:53:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kbBMD/lZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B316A85EE5; Tue, 25 Apr 2023 15:43:23 +0200 (CEST) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F39CD85830 for ; Tue, 25 Apr 2023 15:43:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=paskripkin@gmail.com Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2a7b02615f1so57077581fa.0 for ; Tue, 25 Apr 2023 06:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682430200; x=1685022200; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rSGgY/gdRrIyi2/HsUMx6s8/QL0TquaxG5f/DLBIKuk=; b=kbBMD/lZCJeft7+OI4GXYuFoVj40qoogpia+Ia20bwggWhu4tGIYNpc1OABCi2gkLk EHygqWm1JK12vimbQUEL8fKuoIkIGpYW629mgXFsao367DfOY3KwioBz5jf/3WeXGr23 UrM0a076aVpscROl9x0O2px2dohWPn6p51UcpV82TGWH+KBEvFYbMGXg0TaQq5hE0bmg tQUTQTmZnl8peDtsf0gHvCWud6vmIGIh+DzFsiWL4LX44bFiKSCnQsIQkAi1UAZYZK+L nkdu72/cKVXic8m2dKdoEakiaDsXOMH50PPc3TxmtT1EHz6qGcTFly5h6yiqQcaX+NHL LidQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682430200; x=1685022200; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rSGgY/gdRrIyi2/HsUMx6s8/QL0TquaxG5f/DLBIKuk=; b=KGntFSUe+2zEoapK2oWUQqgz7a/bN2ojaan+Fl2+U39zp+/zYtcbvUn8e+hcTngKUm AFC8I2Zr6LO30nhIPQdVdV3K4TAe//yCRf5RlS2yIIV7K7gXfI/wmHbx2aAqlyZo9Pzx PFAQ3Ti+yy68+3jiyUhWNdI1wIo+q0K7bIOEzreEZeujpTvjS0eGUXJK8aFuGoqb17W6 EbqGzq6TTYZ4Grdv6Psb4Olay/lJbS+loK4VnDJIo5SZ56XNlAoYSydVeACRvoXiPh/8 9IdEMVhL5++mG29dpMMdDv8JHaCbWTCuhsgO/O0cT/KLCPfFNe5sj3C67OAxx8IWazls mjJg== X-Gm-Message-State: AAQBX9eh9PeQeRrF6f+mnweY4LcMuwPkJDfj7/8PxPG2myyXUDe6eGOe baDBhkuXJ97W0w5NhreLHFA= X-Google-Smtp-Source: AKy350Y51Fz6b2/+s30NPj9tJE2aJA18VoSdzvkuyMfWRwR1mB6Hpcwofx3nZinJXoyS65DPWZOPUQ== X-Received: by 2002:a2e:3a18:0:b0:2a7:974d:a461 with SMTP id h24-20020a2e3a18000000b002a7974da461mr3556370lja.34.1682430200047; Tue, 25 Apr 2023 06:43:20 -0700 (PDT) Received: from ?IPV6:2a00:1370:8180:6b00:a1a8:4887:1af4:637a? ([2a00:1370:8180:6b00:a1a8:4887:1af4:637a]) by smtp.gmail.com with ESMTPSA id w21-20020a2e8215000000b002a9f1b23604sm2120466ljg.93.2023.04.25.06.43.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Apr 2023 06:43:19 -0700 (PDT) Message-ID: <784b2991-d612-c063-3fc3-66f656bb328b@gmail.com> Date: Tue, 25 Apr 2023 16:43:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] sandbox: disable tracing before unmapping RAM Content-Language: en-US To: trini@konsulko.com Cc: xypron.glpk@gmx.de, u-boot@lists.denx.de, Simon Glass References: <20230412185544.150241-1-paskripkin@gmail.com> From: Pavel Skripkin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 25 Apr 2023 15:53:01 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Hi Simon, Simon Glass says: > On Wed, 12 Apr 2023 at 12:55, Pavel Skripkin wrote: >> >> Currently doing 'reset' command in sandbox with tracing enabled causes >> SIGSEV >> >> ``` >> Hit any key to stop autoboot: 0 >> => >> => >> => reset >> resetting ... >> Segmentation fault (core dumped) >> >> ``` >> >> Tracing callback uses RAM buffer for storing tracing reports, but >> state_uninit() function unmaps whole RAM, which causes SIGSEV on umapped >> memory inside tracing subsystem. >> >> Fix it by disabling tracing before unmapping memory >> >> Signed-off-by: Pavel Skripkin >> --- >> arch/sandbox/cpu/state.c | 4 ++++ >> 1 file changed, 4 insertions(+) > > Reviewed-by: Simon Glass Thank you for review! +Tom, I guess? @Tom, could you, please, pick following patch? https://lists.denx.de/pipermail/u-boot/2023-April/515192.html With regards, Pavel Skripkin