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>] [day] [month] [year] [list]
Date: Tue, 2 Jan 2024 14:55:34 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Dan Williams <dan.j.williams@...el.com>, "Rafael J. Wysocki"
 <rjw@...ysocki.net>
Cc: Dave Jiang <dave.jiang@...el.com>, Linux Kernel Mailing List
 <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>, "Rafael J. Wysocki"
 <rafael.j.wysocki@...el.com>, Yuntao Wang <ytcoode@...il.com>
Subject: linux-next: manual merge of the cxl tree with the pm tree

Hi all,

Today's linux-next merge of the cxl tree got a conflict in:

  lib/fw_table.c

between commit:

  4b3805daaacb ("ACPI: tables: Correct and clean up the logic of acpi_parse_entries_array()")

from the pm tree and commit:

  60e43fe5285e ("lib/firmware_table: tables: Add CDAT table parsing support")

from the cxl tree.

Dan, thanks again for the heads up.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc lib/fw_table.c
index c49a09ee3853,1e5e0b2f7012..000000000000
--- a/lib/fw_table.c
+++ b/lib/fw_table.c
@@@ -85,9 -98,27 +98,22 @@@ acpi_get_subtable_type(char *id
  	return ACPI_SUBTABLE_COMMON;
  }
  
- static __init_or_acpilib int call_handler(struct acpi_subtable_proc *proc,
- 					  union acpi_subtable_headers *hdr,
- 					  unsigned long end)
+ static unsigned long __init_or_fwtbl_lib
+ acpi_table_get_length(enum acpi_subtable_type type,
+ 		      union fw_table_header *header)
+ {
+ 	if (type == CDAT_SUBTABLE) {
+ 		__le32 length = (__force __le32)header->cdat.length;
+ 
+ 		return le32_to_cpu(length);
+ 	}
+ 
+ 	return header->acpi.length;
+ }
+ 
 -static __init_or_fwtbl_lib bool has_handler(struct acpi_subtable_proc *proc)
 -{
 -	return proc->handler || proc->handler_arg;
 -}
 -
+ static __init_or_fwtbl_lib int call_handler(struct acpi_subtable_proc *proc,
+ 					    union acpi_subtable_headers *hdr,
+ 					    unsigned long end)
  {
  	if (proc->handler)
  		return proc->handler(hdr, end);
@@@ -127,10 -158,14 +153,13 @@@ acpi_parse_entries_array(char *id, unsi
  {
  	unsigned long table_end, subtable_len, entry_len;
  	struct acpi_subtable_entry entry;
+ 	enum acpi_subtable_type type;
  	int count = 0;
 -	int errs = 0;
  	int i;
  
- 	table_end = (unsigned long)table_header + table_header->length;
+ 	type = acpi_get_subtable_type(id);
+ 	table_end = (unsigned long)table_header +
+ 		    acpi_table_get_length(type, table_header);
  
  	/* Parse all entries looking for a match. */
  
@@@ -168,9 -209,31 +197,31 @@@
  	}
  
  	if (max_entries && count > max_entries) {
 -		pr_warn("[%4.4s:0x%02x] found the maximum %i entries\n",
 -			id, proc->id, count);
 +		pr_warn("[%4.4s:0x%02x] ignored %i entries of %i found\n",
 +			id, proc->id, count - max_entries, count);
  	}
  
 -	return errs ? -EINVAL : count;
 +	return count;
  }
+ 
+ int __init_or_fwtbl_lib
+ cdat_table_parse(enum acpi_cdat_type type,
+ 		 acpi_tbl_entry_handler_arg handler_arg,
+ 		 void *arg,
+ 		 struct acpi_table_cdat *table_header)
+ {
+ 	struct acpi_subtable_proc proc = {
+ 		.id		= type,
+ 		.handler_arg	= handler_arg,
+ 		.arg		= arg,
+ 	};
+ 
+ 	if (!table_header)
+ 		return -EINVAL;
+ 
+ 	return acpi_parse_entries_array(ACPI_SIG_CDAT,
+ 					sizeof(struct acpi_table_cdat),
+ 					(union fw_table_header *)table_header,
+ 					&proc, 1, 0);
+ }
+ EXPORT_SYMBOL_FWTBL_LIB(cdat_table_parse);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ