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]
Date:	Tue, 8 May 2007 17:14:12 -0500 (CDT)
From:	John Keller <jpk@....com>
To:	akpm@...ux-foundation.org (Andrew Morton)
Cc:	tony.luck@...el.com (Luck Tony), pj@....com (Paul Jackson),
	jpk@....com (John Keller), linux-kernel@...r.kernel.org,
	steiner@....com, linux-ia64@...r.kernel.org
Subject: Re: [PATCH Resend] - SN: validate smp_affinity mask on intr

> 
> On Tue, 8 May 2007 13:14:26 -0700
> "Luck, Tony" <tony.luck@...el.com> wrote:
> 
> > > It had a dopey little bug:
> > >
> > > -#define is_affinity_mask_valid() 1
> > > +#define is_affinity_mask_valid(val) 1
> > 
> > That would fix warnings on non-ia64 systems (which is
> > a step in the right direction).  But on ia64 I have
> > the
> > 
> > #define is_affinity_mask_valid is_affinity_mask_valid
> > 
> > in play at that point, so I have a real function call
> > which doesn't have an in-scope declaration, so I get:
> > 
> > kernel/irq/proc.c:49: warning: implicit declaration of function `is_affinity_mask_valid'
> > 
> 
> hm, I wonder if John sent the right patch.


I sure thought I had sent the right patch, but obviously not.
Thanks for setting things straight.

John


> 
> The obvious fix fixes it up for me:
> 
> --- a/include/asm-ia64/irq.h~sn-validate-smp_affinity-mask-on-intr-redirect-fix-2
> +++ a/include/asm-ia64/irq.h
> @@ -11,6 +11,9 @@
>   * 02/29/00     D.Mosberger	moved most things into hw_irq.h
>   */
>  
> +#include <linux/types.h>
> +#include <linux/cpumask.h>
> +
>  #define NR_IRQS		256
>  #define NR_IRQ_VECTORS	NR_IRQS
>  
> @@ -29,6 +32,7 @@ extern void disable_irq (unsigned int);
>  extern void disable_irq_nosync (unsigned int);
>  extern void enable_irq (unsigned int);
>  extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
> +bool is_affinity_mask_valid(cpumask_t cpumask);
>  
>  #define is_affinity_mask_valid is_affinity_mask_valid
>  
> _
> 
> but the new includes are always a worry.
> 
> We need the cpumask.h include because we went and created a stupid typedef.
>  I think at the time we did this because cpumask_t could optionally be a
> plain old "long".  However I don't think we ended up doing that so we could
> now do:
> 
> -typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
> +typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
> 
> and then we can forward-declare `struct cpumask' in include/asm-ia64/irq.h
> rather than adding the nested include.
> 
> 
> 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ