Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2659257pxb; Tue, 13 Apr 2021 07:14:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJyCYtxOLXc60SGoLsN9BaAeqBpd4BAP2nq7EIaj6YWCrq1lRc1058l3KlR+b02PFV4PGr X-Received: by 2002:a17:906:a44b:: with SMTP id cb11mr14621502ejb.518.1618323288546; Tue, 13 Apr 2021 07:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618323288; cv=none; d=google.com; s=arc-20160816; b=yw0OuBK8sXt8r5mhHk6NfzEElzWbIdvwT4jXRXD3OwvSA48whKEj+L1lgyYxd+ZUAK 93Dvlel3kCQymjgPPxBTPKPD9gUodOEvwT0250Dm8lVX4t61Th4n3h96ouy++kVZ94Wo pjSOXI8f8ZX1CLLg/Dww5nadTPj5EhxCV7rrBgHWLSEjM6Eu9PmQs5De1CLcoZ4hj1L6 kTXpMIkPOB3n07bWg8O6HYG94CPhJ+WVd/jOn7sHb3YhBbltC5czb3dKPVMaHLdX4KzJ M2wTe6KsCiVifpNLgguVWHxuMDohHc9C8/hfaJAXNtHAKVq4boFrLOdwWxPsosgaXHFI mxqg== 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=eilsWJ436y5EpMfON6Wru7/wZHB3hyKVpK6txyWMaEk=; b=K73GJJml5QuNanKgfxi01ts3YjXx44rVGr2Z7doWiFELiX6WXbO/t2rdawpX30f8DB knhtXGMybzHcy8mjIIYFvId8cTr6ccA3vrmXYzip9V6sXCdAzvaSFVKKAbQGK2vzNCvR 5Vy0DlRcBCpvzlpP545HfskY9G7rbERWrBZAk1jrPwMwaLr61tRQx9jNatESX2MGChE2 dY25fLgCPaM4SpUBLmSYbEMy7K0dftDqr4kJiZpIzt8Smw4Fx7RPqCtlxj1BYJoxtcoe P23Sr3vEwkvbZCYHStggfx0YAvSmOnIlXWyLdvV9MzljhEAVl+08W2MdrPpuSdEReXX4 hU3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=U2AR7Zhs; 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 d14si10318605edy.9.2021.04.13.07.14.20; Tue, 13 Apr 2021 07:14:48 -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=U2AR7Zhs; 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 S245626AbhDMJYz (ORCPT + 99 others); Tue, 13 Apr 2021 05:24:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240373AbhDMJYx (ORCPT ); Tue, 13 Apr 2021 05:24:53 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8C58C06175F for ; Tue, 13 Apr 2021 02:24:32 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id x76so7403474ybe.5 for ; Tue, 13 Apr 2021 02:24:32 -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=eilsWJ436y5EpMfON6Wru7/wZHB3hyKVpK6txyWMaEk=; b=U2AR7ZhsvlKFUL9UAI2j57eVY4R8TZJ57Rex9pkWTeCtEVT6wD9V2k0XQiFOio+ZSl WrT9bj4HyAST2TmN2iAVLrOTZK1xBOqZCA1t5/p/RxgAzH67MfqXxLNxbORiqnzonhrl fhPj8199fGlyld+3rlYneaGjU5AjMFjytQJb30bI5INbjkWUc47dXI8kW2KWQF41qTfy pwanSzKipCKygspEAru7pzJTal7FO9htNYplaofaJjcyojbDR9BMuNIJYK1q/HOXrhmY +ISjULw85tVhgI7ErWMduza7zTsZE1MRAcGFiGaVUjUJBgl048aa02JgXlJI3R3fgxa1 adOA== 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=eilsWJ436y5EpMfON6Wru7/wZHB3hyKVpK6txyWMaEk=; b=hJU3HHlU3rexGlVcstdSdPeMJXJxvUlN0ykMOdxI8Tn7fthedG4HC7xGoAW6wvoErz Q5oz6dAsiXbZPYMesc/+ahMiMtMLkoNRiPyRwovhv+6gGcTKZ8FbXCQsLxz5AQGSQxPt V0nKVxV3yTcaCqGwWIGIgYxVh9ABIU/FfU2OtBnQS9Wu1H97idcz6K6+VJZtkRtbdzrL 1dIF1pXMHdS7HI58px9IjiFlVS+8BTqwNfqlQin1uWLlso0tPXS5DWzeIRxlmJTCTG0D VrE+MN9PAuRcqXvHUbuBy3XGwcxqcbv0+mLSDGY6LHCyu3bpVCBio2tvMiF/Bkh7TPPu hOFA== X-Gm-Message-State: AOAM530HKmoN1K4Al4yOWqW81wb26i5lGOpk5j0aes5fzvex4X+kBN+r m8eCMYSXxYIKRUvxim9muL2BwTXNXvY5D3DQ48khLA== X-Received: by 2002:a25:b906:: with SMTP id x6mr41172495ybj.504.1618305871573; Tue, 13 Apr 2021 02:24:31 -0700 (PDT) MIME-Version: 1.0 References: <20210412051445.GA47322@roeck-us.net> <78c858ba-a847-884f-80c3-cb1eb84d4113@roeck-us.net> In-Reply-To: From: Eric Dumazet Date: Tue, 13 Apr 2021 11:24:20 +0200 Message-ID: Subject: Re: Linux 5.12-rc7 To: Guenter Roeck Cc: Linus Torvalds , Xuan Zhuo , "Michael S. Tsirkin" , Linux Kernel Mailing List , Netdev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 10:05 PM Guenter Roeck wrote: > > On 4/12/21 10:38 AM, Eric Dumazet wrote: > [ ... ] > > > Yes, I think this is the real issue here. This smells like some memory > > corruption. > > > > In my traces, packet is correctly received in AF_PACKET queue. > > > > I have checked the skb is well formed. > > > > But the user space seems to never call poll() and recvmsg() on this > > af_packet socket. > > > > After sprinkling the kernel with debug messages: > > 424 00:01:33.674181 sendto(6, "E\0\1H\0\0\0\0@\21y\246\0\0\0\0\377\377\377\377\0D\0C\00148\346\1\1\6\0\246\336\333\v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0RT\0\ > 424 00:01:33.693873 close(6) = 0 > 424 00:01:33.694652 fcntl64(5, F_SETFD, FD_CLOEXEC) = 0 > 424 00:01:33.695213 clock_gettime64(CLOCK_MONOTONIC, 0x7be18a18) = -1 EFAULT (Bad address) > 424 00:01:33.695889 write(2, "udhcpc: clock_gettime(MONOTONIC) failed\n", 40) = -1 EFAULT (Bad address) > 424 00:01:33.697311 exit_group(1) = ? > 424 00:01:33.698346 +++ exited with 1 +++ > > I only see that after adding debug messages in the kernel, so I guess there must be > a heisenbug somehere. > > Anyway, indeed, I see (another kernel debug message): > > __do_sys_clock_gettime: Returning -EFAULT on address 0x7bacc9a8 > > So udhcpc doesn't even try to read the reply because it crashes after sendto() > when trying to read the current time. Unless I am missing something, that means > that the problem happens somewhere on the send side. > > To make things even more interesting, it looks like the failing system call > isn't always clock_gettime(). > > Guenter I think GRO fast path has never worked on SUPERH. Probably SUPERH has never used a fast NIC (10Gbit+) The following hack fixes the issue. diff --git a/net/core/dev.c b/net/core/dev.c index af8c1ea040b9364b076e2d72f04dc3de2d7e2f11..91ba89a645ff91d4cd4f3d8dc8a009bcb67da344 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5916,13 +5916,16 @@ static struct list_head *gro_list_prepare(struct napi_struct *napi, static void skb_gro_reset_offset(struct sk_buff *skb) { +#if !defined(CONFIG_SUPERH) const struct skb_shared_info *pinfo = skb_shinfo(skb); const skb_frag_t *frag0 = &pinfo->frags[0]; +#endif NAPI_GRO_CB(skb)->data_offset = 0; NAPI_GRO_CB(skb)->frag0 = NULL; NAPI_GRO_CB(skb)->frag0_len = 0; +#if !defined(CONFIG_SUPERH) if (!skb_headlen(skb) && pinfo->nr_frags && !PageHighMem(skb_frag_page(frag0))) { NAPI_GRO_CB(skb)->frag0 = skb_frag_address(frag0); @@ -5930,6 +5933,7 @@ static void skb_gro_reset_offset(struct sk_buff *skb) skb_frag_size(frag0), skb->end - skb->tail); } +#endif } static void gro_pull_from_frag0(struct sk_buff *skb, int grow)