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, 24 May 2022 22:27:44 +0800
From:   Chen Zhongjin <chenzhongjin@...wei.com>
To:     <madvenka@...ux.microsoft.com>, <jpoimboe@...hat.com>,
        <peterz@...radead.org>, <mark.rutland@....com>,
        <broonie@...nel.org>, <nobuta.keiya@...itsu.com>,
        <sjitindarsingh@...il.com>, <catalin.marinas@....com>,
        <will@...nel.org>, <jamorris@...ux.microsoft.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <live-patching@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2 05/20] objtool: Reorganize ORC types



On 2022/5/24 8:16, madvenka@...ux.microsoft.com wrote:
> From: "Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>
> 
> The ORC code needs to be reorganized into arch-specific and generic parts
> so that architectures other than X86 can use the generic parts.
> 
> orc_types.h contains the following ORC definitions shared between objtool
> and the kernel:
> 
> 	- ORC register definitions which are arch-specific.
> 	- orc_entry structure which is generic.
...
> diff --git a/include/linux/orc_entry.h b/include/linux/orc_entry.h
> new file mode 100644
> index 000000000000..3d49e3b9dabe
> --- /dev/null
> +++ b/include/linux/orc_entry.h
> @@ -0,0 +1,39 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Copyright (C) 2017 Josh Poimboeuf <jpoimboe@...hat.com>
> + */
> +
> +#ifndef _ORC_ENTRY_H
> +#define _ORC_ENTRY_H
> +
> +#ifndef __ASSEMBLY__
> +#include <asm/byteorder.h>
> +
> +/*
> + * This struct is more or less a vastly simplified version of the DWARF Call
> + * Frame Information standard.  It contains only the necessary parts of DWARF
> + * CFI, simplified for ease of access by the in-kernel unwinder.  It tells the
> + * unwinder how to find the previous SP and BP (and sometimes entry regs) on
> + * the stack for a given code address.  Each instance of the struct corresponds
> + * to one or more code locations.
> + */
> +struct orc_entry {
> +	s16		sp_offset;
> +	s16		fp_offset;
> +#if defined(__LITTLE_ENDIAN_BITFIELD)
> +	unsigned	sp_reg:4;
> +	unsigned	fp_reg:4;
Are sp_reg & fp_reg & end needed? I noticed that they are not used in
reliability checking.

> +	unsigned	type:3;
> +	unsigned	end:1;
> +#elif defined(__BIG_ENDIAN_BITFIELD)
> +	unsigned	fp_reg:4;
> +	unsigned	sp_reg:4;
> +	unsigned	unused:4;
> +	unsigned	end:1;
> +	unsigned	type:3;
> +#endif
> +} __packed;
> +
> +#endif /* __ASSEMBLY__ */
> +
> +#endif /* _ORC_ENTRY_H */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ