| Message ID | 20261027141645.6f29298905d3.I6000d40c4b85e9f1d250353a956b89d457b9feab@changeid |
|---|---|
| State | New |
| Headers | show
Return-Path:
<hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=lists.infradead.org header.i=@lists.infradead.org
header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TT7XwFm1;
dkim=fail reason="signature verification failed" (2048-bit key;
secure) header.d=sipsolutions.net header.i=@sipsolutions.net
header.a=rsa-sha256 header.s=mail header.b=l6H8gN6i;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org
(client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;
envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;
receiver=patchwork.ozlabs.org)
Received: from bombadil.infradead.org (bombadil.infradead.org
[IPv6:2607:7c80:54:3::133])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4jDWQf637lz1yGt
for <incoming@patchwork.ozlabs.org>; Wed, 28 Oct 2026 00:23:22 +1100 (AEDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20210309; h=Sender:
Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:
List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:
Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Unsubscribe-Post:List-Owner;
bh=bIpToRL0fbHWfbIJWMt9D6UnlK9i1G0leIeGckXpbAo=; b=TT7XwFm1CkYg3t4ZhBvAcUgoHC
rdwUonHGHFhhDkUL5QpLG8uTq2cctudR2nmNgbVzDesY7eRVquDamGGSEXb2ZAOOuOaMGjVlB9EH6
2gKhRIQ6UWBBAAaUphfsvJRk82LmIytH7YFRP6lia2CLA2a5xIG5O8PJjx4QTSw2JOVnZ9mPd5npf
MPKRAEOVp8EaDNlxNY/llzHkp9bmceXZhXpKtrjsMi4CRniTCMzfdp+pvsxvQtkZWifeGToSUKGbj
nCvUbirBpK/0K338Euv1dWhr38B7dtcdCiT09fscSf4Cm7We6HJyOYPMVA18yqwpT2NLseAE8e65o
v0uR+E4Q==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux))
id 1xLh7v-00000004n9p-3Eck;
Tue, 27 Oct 2026 13:22:07 +0000
Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2]
helo=sipsolutions.net)
by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux))
id 1xLh7s-00000004n5F-00nn
for hostap@lists.infradead.org;
Tue, 27 Oct 2026 13:22:06 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version:
References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender
:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To:
Resent-Cc:Resent-Message-ID; bh=9Hm10st9wv4QdDZBf76+441K/YfNl0isA1f3k0BpoSY=;
t=1793107323; x=1794316923; b=l6H8gN6iImhJ0PVL/cNr5VJpfhzQA3/zbjI495LrM+5dtNQ
/zEq+ToHIoCfwf09pg7JpFc5G8jd2iirVT+LG7eaRjm9cOnigEmseNlcrKC3eEXRk2epXqcQIf/58
7hz+ZNozFa+GbFpWD12U/lQyvc3qI4pg5cwJvr1CFOmqvPAGwxPTte2v7dPgR5YZry7kfeqKg1dDG
woPK/pAn2Jc8v4bKu33qnXFBFYY3TC6Kgf7TvQIrK+Tmrv57ihnu7LHUTuL5xzYRR0aicPC+8FKCz
0jMv3GXQ4pBXFzfKpHZ+Yxy2f9q5nib5ntsftqXH1ZtHvbdZ0MggRz3hOJY1i7Ew==;
Received: by sipsolutions.net with esmtpsa
(TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256)
(Exim 4.98.2)
(envelope-from <benjamin@sipsolutions.net>)
id 1xLh7m-0000000D0dP-0R1o;
Tue, 27 Oct 2026 14:21:58 +0100
From: Benjamin Berg <benjamin@sipsolutions.net>
To: hostap@lists.infradead.org
Cc: Benjamin Berg <benjamin.berg@intel.com>,
Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Subject: [PATCH 01/21] common: Add offsetof and offsetofend macros
Date: Tue, 27 Oct 2026 14:16:47 +0100
Message-ID:
<20261027141645.6f29298905d3.I6000d40c4b85e9f1d250353a956b89d457b9feab@changeid>
X-Mailer: git-send-email 2.56.0
In-Reply-To: <20261027131645.1978718-23-benjamin@sipsolutions.net>
References: <20261027131645.1978718-23-benjamin@sipsolutions.net>
MIME-Version: 1.0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20261027_062204_325266_0F0172DE
X-CRM114-Status: UNSURE ( 8.67 )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -2.1 (--)
X-Spam-Report: Spam detection software,
running on the system "bombadil.infradead.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: From: Benjamin Berg <benjamin.berg@intel.com> Also move the
definition of offsetof into common.h as it is generally useful.
Signed-off-by:
Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Andrei Otcheretianski
<andrei.otcheretianski@intel.com> --- src/utils/common.h | 8 ++++++++
src/utils/list.h
| 6 ++---- 2 files chan [...]
Content analysis details: (-2.1 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 SPF_PASS SPF: sender matches SPF record
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
-0.1 DKIM_VALID Message has at least one valid DKIM or DK
signature
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's
domain
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.0 DMARC_MISSING Missing DMARC policy
X-BeenThere: hostap@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <hostap.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/hostap/>
List-Post: <mailto:hostap@lists.infradead.org>
List-Help: <mailto:hostap-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Hostap" <hostap-bounces@lists.infradead.org>
Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org
|
| Series |
Control Integrity Protocol (CIP) support
|
expand
|
diff --git a/src/utils/common.h b/src/utils/common.h index 076f26697a..34f58daf64 100644 --- a/src/utils/common.h +++ b/src/utils/common.h @@ -658,4 +658,12 @@ void * __hide_aliasing_typecast(void *foo); #define WPA_MEM_DEFINED(ptr, len) do { } while (0) #endif /* CONFIG_VALGRIND */ +#ifndef offsetof +#define offsetof(type, member) ((size_t) &((type *) 0)->member) +#endif + +#ifndef offsetofend +#define offsetofend(type, member) (offsetof(type, member) + sizeof(((type *) 0)->member)) +#endif + #endif /* COMMON_H */ diff --git a/src/utils/list.h b/src/utils/list.h index aa62c08811..d1d896b9c2 100644 --- a/src/utils/list.h +++ b/src/utils/list.h @@ -9,6 +9,8 @@ #ifndef LIST_H #define LIST_H +#include "common.h" + /** * struct dl_list - Doubly-linked list */ @@ -60,10 +62,6 @@ static inline unsigned int dl_list_len(const struct dl_list *list) return count; } -#ifndef offsetof -#define offsetof(type, member) ((long) &((type *) 0)->member) -#endif - #define dl_list_entry(item, type, member) \ ((type *) ((char *) item - offsetof(type, member)))