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: <20070118080003.GC31860@in.ibm.com>
Date:	Thu, 18 Jan 2007 13:30:03 +0530
From:	Vivek Goyal <vgoyal@...ibm.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Benjamin Romer <benjamin.romer@...sys.com>,
	linux-kernel@...r.kernel.org
Subject: Re: PATCH: Update disable_IO_APIC to use 8-bit destination field (X86_64)

On Thu, Jan 18, 2007 at 12:10:55AM -0700, Eric W. Biederman wrote:
> Vivek Goyal <vgoyal@...ibm.com> writes:
> >
> > Or how about making physical_dest field also 8bit like logical_dest field.
> > This will work both for 4bit and 8bit physical apic ids at the same time
> > code becomes more intutive and it is easier to know whether IOAPIC is being
> > put in physical or destination logical mode.
> 
> Exactly what I was trying to suggest.
> 
> Looking closer at the code I think it makes sense to just kill the union and
> stop the discrimination between physical and logical modes and just have a
> dest field in the structure.  Roughly as you were suggesting at first.
> 
> The reason we aren't bitten by this on a regular basis is the normal code
> path uses logical.logical_dest in both logical and physical modes.
> Which is a little confusing.
> 
> Since there really isn't a distinction to be made we should just stop
> trying, which will make maintenance easier :)
> 
> Currently there are several non-common case users of physical_dest
> that are probably bitten by this problem under the right
> circumstances.
> 
> So I think we should just make the structure:
> 
> struct IO_APIC_route_entry {
> 	__u32	vector		:  8,
> 		delivery_mode	:  3,	/* 000: FIXED
> 					 * 001: lowest prio
> 					 * 111: ExtINT
> 					 */
> 		dest_mode	:  1,	/* 0: physical, 1: logical */
> 		delivery_status	:  1,
> 		polarity	:  1,
> 		irr		:  1,
> 		trigger		:  1,	/* 0: edge, 1: level */
> 		mask		:  1,	/* 0: enabled, 1: disabled */
> 		__reserved_2	: 15;
> 
> 	__u32	__reserved_3	: 24,
> 		__dest		:  8;
> } __attribute__ ((packed));
> 
> And fixup the users.  This should keep us from getting bit by this bug
> in the future.  Like when people start introducing support for more
> than 256 cores and the low 24bits start getting used.
> 
> Or when someone new starts working on the code and thinks the fact
> the field name says logical we are actually using the apic in logical
> mode.

This makes perfect sense to me. Ben, interested in providing a patch 
for this?

Thanks
Vivek
-
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