Re: [PATCH] MODSIGN: Add TAINT_NOKEY_MODULE

From: Josh Boyer
Date: Wed Jan 16 2013 - 14:37:20 EST


On Wed, Jan 16, 2013 at 02:04:50PM +1030, Rusty Russell wrote:
> Josh Boyer <jwboyer@xxxxxxxxxx> writes:
> > With module signing enabled but not in enforcing mode, we don't consider
> > unsigned modules to be an error. However, if we encounter an unsigned
> > module we currently taint the module and kernel with TAINT_FORCED_MODULE.
> > That also disables lockdep within the kernel.
>
> How about this, instead? Ingo?

<snip>

> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
> index 86e2f4a..7acca64 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/dmar.c
> @@ -230,7 +230,7 @@ dmar_parse_one_rhsa(struct acpi_dmar_header *header)
> }
> }
> WARN_TAINT(
> - 1, TAINT_FIRMWARE_WORKAROUND,
> + 1, TAINT_FIRMWARE_WORKAROUND, true,
> "Your BIOS is broken; RHSA refers to non-existent DMAR unit at %llx\n"
> "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
> drhd->reg_base_addr,

This bit causes a build failure here:

drivers/iommu/dmar.c: In function 'dmar_parse_one_rhsa':
drivers/iommu/dmar.c:232:2: warning: passing argument 4 of 'warn_slowpath_fmt_taint' makes pointer from integer without a cast [enabled by default]
In file included from /home/jwboyer/kernel/kernel-3.7.fc19/linux-3.8.0-0.rc3.git2.2.2.fc19.x86_64/arch/x86/include/asm/bug.h:38:0,
from include/linux/bug.h:4,
from include/linux/cpumask.h:12,
from /home/jwboyer/kernel/kernel-3.7.fc19/linux-3.8.0-0.rc3.git2.2.2.fc19.x86_64/arch/x86/include/asm/cpumask.h:4,
from /home/jwboyer/kernel/kernel-3.7.fc19/linux-3.8.0-0.rc3.git2.2.2.fc19.x86_64/arch/x86/include/asm/msr.h:10,
from /home/jwboyer/kernel/kernel-3.7.fc19/linux-3.8.0-0.rc3.git2.2.2.fc19.x86_64/arch/x86/include/asm/processor.h:20,
from /home/jwboyer/kernel/kernel-3.7.fc19/linux-3.8.0-0.rc3.git2.2.2.fc19.x86_64/arch/x86/include/asm/atomic.h:6,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from include/linux/lockdep.h:23,
from include/linux/sysfs.h:18,
from include/linux/kobject.h:21,
from include/linux/pci.h:28,
from drivers/iommu/dmar.c:31:
include/asm-generic/bug.h:69:6: note: expected 'const char *' but argument is of type 'int'
drivers/iommu/intel-iommu.c:4287:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'quirk_ricoh_multifunction'
drivers/iommu/intel-iommu.c:4291:1: error: 'quirk_ricoh_multifunction' undeclared here (not in a function)
make[2]: *** [drivers/iommu/intel-iommu.o] Error 1

Looking at it, but the WARN_ macros are currently making my head hurt.

josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/