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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 8B958C432C3 for ; Fri, 15 Nov 2019 04:42:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C8932072B for ; Fri, 15 Nov 2019 04:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573792956; bh=g3rlB32/6gd8dD5fY3MmF2bhvO5L4Q8Y+YT4GjFr3wQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=WD1DvJBynetAH2+FT5nI81/SDw8pzrmJ975Z+3jhBOB3kiss+hDv6wm+kqzZJtllW xo73zzYMupvt0ZEYF+Zuqmkw+1mNMvJ0sHhg4l316zmW/ayCBO3S4Znxkndxdw9a/f yE9XONZTZPsEiipc/i8TE7rwrcMEvY3fgEADcXgw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727128AbfKOEmf (ORCPT ); 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-Google-Smtp-Source: APXvYqzhjv5G4OmRuommd+stX/u8tXaIf+kgtocwlFijjGY3iPO27FpXOJ5UgCEDdEl/zBvDultfDqkQncbaw+8Q4dM= 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. 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=-3.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 550E8C43215 for ; Fri, 15 Nov 2019 04:44:38 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A839206E6 for ; Fri, 15 Nov 2019 04:44:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="KGrd5zOZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A839206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47Dm3Q2rLYzF7lj for ; Fri, 15 Nov 2019 15:44:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=timur@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="KGrd5zOZ"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47Dm1939NpzF4HS for ; Fri, 15 Nov 2019 15:42:36 +1100 (AEDT) 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 85FFB20730 for ; 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 s18so3344461qvr.4 for ; Thu, 14 Nov 2019 20:42:34 -0800 (PST) X-Gm-Message-State: APjAAAUUAs4VmHKArylf60RvPCVTGA3iv+Zg1zM4+K2HEjs4bqRa8Req s4ofVD51l7WNjde/ZKSFCTNPa88s59LS3lDikiM= X-Google-Smtp-Source: APXvYqzhjv5G4OmRuommd+stX/u8tXaIf+kgtocwlFijjGY3iPO27FpXOJ5UgCEDdEl/zBvDultfDqkQncbaw+8Q4dM= 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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev , lkml , Li Yang , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Qiang Zhao Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 73E33C43141 for ; Fri, 15 Nov 2019 04:42:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B64A206E6 for ; Fri, 15 Nov 2019 04:42:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fiJgS9mV"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="KGrd5zOZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B64A206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4MCVLbM8dGa4sDFAnXJHLa1O7fIVhtLzPAU3z1nbY7M=; b=fiJgS9mVe99FpE PgbCidJ9qN2h9AKLZCXUqbHqtByj8RfXrw2DbxRnQoGfb8iiVQSAd47peTjgw/D2AwNSHsgpi5xaG 2KH7qccaQ77tbqRr3hA3E1au334co7T5LFSl1M/OZLn8R+v2wQsJ6LPzaFpp5zEGJLreUEqtBvJz+ ziD5D8dvYlvtYTEMDrxhmcjGJKcnbWUMzacxRaUHf6z5sEG7OkURJ1gVVopqWOYMz7JkIwdO7pgRH fm48vuU8mMyT5rR0vqQT0u8A9bjKjGvDQi+TtYhL1XKRZyjpQxdFUtbnZK5PkhvWdQaipxXlPVOAd SbO+LXP5ewduIdANQbnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVTRN-0003M2-JX; Fri, 15 Nov 2019 04:42:37 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVTRL-0003Ld-2V for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2019 04:42:36 +0000 Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (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 8252B2072B for ; 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-f41.google.com with SMTP id y18so3335799qve.2 for ; Thu, 14 Nov 2019 20:42:34 -0800 (PST) X-Gm-Message-State: APjAAAWsBSMBX61ZEJRdkB7Zxfjh8DjTLCOGW2ZmLKsh8JVePY0S5cDz 0lsXyyLedyZp/Yo3hv3Vgyca/n/oE83voClMzjE= X-Google-Smtp-Source: APXvYqzhjv5G4OmRuommd+stX/u8tXaIf+kgtocwlFijjGY3iPO27FpXOJ5UgCEDdEl/zBvDultfDqkQncbaw+8Q4dM= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191114_204235_134522_A70F40A1 X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , netdev , lkml , Li Yang , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Qiang Zhao Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel