Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2248522ybg; Thu, 30 Jul 2020 14:36:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHALZhz+hf1OlxLclJlt8xItq7Qsf8FI6DlRslswkUFCfTYmF8GDz2yeseNqWBe6QhWZ3T X-Received: by 2002:a05:6402:1ad1:: with SMTP id ba17mr960235edb.119.1596144979244; Thu, 30 Jul 2020 14:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596144979; cv=none; d=google.com; s=arc-20160816; b=IBwdNCw0/Qxy7lHJ+hCsIeApNW2hfJAp6OySs1TMCZJyypRrhxDF/z3Z2f0gEi4paI ItwcsdLK+IxWDiClHsZ4YRwL79J79kKyp5RnirPDMgWEtarlnl1L/pNwD3RPsLwlMQCe RtRJD5RQ5HkZ6dwW0sjq22aOlpA8k7EAt+DIZTyuqoT9KaLx+czzMPtRRfxIKGCjsrQy 5L7Bellx/xBsDaJLXzxnS9lKHgTITdcZ770xAQCRoe3P6YEH76TZgeRP+saRDOKoXOwd IC6ZGB0GO5iapige89Rgg6W0BryflFfmMRhfQz6F6/I8SlK3Tx+CVD5MfaLFF95zzNSG xH7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AQBbAhFTyBSrglcyNo0R7cwbXKSUj5Es+XVNm5PBn+w=; b=hwyxkGFzE+a40l/bqhVHlhL53fkknH7l05MiG2raDlnYhfAnekWvWXjnQbf1IXrUTH mwjNR5nrvEYRoB2stoKy8y6hALDj4U4ljn69ZbzoqrIuhazxMo2wvOHcYz0CK855cCdK n7zicLkrpXA5e02IUuRz3nI0CB8VK7ZFsURL8l8nIjATSYLUPy/3kDCPUcA17VzYvPYW Un/VOMkrbfzBSTBJPuo7lMnnUMOihqbgA//5B2XsnHZD8FvfFmbRKDUB0axMreBcmNlw sHP/5gIvhakTNbaOoqZBrZ1NKfFSYcVgyfMj4U4eVvyTZOhL3O5EiRsNN1HVgAtPbzFv xj2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=I5BbvQHZ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gq9si3969009ejb.442.2020.07.30.14.35.55; Thu, 30 Jul 2020 14:36:19 -0700 (PDT) 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=@google.com header.s=20161025 header.b=I5BbvQHZ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730679AbgG3Vc7 (ORCPT + 99 others); Thu, 30 Jul 2020 17:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730475AbgG3Vc6 (ORCPT ); Thu, 30 Jul 2020 17:32:58 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97F3CC061574 for ; Thu, 30 Jul 2020 14:32:58 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id x1so3414271ilp.7 for ; Thu, 30 Jul 2020 14:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AQBbAhFTyBSrglcyNo0R7cwbXKSUj5Es+XVNm5PBn+w=; b=I5BbvQHZRCGgbwSbkoJDzhF2+3xJSObl+3hFU/aKQf0HRevEdTPx2z0jGNmew6s+lH oOwOl9wRp1sJ+oFtkQGcHuRgz74UI8DafbN2+GEFlsJM3ETdWD2JhvQVDZbjQSmPM8EP vW216DgXZItCOOVVlTflnezjxp9r8rKuxRwwLVS/Yb70mRyZo40sp36+CJgq87jCaSrI k1a4Yrr4f6CgwjeecuBYrKrOeQ0llv+htoH4L1/ZrYq6SPKqYB/alip4j9Xrr8P5zpxV v1kDctMS/+EHmW+0UnGbs9blrHbIVYK5Vos+p38MmxEXY8vSQZe6D0acc2kEU0BTziQg GYqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AQBbAhFTyBSrglcyNo0R7cwbXKSUj5Es+XVNm5PBn+w=; b=kYIQ5W5CQtjro+yXXmgQ6LzP2f4kHMiHhDM5W+5Zux/2rQhVd4PAwP/gyDnUSPY9CJ TEP89OhssM5O8J5/aFWme798ybVp8OLjXSNKzATNJc9sZWJNunSu03vntwlrP/nbc6mY MLxbP9fAiyj9W3NPFegYfPKprPQaCIH58M2pB2GncEDZriJdDpfRZdg3CjYzUplMJNFp TE9BNxgMX6znpKPHphW+QdGsRFG5+wmVxHhr043+PBIE/e6d/NhKPtZhMGXrljJJ1Uws OS6mPKbAyKX2O2Pn0DVCGU/izO0ZNjccmaPsgFCHkhzybp3byqsAlfvex3EGCQ6pLBsM KkRQ== X-Gm-Message-State: AOAM533/xQXCJw14dCFDFcjg7By1EXGgchrnJ6SYl4K1uhDBrJ+0rCcY i8lFAFsmhvVrrLx/9qmX/Owmb9frdAQDGqv8I4O8CQ== X-Received: by 2002:a92:c608:: with SMTP id p8mr581749ilm.137.1596144777742; Thu, 30 Jul 2020 14:32:57 -0700 (PDT) MIME-Version: 1.0 References: <20200730210728.2051-1-f.fainelli@gmail.com> <2347a342-f0b0-903c-ebb6-6e95eb664864@gmail.com> In-Reply-To: <2347a342-f0b0-903c-ebb6-6e95eb664864@gmail.com> From: Eric Dumazet Date: Thu, 30 Jul 2020 14:32:46 -0700 Message-ID: Subject: Re: [PATCH net] tcp: Export tcp_write_queue_purge() To: Florian Fainelli Cc: netdev , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 2:24 PM Florian Fainelli wrote: > > On 7/30/20 2:16 PM, Eric Dumazet wrote: > > On Thu, Jul 30, 2020 at 2:07 PM Florian Fainelli wrote: > >> > >> After tcp_write_queue_purge() got uninlined with commit ac3f09ba3e49 > >> ("tcp: uninline tcp_write_queue_purge()"), it became no longer possible > >> to reference this symbol from kernel modules. > >> > >> Fixes: ac3f09ba3e49 ("tcp: uninline tcp_write_queue_purge()") > >> Signed-off-by: Florian Fainelli > >> --- > >> net/ipv4/tcp.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > >> index 6f0caf9a866d..ea9d296a8380 100644 > >> --- a/net/ipv4/tcp.c > >> +++ b/net/ipv4/tcp.c > >> @@ -2626,6 +2626,7 @@ void tcp_write_queue_purge(struct sock *sk) > >> tcp_sk(sk)->packets_out = 0; > >> inet_csk(sk)->icsk_backoff = 0; > >> } > >> +EXPORT_SYMBOL(tcp_write_queue_purge); > >> > >> int tcp_disconnect(struct sock *sk, int flags) > >> { > >> -- > >> 2.17.1 > >> > > > > Hmmm.... which module would need this exactly ? > > None in tree unfortunately, and I doubt it would be published one day. > For consistency one could argue that given it used to be accessible, and > other symbols within net/ipv4/tcp.c are also exported, so this should > one be. Not going to hold that line of argumentation more than in this > email, if you object to it, that would be completely fine with me. :) > > > > > How come it took 3 years to discover this issue ? > > We just upgraded our downstream kernel from 4.9 to 5.4 and this is why > it took so long. It is not because TCP used an inline function in the past that it means we have to keep the equivalent function available for all possible out-of-tree modules. Sorry, we can not accept that out-of-tree modules use TCP stack like that. You will have to carry this change locally. Or even better get rid of it.