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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7A7EC2D0A3 for ; Thu, 29 Oct 2020 11:50:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EC7D20796 for ; Thu, 29 Oct 2020 11:50:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CY3KSSqR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="0zJikgVC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EC7D20796 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UBjNOPTgEwExHyjbjoWJ7iLXhpwVhou+sL0xx/eT/Tw=; b=CY3KSSqRTgoJUQDQqtvjqpgWa 0HGeXlEYj3WDUNxSW/4ZnBc2axAoYJi+MiOg4D981vYLBYt4EheAsx+pMojo6gQ3aoZFckUh8zzVl VUVN7oSpUZnYvfxgfY4sGuarGCRs2mS1sppHyEGLdOQsH7PVMWmqyoUOpTCeFdZoR585ZTmMbakWS PnKKuC8gMlZjKadwuXK5l4q0uc+NmnsaqxmzX0VhqZxZo37o6GkMO8doDc7rNimg62DIawJAFDVuU H2Nx4Y+g9yFwUqTatKRxs8crlQ2tE01lX2YPSKDKaIgjbZsN8IK0G763m7ZNsSEstUFS3ih+/Fsed OfTMhqM2Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY6RV-0003y8-6c; Thu, 29 Oct 2020 11:50:09 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY6RS-0003xE-8y for linux-arm-kernel@lists.infradead.org; Thu, 29 Oct 2020 11:50:07 +0000 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 319E220796 for ; Thu, 29 Oct 2020 11:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603972205; bh=cwqlJsxBPgAY7Ehjg74uZY8354eTvIvDiJdQIf1wwAM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=0zJikgVC4X7nXemMmjupV3IzIfOzFcNolO4SdIuxRVpWa6Xg/h9LsktEYtfvwYMRp ZuvP7dqsieMz8NM/1xRUA9Bs5AfA07o/iSrXldzyoZIEgjTIEgb+h6fRbLfCiJm8Tr XF2H/tlD4F9rnCkthva7y2adNE1PRSDUCRB9rjt0= Received: by mail-oi1-f170.google.com with SMTP id k65so2868759oih.8 for ; Thu, 29 Oct 2020 04:50:05 -0700 (PDT) X-Gm-Message-State: AOAM5336EmNP9A5dABHCf033JsR6hbJ2T5f+fpFo0huOupjiVZ+HuJXA Byzqz9XnhFcX9tIJ8Ct4u/umS0EcolrIv9/dc4g= X-Google-Smtp-Source: ABdhPJz2BVLZljZJaqPwBmKxzm9rAwpD52wxNPBpE7FDdKqrHyjOeUcrzCQ4BEbAsdfvosKhPD+TkWV7pp3hWb7ouVU= X-Received: by 2002:aca:d64f:: with SMTP id n76mr2768423oig.174.1603972204413; Thu, 29 Oct 2020 04:50:04 -0700 (PDT) MIME-Version: 1.0 References: <20201028184114.6834-1-ardb@kernel.org> <20201029104007.GK2628@hirez.programming.kicks-ass.net> <20201029114605.GM2628@hirez.programming.kicks-ass.net> In-Reply-To: <20201029114605.GM2628@hirez.programming.kicks-ass.net> From: Ard Biesheuvel Date: Thu, 29 Oct 2020 12:49:52 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] arm64: implement support for static call trampolines To: Peter Zijlstra X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201029_075006_439401_815D1C95 X-CRM114-Status: GOOD ( 19.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , Will Deacon , James Morse , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 29 Oct 2020 at 12:46, Peter Zijlstra wrote: > > On Thu, Oct 29, 2020 at 11:58:52AM +0100, Ard Biesheuvel wrote: > > On Thu, 29 Oct 2020 at 11:40, Peter Zijlstra wrote: > > > > Would it make things easier if your trampoline consisted of two complete > > > slots, between which you can flip? > > > > > > Something like: > > > > > > 0x00 B 0x24 / NOP > > > 0x04 < slot 1 > > > > .... > > > 0x20 > > > 0x24 < slot 2 > > > > .... > > > 0x40 > > > > > > Then each (20 byte) slot can contain any of the variants above and you > > > can write the unused slot without stop-machine. Then, when the unused > > > slot is populated, flip the initial instruction (like a static-branch), > > > issue synchronize_rcu_tasks() and flip to using the other slot for next > > > time. > > > > > > > Once we've populated a slot and activated it, we have to assume that > > it is live and we can no longer modify it freely. > > Urhm how so? Once you pass through synchronize_rcu_tasks() nobody should > still be using the old one. But doesn't that require some RCU foo in the static call wrapper itself? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel