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=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 B4A96C4360F for ; Thu, 4 Apr 2019 19:35:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CBA52075E for ; Thu, 4 Apr 2019 19:35:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="yc3RYnGX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730368AbfDDTfk (ORCPT ); Thu, 4 Apr 2019 15:35:40 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37286 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730270AbfDDTfk (ORCPT ); Thu, 4 Apr 2019 15:35:40 -0400 Received: by mail-pg1-f194.google.com with SMTP id e6so1726163pgc.4 for ; Thu, 04 Apr 2019 12:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hpFyYSegsR0ReYOZ5mEGU7Z/lco1FGO4TDqU96iOI2g=; b=yc3RYnGXt44676sFbXZY2mNHNWUHSb0nhZe0YXwjCVzglCqzC4s75N8Kt53euQwLcm 24z21MJ+NMdCsaFlPPSjoVRB6jMmNrZddGf2h7+03cTFx1vNUE7HGyi6pGSONuh8fRPc toHS+dPStjG9zOhMgkal0b97eyvaIhZf+/zI83dqHGMzrk3952RcHwH6IMP/8kabc2JR k0oAhwPYd5UchC5xRaGXFxsRt4Zf8y4HKhKDzW7VWHQ725MnZecLyH9pDpyDhcXKYy58 I7Qm2ZzHQz6Bxx1CT4XyMz+rDO98OSEo9Z+2ynoP7M6WTVFf11Ivuor7uKsDHpIGJG2Y 0Pow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hpFyYSegsR0ReYOZ5mEGU7Z/lco1FGO4TDqU96iOI2g=; b=OC69AlJ7MihqO7DTtzBSIKmkkM+IbycDfCM0DR2DdS1ukyyAsyS97CtUlS29MaIF59 S6Fm6UzrIKPgMz/ux4NzhAv5FlXOnJNAJFwUA8HxReSqvwBLxPHbJfALTjsgIZejdkks sW0GDqX317ypZJkxlcq8F+ODTLWFEB4hmDxLCNicHnJ8248HYZR5EAtvJjulJvs18J8e ag//uNBu21x7SMknOYvxPFT4ylVopbxzAo0ZYgcLF5FrU9TF/mqTUrMVNv9bDzveLRfQ pHjVGg+JRwgXn1f8h6KLAYaMvSPj6L7ZPqF85J7+rW11pEUi6we8SXUqJBkcpb1ZBDI+ E/NQ== X-Gm-Message-State: APjAAAVfUykx5mlWEUBHZ7unoDOGxpJfrzWuZc9sV6vovH3yGhqriwpp 3Ge8/MEw+66EFExIBhb4K5lQ3H2liko= X-Google-Smtp-Source: APXvYqxRVw6Ip7u0rijudliyWTHuW0SPLuqpfIYNUD1VyR33u75AgviHx2vDiLq//tYTi8W0t5HD7Q== X-Received: by 2002:a63:cc0d:: with SMTP id x13mr7837233pgf.280.1554406538877; Thu, 04 Apr 2019 12:35:38 -0700 (PDT) Received: from shemminger-XPS-13-9360 ([167.220.60.23]) by smtp.gmail.com with ESMTPSA id y37sm30094975pgk.78.2019.04.04.12.35.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2019 12:35:38 -0700 (PDT) Date: Thu, 4 Apr 2019 12:35:36 -0700 From: Stephen Hemminger To: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= Cc: David Miller , netdev@vger.kernel.org, cake@lists.bufferbloat.net Subject: Re: [PATCH net 2/2] sch_cake: Make sure we can write the IP header before changing DSCP bits Message-ID: <20190404123536.3c966937@shemminger-XPS-13-9360> In-Reply-To: <155438289374.18760.4278774647362746152.stgit@alrua-x1> References: <155438289359.18760.18027832614176337074.stgit@alrua-x1> <155438289374.18760.4278774647362746152.stgit@alrua-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 04 Apr 2019 15:01:33 +0200 Toke H=C3=B8iland-J=C3=B8rgensen wrote: > static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash) > { > + int wlen =3D skb_network_offset(skb); In theory this could be negative, you should handle that? Rather than calling may_pull() with a huge unsigned value.