Page MenuHomeFreeBSD

mindal_semihalf.com (Kornel Dulęba)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 19 2018, 1:41 PM (148 w, 2 d)

Recent Activity

Wed, Sep 1

mindal_semihalf.com requested review of D31766: if_cdce: Add support for setting RX filtering.
Wed, Sep 1, 9:44 AM

Tue, Aug 31

mindal_semihalf.com added a reviewer for D31724: mvneta: Fix MTU update sequence: wma.
Tue, Aug 31, 6:07 AM

Mon, Aug 30

mindal_semihalf.com requested review of D31724: mvneta: Fix MTU update sequence.
Mon, Aug 30, 9:11 AM

Aug 10 2021

mindal_semihalf.com abandoned D31348: iflib: Fix PNP matching.

You're right, your approach is much better. I tested D31482 and it fixes the issue.

Aug 10 2021, 7:54 AM

Aug 9 2021

mindal_semihalf.com added a comment to D31348: iflib: Fix PNP matching.

Any thoughts on this?
Sorry to bother you, but if I understand phabricator correctly this revision needs to be ACKed by someone from the iflib group before it can be committed.

Aug 9 2021, 1:57 PM

Aug 3 2021

mindal_semihalf.com requested review of D31395: tpm_tis: Improve interrupt allocation.
Aug 3 2021, 10:56 AM

Jul 29 2021

mindal_semihalf.com requested review of D31348: iflib: Fix PNP matching.
Jul 29 2021, 12:28 PM

Jul 22 2021

mindal_semihalf.com requested review of D31268: Fix mac_veriexec version mismatch.
Jul 22 2021, 9:37 AM

Jul 14 2021

mindal_semihalf.com added a comment to D28803: arm/mv: Don't rely on firmware MSI mapping in ICU.

I've finally managed to find some time to rewrite this patch.
Sorry for taking so long, I'd appreciate if you could take a look.

Jul 14 2021, 8:09 AM
mindal_semihalf.com updated the diff for D28803: arm/mv: Don't rely on firmware MSI mapping in ICU.
Jul 14 2021, 8:07 AM

Jul 5 2021

mindal_semihalf.com updated the diff for D30923: Introduce driver for Freescale Felix switch.
Jul 5 2021, 7:09 AM

Jun 30 2021

mindal_semihalf.com requested review of D30953: ofw_pci: Fix probing.
Jun 30 2021, 10:01 AM

Jun 28 2021

mindal_semihalf.com requested review of D30923: Introduce driver for Freescale Felix switch.
Jun 28 2021, 10:40 AM
mindal_semihalf.com requested review of D30922: etherswitch: Add a new striptagingress port flag.
Jun 28 2021, 10:40 AM
mindal_semihalf.com abandoned D30761: ofw_bus_subr.c: Don't treat "0" as a valid OFW node.

Fixed in 3eae4e106ac7.

Jun 28 2021, 10:37 AM

Jun 18 2021

mindal_semihalf.com added a comment to D30761: ofw_bus_subr.c: Don't treat "0" as a valid OFW node.

Ok, so how about this.
I'll move all dt parsing I recently added from pci_host_generic_fdt.c to ofw_pci.c.
Then pci_host_generic_fdt will check if it has any children in dt and create a fake ofw devinfo for pci bus as you suggested.
That devinfo will point to the RCs ofw node so that ofw_pci will be able to parse dt by itself.
This will make ofw_pci attach only when its actually needed.
Any thoughts?

Jun 18 2021, 9:47 AM

Jun 17 2021

mindal_semihalf.com added a comment to D30761: ofw_bus_subr.c: Don't treat "0" as a valid OFW node.
In D30761#692573, @mmel wrote:

First, please don't take this as hating - I just think we've opened a Pandora's box full of mistakes... I've gotten caught up in the 0/-1 ambiguity for invalid phandle more than once, so I think it would be good to get that sorted out.

Jun 17 2021, 3:39 PM

Jun 16 2021

mindal_semihalf.com added a comment to D30761: ofw_bus_subr.c: Don't treat "0" as a valid OFW node.
In D30761#692182, @mmel wrote:

Imho, this is just papering over real problem, it is obvious that ofw_bus_lookup_imap() should not be called for a device/bus that is not based on ofw.

Jun 16 2021, 3:00 PM
mindal_semihalf.com added inline comments to D30729: Introduce new driver for NXP ENETC Ethernet controller.
Jun 16 2021, 1:15 PM
mindal_semihalf.com added a comment to D30761: ofw_bus_subr.c: Don't treat "0" as a valid OFW node.

@mmel any thoughts about this patch?

Jun 16 2021, 7:34 AM

Jun 14 2021

mindal_semihalf.com added a comment to D30181: Add ofw interface support to PCI.

@mmel Please take a look at D30761, it fixed the issue for me.

Jun 14 2021, 2:11 PM
mindal_semihalf.com requested review of D30761: ofw_bus_subr.c: Don't treat "0" as a valid OFW node.
Jun 14 2021, 2:10 PM
mindal_semihalf.com added a comment to D30181: Add ofw interface support to PCI.

You're right, I've also managed to replicate it on mcbin with uboot+dts.
I'll try to fix it ASAP.

Jun 14 2021, 1:39 PM
mindal_semihalf.com added a comment to D30181: Add ofw interface support to PCI.
In D30181#691515, @mmel wrote:

Unfortunately this broke (probably) all existing FDT enabled boards with enumerated (not FDT loaded) PCI(e) interfaces (in my case both mcbin and tegra). This driver probe() matches all PCI buses, and many things (driver, ofw code) depend on the fact that calling ofw_bus_get_node(dev) on a non-FDT installed device returns zero.

Jun 14 2021, 12:30 PM
mindal_semihalf.com added inline comments to D30729: Introduce new driver for NXP ENETC Ethernet controller.
Jun 14 2021, 9:04 AM
mindal_semihalf.com updated the diff for D30729: Introduce new driver for NXP ENETC Ethernet controller.

Don't capitalize soc_nxp_ls.

Jun 14 2021, 8:43 AM
mindal_semihalf.com added inline comments to D30728: iflib: Add a new quirk.
Jun 14 2021, 7:28 AM
mindal_semihalf.com updated the diff for D30728: iflib: Add a new quirk.
Jun 14 2021, 7:27 AM

Jun 11 2021

mindal_semihalf.com added a reviewer for D30729: Introduce new driver for NXP ENETC Ethernet controller: manpages.
Jun 11 2021, 3:33 PM
mindal_semihalf.com requested review of D30729: Introduce new driver for NXP ENETC Ethernet controller.
Jun 11 2021, 3:06 PM
mindal_semihalf.com requested review of D30728: iflib: Add a new quirk.
Jun 11 2021, 3:06 PM

Jun 1 2021

mindal_semihalf.com updated the diff for D30180: pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devices.

Use OFW_PCI_PHYS_HI_* macros and check bus number during ofw node search.

Jun 1 2021, 2:47 PM
mindal_semihalf.com updated the diff for D30181: Add ofw interface support to PCI.

Check if our parent supports ofw interface in ofw_pci_probe.

Jun 1 2021, 2:44 PM

May 27 2021

mindal_semihalf.com added inline comments to D30181: Add ofw interface support to PCI.
May 27 2021, 9:10 AM
mindal_semihalf.com added inline comments to D30180: pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devices.
May 27 2021, 8:30 AM
mindal_semihalf.com updated the diff for D30180: pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devices.
May 27 2021, 8:29 AM

May 26 2021

mindal_semihalf.com added inline comments to D30181: Add ofw interface support to PCI.
May 26 2021, 5:09 PM

May 19 2021

mindal_semihalf.com added a comment to D30181: Add ofw interface support to PCI.

Any thoughts regarding the updated version of this diff?

May 19 2021, 12:21 PM

May 12 2021

mindal_semihalf.com requested review of D30229: Disable qoriq pci driver on LS1028A SoC.
May 12 2021, 12:51 PM
mindal_semihalf.com updated the diff for D30181: Add ofw interface support to PCI.
May 12 2021, 10:48 AM
mindal_semihalf.com requested review of D30226: Rename ofwpci.c to ofw_pcib.c.
May 12 2021, 10:46 AM
mindal_semihalf.com added inline comments to D30179: Remove ThunderX PCIe FDT quirks from pci_host_generic_fdt.c.
May 12 2021, 10:19 AM

May 11 2021

mindal_semihalf.com added a comment to D30181: Add ofw interface support to PCI.

This should be a sub class of the existing pci driver, similar to how it's done in sys/dev/acpica/acpi_pci.c

May 11 2021, 6:27 AM

May 10 2021

mindal_semihalf.com requested review of D30181: Add ofw interface support to PCI.
May 10 2021, 11:06 AM
mindal_semihalf.com requested review of D30180: pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devices.
May 10 2021, 11:06 AM
mindal_semihalf.com requested review of D30179: Remove ThunderX PCIe FDT quirks from pci_host_generic_fdt.c.
May 10 2021, 11:06 AM

Apr 30 2021

mindal_semihalf.com added inline comments to D30033: gicv3_its: Flush cache after allocating ITT memory.
Apr 30 2021, 9:51 AM
mindal_semihalf.com added a comment to D30033: gicv3_its: Flush cache after allocating ITT memory.

Does this need to be done in all cases, or just when the ITS is not cache-coherent?

Apr 30 2021, 7:16 AM
mindal_semihalf.com updated the diff for D30033: gicv3_its: Flush cache after allocating ITT memory.
Apr 30 2021, 7:13 AM

Apr 29 2021

mindal_semihalf.com requested review of D30033: gicv3_its: Flush cache after allocating ITT memory.
Apr 29 2021, 10:19 AM

Apr 27 2021

mindal_semihalf.com added a reviewer for D30009: iflib: Take iri_pad into account when processing small frames: gallatin.
Apr 27 2021, 11:23 AM
mindal_semihalf.com requested review of D30009: iflib: Take iri_pad into account when processing small frames.
Apr 27 2021, 10:50 AM

Apr 7 2021

mindal_semihalf.com requested review of D29625: pci_dw.c: Trim ATU windows bigger than 4GB.
Apr 7 2021, 11:19 AM

Apr 6 2021

mindal_semihalf.com requested review of D29604: pci_user.c: Call bus_translate_resource before mmaping bars.
Apr 6 2021, 2:12 PM
mindal_semihalf.com requested review of D29603: pciconf: Use VM_MEMATTR_DEVICE on supported architectures.
Apr 6 2021, 1:35 PM

Mar 31 2021

mindal_semihalf.com requested review of D29516: pci_dw.c: Set IO ATU window correctly.
Mar 31 2021, 4:19 PM

Feb 24 2021

mindal_semihalf.com requested review of D28911: mvebu_gpio: do not force data in value invertion during attach.
Feb 24 2021, 2:57 PM

Feb 19 2021

mindal_semihalf.com requested review of D28803: arm/mv: Don't rely on firmware MSI mapping in ICU.
Feb 19 2021, 7:42 PM

Jun 23 2020

mindal_semihalf.com requested review of D24944: Compile generic_xhci_fdt.c on armada platform.
Jun 23 2020, 3:20 AM

May 28 2020

mindal_semihalf.com added a comment to D25030: Change return types of hash update functions in SHA-NI.
In D25030#551185, @jhb wrote:

Does this fix the IPSec tunnel test failures reported? I thought those were also true of non-aesni, not just aesni though.

May 28 2020, 7:52 AM

May 27 2020

mindal_semihalf.com added inline comments to D25030: Change return types of hash update functions in SHA-NI.
May 27 2020, 3:21 PM
mindal_semihalf.com updated the diff for D25030: Change return types of hash update functions in SHA-NI.
May 27 2020, 3:18 PM
mindal_semihalf.com added inline comments to D25030: Change return types of hash update functions in SHA-NI.
May 27 2020, 2:38 PM
mindal_semihalf.com updated the diff for D25030: Change return types of hash update functions in SHA-NI.

Change return types of sha routines directly instead of using wrappers as suggested by @cem.

May 27 2020, 2:37 PM
mindal_semihalf.com requested review of D25030: Change return types of hash update functions in SHA-NI.
May 27 2020, 1:34 PM

May 25 2020

mindal_semihalf.com requested review of D24999: Fix AES-CTR compatibility issue in ipsec.
May 25 2020, 11:00 AM

May 22 2020

mindal_semihalf.com added a comment to D24906: Improve support for stream ciphers in the software encryption interface..

Yes, it is the block size in enc_xform_aes_icm that matters. Do you want to work on the sysctl as a followup change to this or would you like me to do so? Since I don't plan to MFC any of this I think it is fine for there to be a narrow gap in HEAD before the compat sysctl shows up.

May 22 2020, 3:50 PM
mindal_semihalf.com added a comment to D24906: Improve support for stream ciphers in the software encryption interface..

Arguably this means we are now compliant with the RFC when we weren't before I think?

May 22 2020, 3:14 PM
mindal_semihalf.com added a comment to D24906: Improve support for stream ciphers in the software encryption interface..

Just wanted to let you know that this patch will have some ramifications when it comes to using AES-CTR in ipsec.
Before sending a frame its payload is aligned to the block size of the cipher used, in case of AES-CTR it was 16 bytes before this patch.
Since old versions of FreeBSD can't decrypt partial blocks of AES-CTR, ipsec tunnels that use this cipher, established between FreeBSD with this patch applied and without won't work.
I think that we will have the same problem with OpenBSD too.
With that being said RFC3686 specifies that payload should not be aligned to block size when using AES-CTR.
In particular Linux doesn't do that, so right now we have the same problem with ipsec between Linux host and FreeBSD.

May 22 2020, 11:26 AM

Jan 17 2020

mindal_semihalf.com created D23225: mvneta: Add jumbo frame support..
Jan 17 2020, 8:49 AM

Aug 21 2019

mindal_semihalf.com added a comment to D21190: Driver for Broadcom Secure Processing Unit..

Add a workaround for gnu dts.

Aug 21 2019, 11:52 AM

Aug 20 2019

mindal_semihalf.com created D21342: GICv2m: quirks for Broadcom NS2.
Aug 20 2019, 3:40 PM
mindal_semihalf.com created D21339: GICv2m: parse SPI_BASE and NUM_SPIS from DTS.
Aug 20 2019, 12:46 PM
mindal_semihalf.com created D21337: bnxt: Set max number of descriptors to a power of 2.
Aug 20 2019, 11:02 AM
mindal_semihalf.com created D21335: Implement MDIO mux with Broadcom NS2 PCIe PHY initialization.
Aug 20 2019, 7:39 AM

Aug 14 2019

mindal_semihalf.com added a comment to D21189: Driver for Broadcom PDC.

You can use __FreeBSD_version to toggle the non-xdma case. It looks like 1200020 is the first bump after xdma was added so you'd have:

#if __FreeBSD_version >= 1200020
/* XDMA code */
#else
/* Pre-XDMA code */
#endif
Aug 14 2019, 8:04 AM

Aug 13 2019

mindal_semihalf.com updated the diff for D21190: Driver for Broadcom Secure Processing Unit..
Aug 13 2019, 12:32 PM

Aug 9 2019

mindal_semihalf.com added a comment to D21189: Driver for Broadcom PDC.

Is there a reasion you're not using the xdma framework?

Aug 9 2019, 8:09 AM
mindal_semihalf.com added a comment to D21189: Driver for Broadcom PDC.

Keep files.arm64 sorted

Aug 9 2019, 8:06 AM

Aug 8 2019

mindal_semihalf.com created D21190: Driver for Broadcom Secure Processing Unit..
Aug 8 2019, 4:26 PM
mindal_semihalf.com created D21189: Driver for Broadcom PDC.
Aug 8 2019, 4:23 PM

Jul 15 2019

mindal_semihalf.com created D20952: stand: Verify files loaded in chain command.
Jul 15 2019, 9:43 AM

Jul 12 2019

mindal_semihalf.com added a comment to D20909: loader: ignore some variable settings if input unverified.
In D20909#453439, @sjg wrote:

How about the "chain" command?
Files loaded by it bypass verification, so we might to fix it by adding a hook to the veriexec instead.

Sorry not familiar with that one.
Got a pointer?
Also that would be a separate change no?

Jul 12 2019, 7:20 AM

Jul 11 2019

mindal_semihalf.com added a comment to D20909: loader: ignore some variable settings if input unverified.

How about the "chain" command?
Files loaded by it bypass verification, so we might to fix it by adding a hook to the veriexec instead.

Jul 11 2019, 9:36 AM

Jun 28 2019

mindal_semihalf.com added a comment to D20770: arm64: Move "segments" array from bus_dma_tag to bus_dmamap..

Can you be more specific about the flow that can lead to overwrite the segs array?

Basically if you have a lot of threads doing DMA loads on the same tag concurrently there is a small chance of the segs array being overwritten before it is read in the callback.
It is a rare race, but reproducible.

Hm, I'm not sure I see how that's supposed to happen. busdma_swi already takes a lock (dmat->common.lockfunc) to prevent issuing multiple loads on the same tag, thus there should be no overwriting while the caller callback is using tag->segs?

Well, I'm not sure how dusdma_swi can help us in this case.
If you go through the flow starting at bus_dmamap_load, then going into bounce_bus_dmamap_load_buffer no lock is acquired there.

Right, the lock is only used for the deferred callback.

I think this is fine, but should be done for x86 also at least (that's where arm64 busdma code is coming from). This expected behaviour should also be mentioned on the busdma man page.

I think the general expectation of busdma code is that you serialize loads when using the same tag, but I cannot find an explicit reference to it on the man page, and IMO the locking section is too vague and doesn't explicitly say that you are not supposed to issue concurrent load calls using the same tag.

Ok, so as you said we have two ways to proceed from here:

  1. Modify the manual to explicitly require the user to serialize all loads on the same tag.

Do we know if all existing drivers follow that rule?

  1. Move the segmets array on all architectures.

I could prepare the patch, but frankly I don't feel competent enough to make such design decision.

Right, I completely understand. I don't think however that modifying busdma behaviour only for arm64 is the right solution. Drivers built and tested on arm64 might then fail to work for other arches, and no one would know why.

Jun 28 2019, 1:58 PM
mindal_semihalf.com added a comment to D20770: arm64: Move "segments" array from bus_dma_tag to bus_dmamap..

Can you be more specific about the flow that can lead to overwrite the segs array?

Basically if you have a lot of threads doing DMA loads on the same tag concurrently there is a small chance of the segs array being overwritten before it is read in the callback.
It is a rare race, but reproducible.

Hm, I'm not sure I see how that's supposed to happen. busdma_swi already takes a lock (dmat->common.lockfunc) to prevent issuing multiple loads on the same tag, thus there should be no overwriting while the caller callback is using tag->segs?

Well, I'm not sure how dusdma_swi can help us in this case.
If you go through the flow starting at bus_dmamap_load, then going into bounce_bus_dmamap_load_buffer no lock is acquired there.

Right, the lock is only used for the deferred callback.

I think this is fine, but should be done for x86 also at least (that's where arm64 busdma code is coming from). This expected behaviour should also be mentioned on the busdma man page.

I think the general expectation of busdma code is that you serialize loads when using the same tag, but I cannot find an explicit reference to it on the man page, and IMO the locking section is too vague and doesn't explicitly say that you are not supposed to issue concurrent load calls using the same tag.

Jun 28 2019, 11:40 AM

Jun 27 2019

mindal_semihalf.com added a comment to D20770: arm64: Move "segments" array from bus_dma_tag to bus_dmamap..

Can you be more specific about the flow that can lead to overwrite the segs array?

Basically if you have a lot of threads doing DMA loads on the same tag concurrently there is a small chance of the segs array being overwritten before it is read in the callback.
It is a rare race, but reproducible.

Hm, I'm not sure I see how that's supposed to happen. busdma_swi already takes a lock (dmat->common.lockfunc) to prevent issuing multiple loads on the same tag, thus there should be no overwriting while the caller callback is using tag->segs?

Jun 27 2019, 2:40 PM

Jun 26 2019

mindal_semihalf.com added a comment to D20770: arm64: Move "segments" array from bus_dma_tag to bus_dmamap..

Isn't this also a problem on amd64?

Jun 26 2019, 2:58 PM
mindal_semihalf.com created D20770: arm64: Move "segments" array from bus_dma_tag to bus_dmamap..
Jun 26 2019, 1:22 PM

May 24 2019

mindal_semihalf.com abandoned D20373: stand: Add a call to verify_file from ficl..

Ok, I'm abandoning this in favor of your patch.

May 24 2019, 7:44 AM
mindal_semihalf.com accepted D20387: ficl pfopen: verify file.

Did some basic testing and it looks ok.

May 24 2019, 7:33 AM

May 23 2019

mindal_semihalf.com created D20373: stand: Add a call to verify_file from ficl..
May 23 2019, 10:01 AM

May 9 2019

mindal_semihalf.com accepted D20208: libsecureboot: make it easier to customize trust anchors.
May 9 2019, 11:39 AM

Apr 24 2019

mindal_semihalf.com abandoned D19962: stand: Don't verify entropy cache file..

Abandoned in favor of D20018.

Apr 24 2019, 1:09 PM

Apr 23 2019

mindal_semihalf.com accepted D20018: Allow no_hash to appear in manifest..

LGTM

Apr 23 2019, 9:44 AM
mindal_semihalf.com added a comment to D19962: stand: Don't verify entropy cache file..

In my opinion @sjg approach is better as it is more versatile. If no one opposes I'll abandon this review in a day or two.

Apr 23 2019, 9:00 AM

Apr 19 2019

mindal_semihalf.com created D19962: stand: Don't verify entropy cache file..
Apr 19 2019, 9:40 AM

Apr 12 2019

mindal_semihalf.com added a comment to D19713: tpm: Prevent session hijack..

I don't really know the internals of this driver (ideally this should be done by someone who is familiar with it), but are we sure that the write method is always called before a read? Also, if the discard callout is fired, should the owner tid be reset (because the contents is now discarded)?

Apr 12 2019, 8:12 AM

Apr 11 2019

mindal_semihalf.com added a reviewer for D19713: tpm: Prevent session hijack.: delphij.
Apr 11 2019, 11:06 AM

Apr 1 2019

mindal_semihalf.com updated the diff for D19281: mac_veriexec: Create kernel module to parse manifest based on envs..

Updates based on email exchange with @sjg.

Apr 1 2019, 9:51 AM