Message ID | 20221021191340.4187935-1-elder@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp863643wrr; Fri, 21 Oct 2022 12:16:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7K8FNDFUbWDW7e5AIs3pSwCbjMR3PKZ5Ntsi/hKXXN169YF3AMsvvAHQ6IuLTpVkyheqa9 X-Received: by 2002:a17:906:fc6:b0:72f:d080:416 with SMTP id c6-20020a1709060fc600b0072fd0800416mr17111560ejk.1.1666379813197; Fri, 21 Oct 2022 12:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666379813; cv=none; d=google.com; s=arc-20160816; b=H1woF+Ica6k9v59FQS2EVKDJTFQQH1yc/J/rrkiSJBAcc2W1p/QMiCdd/0EdDaRnxT YUqhmjJu3PDiRWPdZbxDxyWIzJ619gNm8o/TZCffIbWT/ao69T7IFi1WGbevnkJbXXLM nlyYbjjw69bZVwR8gKb5uapreJ0yZFwldGKdPFmULVV1EOtU1/jnKEafTh9wtbYLLAsW qWWJ5FMmcxXq4i9iNJg5YYTxGVSGnYnmZ+nrToQQuNh+Bwe1RzPaiu+7OsOgFrVDCu08 vdPYQXoTAVu6bqQ2Oe/VQg7uEiYfiOu4GlTKsA2P9CUjTaj3Vy96rqJ1InFyxP79nfpq aYPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3i+Pa4J8bcK4+v/ZgymWwGim+h5u0D8ub/WCEgMRWbs=; b=yO/3MMkOMVwD3OkBJhV5BHKa9RchbigqMXhYT9aXBtlkXNWxI53JS0kzYulaqkZZiP TwBKoBOi/E6ohkqTgXdJyZ4fPBpKJwIileIP8Xc1wWyteaCoe7ojRjxwElNsOyEBEpwN 30RD+VWPJ5W55cFQQhNaeoMb0tADjfbsygaht/02txJaaD7+BUJX3IkjSaVqQH8oNOIG LOZnf31Gw32KkXvo0heDfB/p+3xm9a4xMVw4DSIr8nUx9z+U2z4AThcIUDwbF1F1iTae fj3iQSKBFLKrIys/n+bARDjntAYhcD+CbZHov9mGTTtIjwhmMbdLqOLVOCBE62EwMwAA v6fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QQ6cVsAL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg11-20020a170907320b00b0078dfdaa3fd3si20577059ejb.935.2022.10.21.12.16.27; Fri, 21 Oct 2022 12:16:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QQ6cVsAL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbiJUTNt (ORCPT <rfc822;mntrajkot1@gmail.com> + 99 others); Fri, 21 Oct 2022 15:13:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiJUTNq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Oct 2022 15:13:46 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 509B315A8D3 for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 12:13:45 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id n73so3090062iod.13 for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 12:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3i+Pa4J8bcK4+v/ZgymWwGim+h5u0D8ub/WCEgMRWbs=; b=QQ6cVsALVD1ZESHIkBeya46B5Mdalbmf/0qaiyDp1Az+go8Ycxao0O8cZ/g4Fp5Nud Z94Wo+WKnBW2aK5T9TexSRJuG8PXvgwfZLzQeym4Q9kpR3d9KeNuw+FD3XdG0ci7K33U RFBK0Zl+UAqrbldAGAYIgH5jP5TI6w25m5iKOmjNFicamnrhLBYbRDPwwdCPqyOL9QDE zhA9gWowntH1kYECvtPKHOT7+SGVomqzIKad5D2J+Nc3FNk4QHR1hPR8qq3yDPIAqxRm RGHWtfgSlhZfpoN0b2OxQP8kuGNAL/tzzur1nHBIJpEr0ms4PVKSyag2CWDKVgWDW07H eEAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3i+Pa4J8bcK4+v/ZgymWwGim+h5u0D8ub/WCEgMRWbs=; b=VuQYQGzlnK/c5KjzZjrsLEZZ0PDYoZEK2rTPRRR2Pi1WCpd+enSW9XeuDE1vcH7h16 2fa3NFcwgnT2xS1LRTHOhTQFRr1lYlLscESwp4KOLpdnSNE0bdvkYUXcXlMO9+wKyjI6 Ql/2UbRBy4l7TsLV25TIpIts/IMx0tsntFDNwKffd0TPt52dpW90P095/hbrRHhgHHc4 xKjvVZBIgtQoOTruj19ZdR7/A59NPWq4HWHTlosm0tJBFHCkKygSBbNEm7BLoT/V9fiH B+9GhPZlB45JwuzXNzZAfAS2sBXBS2wAsPfbZoi7Rp3zPIGhs6VeqFuAqg4PHr4FOJQG X66Q== X-Gm-Message-State: ACrzQf3l3NaN2WdFp5U1GrkN7eXFBf756DBMiAys/RKIULplYsGTN3Tk GJxrGH+EmQQXcll1yk2pmC2b1A== X-Received: by 2002:a6b:4a01:0:b0:6bc:d4ae:321c with SMTP id w1-20020a6b4a01000000b006bcd4ae321cmr14889741iob.59.1666379624609; Fri, 21 Oct 2022 12:13:44 -0700 (PDT) Received: from presto.localdomain ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id e3-20020a022103000000b00363c68aa348sm4439362jaa.72.2022.10.21.12.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 12:13:43 -0700 (PDT) From: Alex Elder <elder@linaro.org> To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mka@chromium.org, evgreen@chromium.org, andersson@kernel.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 0/7] net: ipa: validation cleanup Date: Fri, 21 Oct 2022 14:13:33 -0500 Message-Id: <20221021191340.4187935-1-elder@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747325878922933784?= X-GMAIL-MSGID: =?utf-8?q?1747325878922933784?= |
Series |
net: ipa: validation cleanup
|
|
Message
Alex Elder
Oct. 21, 2022, 7:13 p.m. UTC
This series gathers a set of IPA driver cleanups, mostly involving code that ensures certain things are known to be correct *early* (either at build or initializatin time), so they can be assumed good during normal operation. The first removes three constant symbols, by making a (reasonable) assumption that a routing table consists of entries for the modem followed by entries for the AP, with no unused entries between them. The second removes two checks that are redundant (they verify the sizes of two memory regions are in range, which will have been done earlier for all regions). The third adds some new checks to routing and filter tables that can be done at "init time" (without requiring any access to IPA hardware). The fourth moves a check that routing and filter table addresses can be encoded within certain IPA immediate commands, so it's performed earlier; the checks can be done without touching IPA hardware. The fifth moves some other command-related checks earlier, for the same reason. The sixth removes the definition ipa_table_valid(), because what it does has become redundant. Finally, the last patch moves two more validation calls so they're done very early in the probe process. This will be required by some upcoming patches, which will record the size of the routing and filter tables at this time so they're available for subsequent initialization. -Alex Alex Elder (7): net: ipa: kill two constant symbols net: ipa: remove two memory region checks net: ipa: validate IPA table memory earlier net: ipa: verify table sizes fit in commands early net: ipa: introduce ipa_cmd_init() net: ipa: kill ipa_table_valid() net: ipa: check table memory regions earlier drivers/net/ipa/ipa_cmd.c | 53 ++++-------- drivers/net/ipa/ipa_cmd.h | 16 +++- drivers/net/ipa/ipa_mem.c | 14 ++-- drivers/net/ipa/ipa_table.c | 162 +++++++++++++++++++++--------------- drivers/net/ipa/ipa_table.h | 15 ++-- 5 files changed, 138 insertions(+), 122 deletions(-)
Comments
Hello: This series was applied to netdev/net-next.git (master) by Paolo Abeni <pabeni@redhat.com>: On Fri, 21 Oct 2022 14:13:33 -0500 you wrote: > This series gathers a set of IPA driver cleanups, mostly involving > code that ensures certain things are known to be correct *early* > (either at build or initializatin time), so they can be assumed good > during normal operation. > > The first removes three constant symbols, by making a (reasonable) > assumption that a routing table consists of entries for the modem > followed by entries for the AP, with no unused entries between them. > > [...] Here is the summary with links: - [net-next,1/7] net: ipa: kill two constant symbols https://git.kernel.org/netdev/net-next/c/fb4014ac76b8 - [net-next,2/7] net: ipa: remove two memory region checks https://git.kernel.org/netdev/net-next/c/2554322b3199 - [net-next,3/7] net: ipa: validate IPA table memory earlier https://git.kernel.org/netdev/net-next/c/cf13919654d5 - [net-next,4/7] net: ipa: verify table sizes fit in commands early https://git.kernel.org/netdev/net-next/c/5444b0ea9915 - [net-next,5/7] net: ipa: introduce ipa_cmd_init() https://git.kernel.org/netdev/net-next/c/7fd10a2aca6a - [net-next,6/7] net: ipa: kill ipa_table_valid() https://git.kernel.org/netdev/net-next/c/39ad815244ac - [net-next,7/7] net: ipa: check table memory regions earlier https://git.kernel.org/netdev/net-next/c/73da9cac517c You are awesome, thank you!