Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp590063rwi; Wed, 2 Nov 2022 15:52:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FkW55LYUTQjqxT+pL1GKYar5HZnqPJGErdvs0nB+xocv41ftvaedTten+XMwwJwHi5eUf X-Received: by 2002:a63:2c90:0:b0:439:ee2c:ab2f with SMTP id s138-20020a632c90000000b00439ee2cab2fmr24689531pgs.2.1667429545093; Wed, 02 Nov 2022 15:52:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667429545; cv=none; d=google.com; s=arc-20160816; b=g7dgb4f/JQgnlYMrriSQeTOekJFgTZ9LutLpzTS/n++CT4fzcIkW4QaNy2rNphs8lD FF+NjpbKpW3Zm3CmSJpvondWZkyd4ZAzxWPseZMxZVTY0nUGc5NQX+xEobMm+1hK9d9V pq08oCLZJW6iaK5rw2AlrZyoF7WMzul3uyczudJlrRTOBTZjPddjKNCrH+ijXRH1uSMU +5uN04Zgut+gFO7iqnS/JdioIvWjy8/KEZn/SDrucC5He4QNLsQ1xnR56mFr9xq9LIKK Yoh99jIxoqMhv6Z4ArQWyH+ud12Vu34a7lN7u60Syyvh4XnUIHXAjHc5Ken6m416kQbH erkA== 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=3EwqQdy31sqBkxYtqTdrt4QtPfV/deRLFG8225Ldd98=; b=ymFfcX5G2UKTCsXBpq5V/SbGTaz4zNtcbgaYOOZyjV+wojk5r1ensSeCXBKev/83do 5GS2ID3UlaU3aGxY9+J+ScFrDK7j0yHl47naQvemiVQuBf8TSpWpawLOx6Jb3tFSqyWn aQ850lkFUAJQZ66lDHNmi+M+G5MjgDVXfhoT3NWrc4+OWB7x5rNDgtUf1c59ay24BD5w pb007NzqiHe52ohFffDhsotKaJUowg0sE3BJaCrbUTPKI+PwANk5alHNGmtbgJGHJNev hzQIAIhY5ab/Wyiq3hPAtCPvil7WYQfMuPUT0PyUI1uHapRRjc4wr6vzglncbV2dav2X T3Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=UZf0joM4; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 3-20020a630603000000b0046a1c6484f9si18320629pgg.218.2022.11.02.15.52.12; Wed, 02 Nov 2022 15:52:25 -0700 (PDT) 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=@google.com header.s=20210112 header.b=UZf0joM4; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbiKBVx5 (ORCPT + 97 others); Wed, 2 Nov 2022 17:53:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiKBVxz (ORCPT ); Wed, 2 Nov 2022 17:53:55 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14DE8636D for ; Wed, 2 Nov 2022 14:53:54 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id n130so153793yba.10 for ; Wed, 02 Nov 2022 14:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3EwqQdy31sqBkxYtqTdrt4QtPfV/deRLFG8225Ldd98=; b=UZf0joM4l549onip8pFdW8OQgY6aZiYaKkEt4TgxX+IBBaQBpQ5KUQnNlv1iGJpn7R NFBoW3we16LE5CJa/rZsAT3XtuSi05dKvw2VkVSX9B4dWS/G8jSsobKTP0ZL0nCwoI/a gSy4Lrf/1fAH2y94u89/5CQU8GT/Acl3mGow3Bdum1mxKsUzkxrCitC8XJLyJWTzsqdv eFIqOK5fpC9n5xMwlgkwvrN9vT1Ke8OSvOquY7n1/qoNdeAS3KEpSQxYHFl0xhZlIgpP lAl4WYlhkZMmD1XoDIFgwpuPFL5fna+vTI3Jn2YOnuuK5zs/jRVw/lwxxY5Cz1phPPwv F+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3EwqQdy31sqBkxYtqTdrt4QtPfV/deRLFG8225Ldd98=; b=5NsCG8AVGCrHuBmV7oPx7BQ0tt7UQMiEK9m0/XIykP9fdp6wtSukvAW4ID4TwLnXED 0aHHfIEehfwVidZ3nxMm9gywSaQxJ0LV72VZSAORCVPUl99LYO5kmdQSjocXxPhFhToR 617iGtogQdTdvI6OsylJ+Mv5YucIN1eNRdsLzIIvVKjmYME0Fgy7cXQBqabQ82qT/mdQ 6klw+OMvJ0sc8UlqPzv5UHAHIsPYmUV4X09qAM53+o0tvKap8XzV7Kj3PQUrVkyBD6AV +Jrz+8KAmg1j7q02gayaoFjnsb+VNxmit/gacEezNvCBnvZS+ZgAZzBnkl8eaYifjxl5 1/Eg== X-Gm-Message-State: ACrzQf0kmo1269GWDSp+f7aoMYLG2MfJxUF+lkQ6FUKmCxjE8ifOoYoj QLPvdBfXCI5vzGfkBCZh9hbWFxH8N0jdvxWqg8J7Yg== X-Received: by 2002:a25:3187:0:b0:6c1:822b:eab1 with SMTP id x129-20020a253187000000b006c1822beab1mr24647957ybx.427.1667426033028; Wed, 02 Nov 2022 14:53:53 -0700 (PDT) MIME-Version: 1.0 References: <20221102211350.625011-1-dima@arista.com> <20221102211350.625011-3-dima@arista.com> <483848f5-8807-fd97-babc-44740db96db4@arista.com> In-Reply-To: From: Eric Dumazet Date: Wed, 2 Nov 2022 14:53:42 -0700 Message-ID: Subject: Re: [PATCH 2/2] net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction To: Dmitry Safonov Cc: linux-kernel@vger.kernel.org, David Ahern , Bob Gilligan , "David S. Miller" , Dmitry Safonov <0x7f454c46@gmail.com>, Francesco Ruggeri , Hideaki YOSHIFUJI , Jakub Kicinski , Paolo Abeni , Salam Noureddine , netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 On Wed, Nov 2, 2022 at 2:49 PM Eric Dumazet wrote: > > Are you sure ? > > static_branch_inc() is what we want here, it is a nice wrapper around > the correct internal details, > and ultimately boils to an atomic_inc(). It is safe for all contexts. > > But if/when jump labels get refcount_t one day, we will not have to > change TCP stack because > it made some implementation assumptions. Oh, I think I understand this better now. Please provide a helper like static inline void static_key_fast_inc(struct static_key *key) { atomic_inc(&key->enabled); } Something like that.