git: 18f55c67f746 - main - x86: Fix lapic_ipi_alloc() on i386

Mark Johnston markj at freebsd.org
Tue Jun 1 00:48:33 UTC 2021


On Tue, Jun 01, 2021 at 12:48:52AM +0100, Jessica Clarke wrote:
> On 1 Jun 2021, at 00:09, Mark Johnston <markj at FreeBSD.org> wrote:
> > 
> > The branch main has been updated by markj:
> > 
> > URL: https://cgit.FreeBSD.org/src/commit/?id=18f55c67f746f0ad12fe972328234d340a621df9
> > 
> > commit 18f55c67f746f0ad12fe972328234d340a621df9
> > Author:     Mark Johnston <markj at FreeBSD.org>
> > AuthorDate: 2021-05-31 22:51:14 +0000
> > Commit:     Mark Johnston <markj at FreeBSD.org>
> > CommitDate: 2021-05-31 22:51:14 +0000
> > 
> >    x86: Fix lapic_ipi_alloc() on i386
> > 
> >    The loop which checks to see if "dynamic" IDT entries are allocated
> >    needs to compare with the trampoline address of the reserved ISR.
> >    Otherwise it will never succeed.
> > 
> >    Reported by:    Harry Schmalzbauer <freebsd at omnilan.de>
> >    Tested by:      Harry Schmalzbauer <freebsd at omnilan.de>
> >    Reviewed by:    kib
> >    MFC after:      1 week
> >    Sponsored by:   The FreeBSD Foundation
> >    Differential Revision:  https://reviews.freebsd.org/D30576
> > ---
> > sys/x86/x86/local_apic.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> > 
> > diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
> > index 5b4910d4b891..bb575d0c601d 100644
> > --- a/sys/x86/x86/local_apic.c
> > +++ b/sys/x86/x86/local_apic.c
> > @@ -2127,6 +2127,10 @@ native_lapic_ipi_vectored(u_int vector, int dest)
> > 
> > #endif /* SMP */
> > 
> > +#ifdef __i386__
> > +extern uintptr_t setidt_disp;
> 
> uintptr_t here is fishy. Should it not be size_t or ptrdiff_t?

Yes, either of those seems more correct.  See
https://reviews.freebsd.org/D30590


More information about the dev-commits-src-all mailing list