Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4949140pxb; Wed, 26 Jan 2022 01:06:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfwGssn9s8ZHcfxR2VHCYeRquKH6CwEoedFX9rH3F1jbLTy4EOIjxToffEZVVk6xuwJ4to X-Received: by 2002:a17:90b:4a83:: with SMTP id lp3mr7615633pjb.35.1643188016834; Wed, 26 Jan 2022 01:06:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643188016; cv=none; d=google.com; s=arc-20160816; b=K+uHx4Kap/hQb1htIgFqGTXgyhRLJ4fk9UYjhDfYgqKUhA9hQtMJRe+jU2scyxtMEb /RutsLiPClYHKfzOUpixMa8ITf+BIGAStqbntsawMyN1mx3dq9PANLM4WtH52HK4ybTl jNWToYpjMO8UjQDxPzg19Yl+fASEu45wtaUcdY9yCzU437+MfTpIMR9on+z6o7UBZ9Hx ahoxzqx1gv1X4KwaJqSorafAFEdiV5iI2eGDHovgzFMflnEzxeIU8YfsjF+Pp379pIg/ NtihYD1ZE82PMlJ48cicSMn6bskhRlKh9JI9Bpw5qcAuYirYKwYl/V0LBQ+SFpYjg3R2 sbJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xH4919BBQDatXV47ZV39NtXvgYYtXrd/TsEbvbZr80k=; b=rzPXtJ2lqkfySDftM3wZtBozCkhK4mH4ZXZNe7YX5bvut/bvfJZ8GocMyAaKIkSJ0M NQsXLEeVEE9fIYFR355BrPmxuHteNZjqnQGi00GajeKPQ4fuFsHI5Sim6nnJTJ4KevVr SscZQm2uGzjSJvCcWVIM61rGrbL4NBRo7tVoAHWgC7o6zB1g/d0nNRW8ePqsB0x6m34L wjFumgq+Q0xcRNZo3jQgfCWL0fuCY5yVEuDlAjeDOes4avn7BZJIKP3yxbEfjlxJ9tl8 0vgTWuQzoU3OJfaXF5LygSxoFM13O0j2Evpyrvond8kORFh7ouRltIk3+uHu3Ej1qSDC OdBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=MfklnOCQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si1255004pfv.7.2022.01.26.01.06.44; Wed, 26 Jan 2022 01:06:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=MfklnOCQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231161AbiAYUSA (ORCPT + 99 others); Tue, 25 Jan 2022 15:18:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbiAYUR4 (ORCPT ); Tue, 25 Jan 2022 15:17:56 -0500 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A5DC061744 for ; Tue, 25 Jan 2022 12:17:55 -0800 (PST) Received: by mail-yb1-xb36.google.com with SMTP id c10so65209482ybb.2 for ; Tue, 25 Jan 2022 12:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xH4919BBQDatXV47ZV39NtXvgYYtXrd/TsEbvbZr80k=; b=MfklnOCQVmnZ1DGtZ/7lH8SHjstb5OvkICRH3LZOqLvcVDHKV0C4/qab9nARYCxi07 SkqgzSsp4w8mfq9ydwKA+Pq4fo943Kkwmo7LEUszNU5r+EGEZe9b7JQskqSHPiwQ9xjS 6+3mmdc2jub7xRbVt6HrtXDQmbjJj3kJkwuzk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xH4919BBQDatXV47ZV39NtXvgYYtXrd/TsEbvbZr80k=; b=inqguAS72/gTDkqPiDefRZAMl5WR5Aa5flUUhhBEEeiW91Yqy8n2r1PwTl32B/itzV CDOmsQ4cmQJ18J0GNvbRqPqz4R8E/lhJZBY5keen/6lxJoH0996/+lw7kFoEbykOZvZD v4ZMqhrEyYNpSuoc4Jv4MGdJvXmGWD1pec86uIcAeuUEKZZbrSRJZQVNL3zF3GjmJBnZ u6lYCMnnfcKlSOQShdJAJJceCY5GIgMI8ZaWlMWrhetpUnZRgCd0kZrYpvr7wKlGzQAM 9sMGd4sXrVRg8A+u9+6u9TtMQt7nciRTjW/aRdLVeimoJijqK2/tLtifMJeGIfyQkvIG VSxA== X-Gm-Message-State: AOAM531SmUuOVJaKRiYjURotGPD34BrdJ5f+DObjNYfvESTf7zxgrpw9 o8YJ4yUnkSF5937BnYUZJu04ECoMu+mIjHEsJkJd X-Received: by 2002:a25:ac9a:: with SMTP id x26mr4798915ybi.713.1643141875109; Tue, 25 Jan 2022 12:17:55 -0800 (PST) MIME-Version: 1.0 References: <20220120090918.2646626-1-atishp@rivosinc.com> <20220120090918.2646626-7-atishp@rivosinc.com> In-Reply-To: From: Atish Patra Date: Tue, 25 Jan 2022 12:17:44 -0800 Message-ID: Subject: Re: [PATCH v3 6/6] RISC-V: Do not use cpumask data structure for hartid bitmap To: Geert Uytterhoeven Cc: Atish Patra , Linux Kernel Mailing List , Anup Patel , Albert Ou , Damien Le Moal , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Jisheng Zhang , Krzysztof Kozlowski , linux-riscv , Palmer Dabbelt , Paul Walmsley , Rob Herring , Emil Renner Berthing Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 12:12 PM Geert Uytterhoeven wrote: > > Hi Atish, > > On Thu, Jan 20, 2022 at 10:12 AM Atish Patra wrote: > > Currently, SBI APIs accept a hartmask that is generated from struct > > cpumask. Cpumask data structure can hold upto NR_CPUs value. Thus, it > > is not the correct data structure for hartids as it can be higher > > than NR_CPUs for platforms with sparse or discontguous hartids. > > > > Remove all association between hartid mask and struct cpumask. > > > > Reviewed-by: Anup Patel (For Linux RISC-V changes) > > Acked-by: Anup Patel (For KVM RISC-V changes) > > Signed-off-by: Atish Patra > > Thanks for your patch, which is now commit 26fb751ca37846c9 ("RISC-V: > Do not use cpumask data structure for hartid bitmap") in v5.17-rc1. > > I am having an issue with random userspace SEGVs on Starlight Beta > (which needs out-of-tree patches). It doesn't always manifest > itself immediately, so it took a while to bisect, but I suspect the > above commit to be the culprit. > I have never seen one before during my testing. How frequently do you see them? Does it happen while running anything or just idle user space results in SEGVs randomly. Do you have a trace that I can look into ? > So far the Icicle looks unaffected. > > Do you have a clue? > Thanks! > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds -- Regards, Atish