Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4056980ybc; Thu, 14 Nov 2019 20:44:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwi0Wa9K8kkmJzBQoNDAjY9/AanFkZLLkYJ9VLE/V/+pC0s8MZlJAwMITk8Rfh4E03llHy5 X-Received: by 2002:a17:906:4e94:: with SMTP id v20mr11116708eju.34.1573793056600; Thu, 14 Nov 2019 20:44:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573793056; cv=none; d=google.com; s=arc-20160816; b=DUOQzY6phayv2cwFhPsujkAPqNGXVUT4+aTCYoCqdoj8DJaMxZdvj6Is0lIBrs+/0R iABWNN/C5ymk8GEIM5XFQnuPCiXqpXrKog/2mlj6uB7zG5JkjH8ZLrgw5Mpphxxl/jCs 6zlUWNdUDmohzbdyt4CKLm2rCm0GK7iZNEbj8MYj1za5Fd2/X+9R+VYFukLujqVRFSp7 XSZ1HI9CkoH8FzN7c0caH4VvcFu4HNpsGQZG6RWAh2I++d6X6ponz2rtNcMO7uDMkU0c Y77/HiP8ydohw5c1/1JURXag7CK8E3jHfS0W6QlgKAP2mByfZEA2D2vpXL5nR9uqWW7r JzZQ== 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=p+SIzIMCTJPiXl7bTmDp+UdDQJRFs5K/ZHAlARayxLs=; b=yNDZqvyLnZqEakHYnySdr5MBx+/9rEj3hg4GcZ3y5sGjRr52BCsMxGEUqgD2J0CPGy +FfQ9kaL3ETj79ncF9lfvKBfH/K6EtuzynlPJZY/vyOSvj9NC+lSVfU3lFsEQ0JkKBap b+zmArfKbWdNLtNC63onFug8TNH8VIp7eI9XW+4KlSMLZrZZlrCJInqu/Hllix1gJETS qQoviTCahVzYKysfjAqZ1b44WoXh7tK3eQ7juxgjYuwiEf348QApVaEqOigO7/QOGBS4 s0LTqZAP1xeRns6KtD6m5TED0APHKVwq81wkIWARzAwEorh1mc/gAs7Xpt4s3R9Djo/v oOUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KGrd5zOZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c44si5430367ede.398.2019.11.14.20.43.51; Thu, 14 Nov 2019 20:44:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KGrd5zOZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727093AbfKOEmf (ORCPT + 99 others); Thu, 14 Nov 2019 23:42:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:52390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726985AbfKOEmf (ORCPT ); Thu, 14 Nov 2019 23:42:35 -0500 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 842122072E; Fri, 15 Nov 2019 04:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573792954; bh=g3rlB32/6gd8dD5fY3MmF2bhvO5L4Q8Y+YT4GjFr3wQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KGrd5zOZNBxWzcSvrPXyvSbFC3vxoGQoxybEK02Kveb4aW4JhvHNhVZ8hWxpFpRsY nMc+/3ukHPjrlhfLtZM4uxDLglMA/kI06ihg4EoH25/6ElqmesHF4JwyKppZ1mic7B H4tNC+rKqauChwU3xSHJPphJwawp0FskLwe2C62Q= Received: by mail-qv1-f46.google.com with SMTP id i3so3335053qvv.7; Thu, 14 Nov 2019 20:42:34 -0800 (PST) X-Gm-Message-State: APjAAAVVZ8sgkdg/IHsDuT1D/oFnje4MZeGr8St0SBSyZZjKLXPrhFs8 A/Yd9CfowdKapZzj/FwRfPkKjJO6WT+b5crpWBs= X-Received: by 2002:ad4:462d:: with SMTP id x13mr11789533qvv.105.1573792953648; Thu, 14 Nov 2019 20:42:33 -0800 (PST) MIME-Version: 1.0 References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-46-linux@rasmusvillemoes.dk> In-Reply-To: <20191108130123.6839-46-linux@rasmusvillemoes.dk> From: Timur Tabi Date: Thu, 14 Nov 2019 22:41:55 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 45/47] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K To: Rasmus Villemoes Cc: Qiang Zhao , Li Yang , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , lkml , Scott Wood , netdev 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 Fri, Nov 8, 2019 at 7:04 AM Rasmus Villemoes wrote: > diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c > index 8d13586bb774..f029eaa7cfc0 100644 > --- a/drivers/net/wan/fsl_ucc_hdlc.c > +++ b/drivers/net/wan/fsl_ucc_hdlc.c > @@ -245,6 +245,11 @@ static int uhdlc_init(struct ucc_hdlc_private *priv) > ret = -ENOMEM; > goto free_riptr; > } > + if (riptr != (u16)riptr || tiptr != (u16)tiptr) { "riptr/tiptr > U16_MAX" is clearer.