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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALHNRZ884fF4kpM_=N4d1vR27-9BOeaS7_cN_JhKN0S6MYQVQw@mail.gmail.com>
Date: Mon, 10 Mar 2025 15:15:33 -0500
From: Aaron Kling <webgeek1234@...il.com>
To: Robin Murphy <robin.murphy@....com>
Cc: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>, 
	iommu@...ts.linux.dev, linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] iommu/arm: Allow disabling Qualcomm support in arm_smmu_v3

On Mon, Mar 10, 2025 at 2:52 PM Robin Murphy <robin.murphy@....com> wrote:
>
> On 2025-03-10 4:45 pm, Aaron Kling wrote:
> > On Mon, Mar 10, 2025 at 7:42 AM Robin Murphy <robin.murphy@....com> wrote:
> >>
> >> On 2025-03-10 6:11 am, Aaron Kling via B4 Relay wrote:
> >>> From: Aaron Kling <webgeek1234@...il.com>
> >>>
> >>> If ARCH_QCOM is enabled when building arm_smmu_v3,
> >>
> >> This has nothing to do with SMMUv3, though?
> >>
> >>> a dependency on
> >>> qcom-scm is added, which currently cannot be disabled. Add a prompt to
> >>> ARM_SMMU_QCOM to allow disabling this dependency.
> >>
> >> Why is that an issue - what problem arises from having the SCM driver
> >> enabled? AFAICS it's also selected by plenty of other drivers including
> >> pretty fundamental ones like pinctrl. If it is somehow important to
> >> exclude the SCM driver, then I can't really imagine what the use-case
> >> would be for building a kernel which won't work on most Qualcomm
> >> platforms but not simply disabling ARCH_QCOM...
> >>
> >
> > I am working with the android kernel. The more recent setup enables a
> > minimal setup of configs in a core kernel that works across all
> > supported arch's, then requires further support to all be modules. I
> > specifically am working with tegra devices. But as ARCH_QCOM is
> > enabled in the core defconfig, when I build smmuv3 as a module, I end
> > up with a dependency on qcom-scm which gets built as an additional
> > module. And it would be preferable to not require qcom modules to boot
> > a tegra device.
>
> That just proves my point though - if you disable ARM_SMMU_QCOM in that
> context then you've got a kernel which won't work properly on Qualcomm
> platforms, so you may as well have just disabled ARCH_QCOM anyway. In
> fact the latter is objectively better since it then would not break the
> fundamental premise of "a core kernel that works across all supported
> arch's" :/

I'm not sure this is entirely true. Google's GKI mandates a fixed core
kernel Image. This has the minimal configs that can't be built as
modules. Then each device build is supposed to build independent sets
of modules via defconfig snippets that support the rest of the
hardware. Then what gets booted on a device is a prebuilt core kernel
image provided by Google, plus the modules built by the vendor. In
this setup, qcom-scm and ARM_SMMU_QCOM are modules and not part of the
core kernel. For a qcom target, arm_smmu_v3 would be built with
ARM_SMMU_QCOM. But then any non-qcom target that needs arm_smmu_v3
currently builds and deps qcom-scm. But there's no technical reason
they need that dep.
>
> Maybe if you can find a viable way to separate out all the arm-smmu-qcom
> stuff into its own sub-module which only loads when needed, or possibly
> make SCM a soft-dep (given that we already have to cope with it being
> loaded but not initialised yet) then that might be a reasonable change
> to make; as it stands, I don't think this patch is. And it's definitely
> not a stable "fix" either way.

The cc stable could be dropped. But I'm working with android forks of
6.6 and 6.12 currently, so I was hoping to get this pushed back to
stable, which would eventually filter its way over there.

>
> But frankly, weird modules happen. Why the heck is parport_pc currently
> loaded on my AArch64 workstation!? I can't even begin to imagine, but
> I'll live...

This is fair. But I've got to try at least to make the module
spaghetti make sense. If no one tries, it just gets worse.
>
> Thanks,
> Robin.

Sincerely,
Aaron

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ