Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6414388rwi; Tue, 18 Oct 2022 12:05:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5zF4EY5ygyFdVI9AGRJ7/ksAfpX7PADrAwGH1WbL9vfYIIOPGmPjq/WZpzYOriqAmPcdcL X-Received: by 2002:a17:906:7308:b0:78e:191e:8389 with SMTP id di8-20020a170906730800b0078e191e8389mr3612390ejc.170.1666119911855; Tue, 18 Oct 2022 12:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666119911; cv=none; d=google.com; s=arc-20160816; b=Vm5IIRvIfxJUWWkEQ+Z1/H48tzyjkFWOeb9h2Ji6pAij3Z7YofxCl6Ok/rAmSc5ptB TjPDRF33LQIFmjniFC95JHXpOAueWunoDPC6PbigiZ873IE8Pq00brwys+mF3dVbP4Ms KEsOTrdoASjz5K6OoLkk7XbpeBaLY0gj6m9lU6UXtK2xJMB0ava7JXyk9bAg9lC9+es7 8h33nhwureSj5DIL5M2lmApDv1LzIPT56F+zsUiwE2Z3JYw3M1A9IdcYZwVYSX/B8sqO 3xzLNHYt0fldRisRrUhP1fTy6Ebj5e2yyxGDeVPRyRwsueZ2UsIseNcihqptO/6xEYQt MbGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fMb1VL9YtHPCpt27Fqs9iLpWccGutRkx4U5ZfaG+UgE=; b=O3mgD+/aJNiSIjUIHt+x/snOroHpC0KgVbJ5MQchHDqv6PBO4f/EW7XxdU6R9HF8+T cnSF4hlnYay8UjY6K8e+DhH647pWV6l5Y6R+Q2qfdhMhNWub7kL5Mjfwf6Egi2m9xEGa ZzUcZL5jJtJspC1IHU3xdv1IE7hmQmIIzu1Nl9LHCTCLstYZJcus+80dgpdpoVYmb7t8 PwxJISnnMW6D3NzN0zr/MvKqhGThMosrzQFlYBPfavckjPyZV29LGgehoZIKS7dhpCI5 dycFJNQAJ7j+lCJYEOGSM1FGbCr4n6XAwNP1pX1Ety4/XGPoTBNzbA/3KU7EjOqmtmYl TwIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NsH8pjMS; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw15-20020a170906fcaf00b00783af0d1ed8si10274270ejb.243.2022.10.18.12.04.31; Tue, 18 Oct 2022 12:05:11 -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=@ti.com header.s=ti-com-17Q1 header.b=NsH8pjMS; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230196AbiJRSea (ORCPT + 99 others); Tue, 18 Oct 2022 14:34:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbiJRSe2 (ORCPT ); Tue, 18 Oct 2022 14:34:28 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82B1C63B9; Tue, 18 Oct 2022 11:34:23 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29IIXu8C060046; Tue, 18 Oct 2022 13:33:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1666118036; bh=fMb1VL9YtHPCpt27Fqs9iLpWccGutRkx4U5ZfaG+UgE=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=NsH8pjMS1DC7+oCBrtvz6ztBaGVEAm7jlqgIu/d2ACIR0tgZr8qtHTVUfZwR4bZlh Ppb1IJCFILS/Hc+VZrHP1nQjX6WZTyyprds1Tn07F2dID8sh1nfVpWQtAMF4WTCf/D qwjKvljceqfbjMoit790BjX6LkQxHWFay9GutUN4= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29IIXuIi052387 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 18 Oct 2022 13:33:56 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Tue, 18 Oct 2022 13:33:56 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Tue, 18 Oct 2022 13:33:56 -0500 Received: from [10.250.33.68] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29IIXtQE118408; Tue, 18 Oct 2022 13:33:56 -0500 Message-ID: <97aae18e-a96c-a81b-74b7-03e32131a58f@ti.com> Date: Tue, 18 Oct 2022 13:33:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH net] net: fman: Use physical address for userspace interfaces To: Sean Anderson , Andrew Lunn CC: "David S . Miller" , , , Madalin Bucur , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Camelia Groza , Geert Uytterhoeven References: <20221017162807.1692691-1-sean.anderson@seco.com> Content-Language: en-US From: Andrew Davis In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/22 12:37 PM, Sean Anderson wrote: > Hi Andrew, > > On 10/18/22 1:22 PM, Andrew Lunn wrote: >> On Mon, Oct 17, 2022 at 12:28:06PM -0400, Sean Anderson wrote: >>> For whatever reason, the address of the MAC is exposed to userspace in >>> several places. We need to use the physical address for this purpose to >>> avoid leaking information about the kernel's memory layout, and to keep >>> backwards compatibility. >> >> How does this keep backwards compatibility? Whatever is in user space >> using this virtual address expects a virtual address. If it now gets a >> physical address it will probably do the wrong thing. Unless there is >> a one to one mapping, and you are exposing virtual addresses anyway. >> >> If you are going to break backwards compatibility Maybe it would be >> better to return 0xdeadbeef? Or 0? >> >> Andrew >> > > The fixed commit was added in v6.1-rc1 and switched from physical to > virtual. So this is effectively a partial revert to the previous > behavior (but keeping the other changes). See [1] for discussion. > > --Sean > > [1] https://lore.kernel.org/netdev/20220902215737.981341-1-sean.anderson@seco.com/T/#md5c6b66bc229c09062d205352a7d127c02b8d262 I see it asked in that thread, but not answered. Why are you exposing "physical" addresses to userspace? There should be no reason for that. Andrew