From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (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 8148226F2B9 for ; Mon, 12 Jan 2026 17:40:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239627; cv=none; b=HP5ENdKs9V1NhxTcIgfS4WjmWkgWU3kf2YnTXFMq12+B1Ju9/CCSP6c7TIZu7b+DqvFPRROELTUXp3xcae8Q6JbaYSBVhxp4a7KmarcNo/+1/QyN5dHiwdgINiZd1m8WPIZLzqxOHcEpZGwxUrZyQjiPgwyrtyd7q38l2wPpa0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239627; c=relaxed/simple; bh=e465do8mTCSq6jCcBPw82MmLIgs8TWi8DhwOetVjcuk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=r4vwqbY+6Lrz6XMTR3ZjO6OSStITE8elLqDzQQxZiqcROvENjo6zhOpdOtwaraPKiaAPC+HhW2rYlnUoDAdaGGi4YN85ZGXxppTcfOT8CuHD5E00el4yzSeNtQAhqH6gOZAT48xr/l/v/eO4obIo3nI4boW6UbklnEf6G26O+kk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iJmbeRXA; arc=none smtp.client-ip=209.85.215.201 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--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iJmbeRXA" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-c55434c3b09so1712605a12.2 for ; Mon, 12 Jan 2026 09:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768239626; x=1768844426; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=QA8lrtEsLeAJYV3cxgMyR5xiZ5dk8thBjeZcy3q6xNM=; b=iJmbeRXA9XanKOvF8OF3S6JyuZRyAkY8XkALItbasTu/Iqdj+CKUa1Life6cFdlxta Qs+pyRbXl5ZWW1k/uAD6qy7V18uniUlz2wWXj04vJmDf54IOWuJbYNovPhZ5HIOdOm22 19F8QzjAs2TUNMvKVJf4vt4XIJDyoSEBvAswj7aT3OCMBavwqUpQg8+CpDwhnOg++wTb nH3F10tWYuzmIsMIA3OtyaLqQkA99ZC4E4f5X5uoVMGkVn7tELIxfE8QrLyVuLJ7mh8H /MeejwjoKtYH/Rkn+eovWQr5HjwGULbKs7N5NXEd32ti5zuC0qRpVbKfA2ycDKXJuJpk myMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768239626; x=1768844426; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QA8lrtEsLeAJYV3cxgMyR5xiZ5dk8thBjeZcy3q6xNM=; b=uxxPowIDzMGB4S71E9f2H3QkdmYuTIvAJuWPtrgyIn2m/chWNYFqqBXI624iXm/2Xn urWD5xgFgsTnOkRRGaLgx8d6ah+2gP/kVVLSqty4xu3GH6t70eA18NUpVBIGHiSswxe+ iYJ690v0eY63xkKR9itp1j/kbLF65Adf11qfYTKc9eWR9A3TXU6tSgnfsdpelG1kD6/R Dp6gfFJNBFHXYGOurdr7Z+qQcq/BtQzOycfGTOPeLd3RluRf4AICgRDrsEO4eH84EHWy lso1j6/dxyXuDBFyUkEUG5h3rjsTEo+k5ZfNaevwSkyK/KVJIGEfKVn6Kr3yEHDQxvp3 +A4g== X-Forwarded-Encrypted: i=1; AJvYcCWOHqakq9rTpNcgPPsFRB38Z+mK7Y15ikrre79huosjQU1PQwzLzr1OCwRdqB0W0nJydsFZ6VEhSTvaPJ0=@vger.kernel.org X-Gm-Message-State: AOJu0Yxbl06RCYOk8DOGQ1tNeL/e8FtDaiNcyeGm4z0irGsocoGoQ8xg wEiDQCVfLD88lByVnmUqCC5IwabcPZZn2zKOuCF92tew3NSv4RiNnWLv24+vUDBU/7WoArNy0ij N8NCYOw== X-Google-Smtp-Source: AGHT+IGlKf57XaO5h7Wqp/jcsHy/f04+Z8QyhdclzNa9x+ohD4YNMeq4TjEPmB09McrkcVJued0fiiORTYo= X-Received: from plbaz12.prod.google.com ([2002:a17:902:a58c:b0:29e:fe54:8944]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:2450:b0:35c:dfd6:6acb with SMTP id adf61e73a8af0-3898f91cec4mr16610770637.30.1768239625788; Mon, 12 Jan 2026 09:40:25 -0800 (PST) Date: Mon, 12 Jan 2026 09:38:44 -0800 In-Reply-To: <20251121190514.293385-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251121190514.293385-1-seanjc@google.com> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Message-ID: <176823924074.1374169.120221674826221123.b4-ty@google.com> Subject: Re: [PATCH v2] KVM: x86: Enforce use of EXPORT_SYMBOL_FOR_KVM_INTERNAL From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Gao Content-Type: text/plain; charset="utf-8" On Fri, 21 Nov 2025 11:05:14 -0800, Sean Christopherson wrote: > Add a (gnarly) inline "script" in the Makefile to fail the build if there > is EXPORT_SYMBOL_GPL or EXPORT_SYMBOL usage in virt/kvm or arch/x86/kvm > beyond the known-good/expected exports for other modules. Remembering to > use EXPORT_SYMBOL_FOR_KVM_INTERNAL is surprisingly difficult, and hoping > to detect "bad" exports via code review is not a robust long-term strategy. > > Jump through a pile of hoops to coerce make into printing a human-friendly > error message, with the offending files+lines cleanly separated. > > [...] Applied to kvm-x86 misc, thanks! [1/1] KVM: x86: Enforce use of EXPORT_SYMBOL_FOR_KVM_INTERNAL https://github.com/kvm-x86/linux/commit/fc4d3a6558af -- https://github.com/kvm-x86/linux/tree/next