lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231017110221.189299-1-herve.codina@bootlin.com>
Date:   Tue, 17 Oct 2023 13:02:15 +0200
From:   Herve Codina <herve.codina@...tlin.com>
To:     Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Lizhi Hou <lizhi.hou@....com>
Cc:     Max Zhen <max.zhen@....com>, Sonal Santan <sonal.santan@....com>,
        Stefano Stabellini <stefano.stabellini@...inx.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Allan Nielsen <allan.nielsen@...rochip.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        Steen Hegelund <steen.hegelund@...rochip.com>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Herve Codina <herve.codina@...tlin.com>
Subject: [PATCH v2 0/3] Fix DT based address translations

Hi,

This patch series fixes a DT based address translation (translations
using the ranges property).

The issue is present with a ranges property made of a 3 cells child
address, a 3 cells parent address and a 2 cells child size.
This can happen with the recent addition of of_pci_prop_ranges() in
commit 407d1a51921e ("PCI: Create device tree node for bridge")

The issue description is fully described in the first patch commit log.

In this series,
  - The first patch fixes the issue.
  - The second patch avoids duplicated code.
  - The third patch adds unit tests related address translations.

I previously sent the first patch alone:
  https://lore.kernel.org/linux-kernel/20231003065236.121987-1-herve.codina@bootlin.com/
This series v2 has to be considered as the next iteration based on the
review done on my previous patch sent alone.

Best regards,
Hervé

Changes v1 -> v2

 - Patch 1
   Simplify of_bus_default_flags_map().
   Fix the commit log (pci-ep-bus ranges[0] size is 0x200_0000 instead
   of 0x2000_0000).

 - Patch 2 (new in v2)
   Remove duplicated code.

 - Patch 3 (new in v2)
   Add unit tests.

Herve Codina (3):
  of: address: Fix address translation when address-size is greater than
    2
  of: address: Remove duplicated functions
  of: unittest: Add tests for address translations

 drivers/of/address.c                        |  43 ++++++---
 drivers/of/unittest-data/tests-address.dtsi | 101 ++++++++++++++++++++
 drivers/of/unittest.c                       |  74 ++++++++++++++
 3 files changed, 205 insertions(+), 13 deletions(-)

-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ