From patchwork Sun Mar 10 02:05:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13588002 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A46C938FB6 for ; Sun, 10 Mar 2024 02:05:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710036359; cv=none; b=nxpNIFuxnmq50nLRuCKwaAzTc4c/mGdVg3UZ2xFFaAcnReDj51FKV4sdKRHMtJUtydXGx0soLG6waSErdvUbXjhzaJuB1bqp8arhizwfzBkPNBzm2tBuq0JeTnSR4pzVq9AoVqNEKMhr2tpLU3B0RhW5ZGLTYvfUs/Ij8KcTr8o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710036359; c=relaxed/simple; bh=ZWL6CpbSDkoHT9bHTSvzN2HvMNxtU4EmDh1g2wTW1tQ=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=o0MBg5+JCornX/0G1bJsrC3TR1HFZpkLrHd5VC7h520sPJdNNOpjhLwGWqBPGHw1QR1VhQJOS5QbDsYlJT1qDR1JuNaZizJ4qWff0KbGxatkoExj4yV0efaab3+WtiyopIVDRFG0/5e7KdQWuX8FK35woH09c0z24Z7+emaMnmE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=LlVbaPzg; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LlVbaPzg" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc6b26783b4so2564806276.0 for ; Sat, 09 Mar 2024 18:05:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710036357; x=1710641157; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=YcbTXn+GZg98Vv/BPAp4vRUPCLHW4NXMPZPsnrVHKvg=; b=LlVbaPzg3SZLzeFq+0upg5FmL3naDuQtNeVRRATjaVIr2Ao293gZStjMay0I88luJb REZWEdtqNVjNwvVaG85n0qI61sVPKbW71X5dQN4+gbn7LnuOkPQsUhzejb/2OF2y6b13 G7KKYmjBXkkujaU+hIErFoa0+02M3n4FD+uhgeaOZtQVLT4NjD4xAK1VcIR7DWWwdFP6 tOqhUI//yL8wD8dNPA6Q9gXmA5Xkc+LXyrE2mrZ+3M9kQm0LEN8W70xqqiVI/uaArFXI h5jGKEiwZOhtgM4DmUMMXktvWALZTepJakcPvqdRTTHbDTMQ1+lUtXQXtOkyznvsVOIl 07/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710036357; x=1710641157; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YcbTXn+GZg98Vv/BPAp4vRUPCLHW4NXMPZPsnrVHKvg=; b=u69S7z5VgqIVdesrPW1DPIwnN2JQiM1oVPuEnDe8Q3R85AUkXmiMu7nZ3J1qb3hHq/ c2U5HwthKKs+Q7Np5HGgJ/mHGCTcU8p4TfowJfEynRx/hHL0MCnM9uHP0E5CwHtxzjC0 RgjaD+ZdZI7wb78DIe/2pJCMHluvuYlhizIRb3EMzPhg/Z/BkQH/NDY8IpAuY5nExbC+ BH8AOMAPmfQSUMYJDK08pEoSrxe+R6H7EOv50lPM/Y1Db+ANktCWShUov/LVW2zmy5J2 kMpWwHIAuzplOUSg7e/64Cuc5INXzrkX/Wh8MihgRSZ4pcCa61yd2RCEJfqcJL4J1weJ rf7g== X-Forwarded-Encrypted: i=1; AJvYcCWa8/ego1Bb2eIvsoPil3fUssp8nmJXSWw2TDSeFSyL+lntDnPrbNdfX9D2on6l/vDEMCGuY5LcGMd88osFP8VJ2yYOdazVouzImYEHnWyF X-Gm-Message-State: AOJu0Yx6Mr6bwoqC/Zm1gU8veLHe0GFRMh+9s0xlkhPSrysoCdMoA/3d Gad+NJQpioOMaQLix53uTMR6ymDA+Judwikke5X6uFClbagyRNW5HPo2QRGoCXPhwIb+dG7hWuJ VZDPIEQ== X-Google-Smtp-Source: AGHT+IFh+Pg/vPJRzp3HY0EtlqFR8c7TCYxcMdD2zR5o/IcNrp2JWb8OldTiph3/7rY2TpwrRD4D5cJe7AWq X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:a63d:1b65:e810:3ad3]) (user=irogers job=sendgmr) by 2002:a05:6902:b06:b0:dc6:b982:cfa2 with SMTP id ch6-20020a0569020b0600b00dc6b982cfa2mr183760ybb.8.1710036356770; Sat, 09 Mar 2024 18:05:56 -0800 (PST) Date: Sat, 9 Mar 2024 18:05:05 -0800 In-Reply-To: <20240310020509.647319-1-irogers@google.com> Message-Id: <20240310020509.647319-11-irogers@google.com> Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240310020509.647319-1-irogers@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Subject: [PATCH v1 10/13] asm-generic: Avoid transitive dependency for unaligned.h From: Ian Rogers To: Arnd Bergmann , Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Ian Rogers , Adrian Hunter , Paolo Bonzini , Shuah Khan , Kees Cook , "Gustavo A. R. Silva" , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andrew Morton , Liam Howlett , Miguel Ojeda , Will Deacon , Mark Brown , David Laight , "Michael S. Tsirkin" , Shunsuke Mie , Yafang Shao , Kui-Feng Lee , James Clark , Nick Forrington , Leo Yan , German Gomez , Rob Herring , John Garry , Sean Christopherson , Anup Patel , Fuad Tabba , Andrew Jones , Chao Peng , Haibo Xu , Peter Xu , Vishal Annapurve , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev unaligned.h uses types from linux/types.h such as u64, but doesn't directly import linux/types.h. This can cause breakages when the declarations of the types is reliant on a transitive dependency and the dependencies change. Add the missing header file to avoid this. Signed-off-by: Ian Rogers --- include/asm-generic/unaligned.h | 2 ++ tools/include/asm-generic/unaligned.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h index a84c64e5f11e..0cbe118e25db 100644 --- a/include/asm-generic/unaligned.h +++ b/include/asm-generic/unaligned.h @@ -2,6 +2,8 @@ #ifndef __ASM_GENERIC_UNALIGNED_H #define __ASM_GENERIC_UNALIGNED_H +#include + /* * This is the most generic implementation of unaligned accesses * and should work almost anywhere. diff --git a/tools/include/asm-generic/unaligned.h b/tools/include/asm-generic/unaligned.h index cdd2fd078027..768cafe6702e 100644 --- a/tools/include/asm-generic/unaligned.h +++ b/tools/include/asm-generic/unaligned.h @@ -2,6 +2,8 @@ #ifndef __ASM_GENERIC_UNALIGNED_H #define __ASM_GENERIC_UNALIGNED_H +#include + /* * This is the most generic implementation of unaligned accesses * and should work almost anywhere.