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: <823f4ef4-f9e5-68cb-d6e9-d079483c1e21@oracle.com>
Date:   Thu, 16 Sep 2021 21:34:46 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Jan Beulich <jbeulich@...e.com>, Juergen Gross <jgross@...e.com>
Cc:     Stefano Stabellini <sstabellini@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>
Subject: Re: [PATCH] xen/x86: fix PV trap handling on secondary processors


On 9/16/21 11:04 AM, Jan Beulich wrote:
>  {
>  	const struct desc_ptr *desc = this_cpu_ptr(&idt_desc);
> +	unsigned i, count = (desc->size + 1) / sizeof(gate_desc);
>  
> -	xen_convert_trap_info(desc, traps);


Can you instead add a boolean parameter to xen_convert_trap_info() to indicate whether to skip empty entries? That will avoid (almost) duplicating the code.


-boris


> +	BUG_ON(count > 256);
> +
> +	for (i = 0; i < count; ++i) {
> +		const gate_desc *entry = (gate_desc *)desc->address + i;
> +
> +		cvt_gate_to_trap(i, entry, &traps[i]);
> +	}
>  }
>  
>  /* Load a new IDT into Xen.  In principle this can be per-CPU, so we
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ