Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1758923pxp; Sat, 12 Mar 2022 21:36:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvd9c4htxNlqdIU7wwnUDJjZY6p9XrJ4tl6eQdUOvWOe4Vf+EWcKAhoJ68UjaKfGDLwOdV X-Received: by 2002:a17:903:1246:b0:151:94d9:eeb2 with SMTP id u6-20020a170903124600b0015194d9eeb2mr17278644plh.165.1647149796170; Sat, 12 Mar 2022 21:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647149796; cv=none; d=google.com; s=arc-20160816; b=cxXyBT2EEgxCjzNh+qYyj8KDPptcNq2MOhR+C26Vs6WQCJIJyiQXbTkMOniaNHtowL KcF0G8Fp7DuTBKMA49P35mbEqe9gPDHjm8y6eVw23JsrvQbRXpdIaFeAlAIxZODLTMzd aw+kvLL1/FzyrZyaDteHAa/DLzTv407ggEoA2HroVx05EiVCOTjv0pxd5NroJNoHfW0J dW3rv5F9UIfnGr7Mt3Z05/us6dYxUOyM8ERhn+hsotxs6qAG/gF99N8wqROkqNPsTPnf aO52fqtSob+FHlBZIkS1hhtgyE/8FAlG6AkBWeNFDbUv5yCAtuG2OhOm8+VCr29o4kEt JTXA== 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=52W9q0/ypkx4S9+DIODk0Uq0ox54c7w4kVL7674dQ6U=; b=GKS/Wooy5uV9gWvhC3uxvB9hPpbvhuXKM+FUUIhDJG4xtE7370duOnL119PbLj2XdH C2G+QT9Y9w5hQ+FkLuHM37XpRXRy19GRTAFx4A6OtyFlp3cZVdVp4MM9nRJeCVqHPbOG 3tWclbaDXCq9I1S35wJSWdMrAfsA3EA7IcdvsWPREgNadj68kMYZ5AUIsY4NXqsfi6lN ZMyqWc1g4OioAX94XrQx0185/p7rmcvQSo5mPWwU/OuEDBGsV/TSiNZJhlKeJqLSqrzQ HNCE0eLFEBXxKcj8e93auxiZoVQJSNvl7UI+iXFyfPYrpEkfQJQSFv1twhbklCzGKp36 C99Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V6u6FSys; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a17090a970c00b001bfacde16d8si9300676pjo.99.2022.03.12.21.35.54; Sat, 12 Mar 2022 21:36:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V6u6FSys; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233053AbiCLXvz (ORCPT + 99 others); Sat, 12 Mar 2022 18:51:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233027AbiCLXvy (ORCPT ); Sat, 12 Mar 2022 18:51:54 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF21D70F59; Sat, 12 Mar 2022 15:50:47 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id g20so15236968edw.6; Sat, 12 Mar 2022 15:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=52W9q0/ypkx4S9+DIODk0Uq0ox54c7w4kVL7674dQ6U=; b=V6u6FSysyXrFpEqLaS8USZ0d/6G6QTFgYmseRClD8M7pB4z7u2bTEjBFF7673m3PKA vFq4sC0Rl6wiomxzhicwIOF3OFpVENCGcc+1eEabZ14b7QzRkJqG/WqGvLH43owEOZEp fRDGH3qH+O1YVDblzXIVwNwikIzwQBnKKHR1ZKwtFRiF0p6wwsG6CCbF1oRKNxObB+cp cQJX75CZgowmTQWq9fVLe2i6F0wYMcKlHbNBaLywjFbTF/V5Dg6wobxDZeQIm7Jx4LNV ZmNg2MfRrz4QWcRDLzUMDVJfVnhW8LZZhyXQ7TpPKN0vmMDd6IkHdKK773rXrZn6Unlg rK7g== 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=52W9q0/ypkx4S9+DIODk0Uq0ox54c7w4kVL7674dQ6U=; b=6RakH3xNAVvbyP16qs2l0OintgdkhbRBSqcIO2MDchFtxfGjZ67YW8wzRnsU1UW+31 4tAljGL8RyY9o5OoWLHU6KipCayxCDLSUWymnJCEqFoHA/IjzDKQZyzIQh8M4MMNGfI/ rbU0SEqdH/FBdZ9iNuogRYdMqIJqfSnVeb45J/azLlCRSYCTStR6P754/BYEh4NpBIY5 OLkdoQaZZ8keL8oMLEo2LHG8h0xsp1QBdUTjCsakJFa0Vi65FsdwHWBzrkvnrjBYV6xX 1brvtik/X+azSy+8CldbT04GIVlXWqvgvldaIMnx5rrT5uO3ff9AzqOuhHDuVwVvkVZP /rJA== X-Gm-Message-State: AOAM5309s6z+Bfqq/2KxzDS4Fn2h6NlXc5QtgVJf1R5UOkEq2PsCGOEY VanC5M7l/rC/c0u45Qc8S12JFozqMjeylrEsPjje/mKtiznEtA== X-Received: by 2002:a05:6402:5143:b0:416:1327:4f95 with SMTP id n3-20020a056402514300b0041613274f95mr14260634edd.56.1647129046482; Sat, 12 Mar 2022 15:50:46 -0800 (PST) MIME-Version: 1.0 References: <20220312155603.1752193-1-guoren@kernel.org> In-Reply-To: <20220312155603.1752193-1-guoren@kernel.org> From: Max Filippov Date: Sat, 12 Mar 2022 15:50:35 -0800 Message-ID: Subject: Re: [RFC PATCH] arch: patch_text: Fixup last cpu should be master To: Guo Ren Cc: linux-arm-kernel@lists.infradead.org, LKML , linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, "open list:TENSILICA XTENSA PORT (xtensa)" , Guo Ren , Will Deacon , Catalin Marinas , Palmer Dabbelt , Masami Hiramatsu , Chris Zankel , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guo Ren, On Sat, Mar 12, 2022 at 7:56 AM wrote: > > From: Guo Ren > > These patch_text implementations are using stop_machine_cpuslocked > infrastructure with atomic cpu_count. The origin idea is that when The original > the master CPU patch_text, others should wait for it. But current > implementation is using the first CPU as master, which couldn't > guarantee continue CPUs are waiting. This patch changes the last guarantee that remaining CPUs are waiting. > CPU as the master to solve the potaintial risk. potential > > Signed-off-by: Guo Ren > Signed-off-by: Guo Ren > Cc: Will Deacon > Cc: Catalin Marinas > Cc: Palmer Dabbelt > Cc: Peter Zijlstra Cc: Masami Hiramatsu > Cc: Chris Zankel > Cc: Max Filippov > Cc: Arnd Bergmann > --- > arch/arm64/kernel/patching.c | 4 ++-- > arch/csky/kernel/probes/kprobes.c | 2 +- > arch/riscv/kernel/patch.c | 2 +- > arch/xtensa/kernel/jump_label.c | 2 +- > 4 files changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Max Filippov I'm curious, is there a specific issue that prompted this patch? -- Thanks. -- Max