Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1065443imm; Wed, 15 Aug 2018 10:46:51 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzOItG0XxPWNuraANp7f0PigjNSxhZytSLPd4JNmaPpue2Hkj0cg/EJG5ZUofMq+A0MyV+A X-Received: by 2002:a17:902:ba88:: with SMTP id k8-v6mr25312248pls.259.1534355211177; Wed, 15 Aug 2018 10:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534355211; cv=none; d=google.com; s=arc-20160816; b=LHZFWH6cK9dJ+YpuWSAsuA3ChMmpQ5dXQGqq0ufSgqsByjZvbvdXukms6DMq2chdur Ia4W+cpupYIzL0RVkmcyc+kJTMCsapPgUYg0J2Wk7xhEuPur11e+ea0wlk3ypadJBZMF Hc0ZgZ31eCmbUsqPLcRxEXYbu0PfV5ocEMYUB1w9N5BEjZ4mA7iWa8xvX5KNJHMUyDNk epSJdKWWZOgdr1FjBCPSdU4JWzFsdZztumFPb1GG5AI2fUSpWUNuAXIbg2z2ULBsoALN /0oqpKFzEAbO00f9uuNqtfqdq6BeFE2Sd4ulRETrITwhZDMGYFFBJsgi9DWKKONSp2RM laSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=gvkXHUkutAbxHKXWFMOvjhVg9DMQjImVZPzp/JHSpqg=; b=ypsgdeduWayxx6CmrKZhuZ135EU/Me36472ovg0+mnfCWRzKs66ovMh4QoRa+j+Dmb PF5j3HwuJLzNou80mCxpzXNbp+FNwU7RnATTZk8YQxhelv4gUo5YbryxQq0kPkcYqCQQ hXmhW/q5no+gnN8DuCdYvbaGJ3PBqozOPgfA/DK9u2IpC/RME54b6Q+Dq7YFnFIC0glc SGXDKadTXvBQeR/8JIzym7gJU1zKfIf4BXT5X8aFsoiHVbMSYm4X+nD0xIe1lFpSOGT7 dwlBXHwmQNTEM/XGM4edTxsIIHoa9qhgjxcBxPu69lavfmMfHLLQdMBt1Ea0WHe9ncPc ZEGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="f4/UCATN"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1-v6si26380525pfc.337.2018.08.15.10.46.35; Wed, 15 Aug 2018 10:46:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="f4/UCATN"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729794AbeHOUiz (ORCPT + 99 others); Wed, 15 Aug 2018 16:38:55 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:39359 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbeHOUiy (ORCPT ); Wed, 15 Aug 2018 16:38:54 -0400 Received: by mail-it0-f67.google.com with SMTP id g141-v6so3023593ita.4 for ; Wed, 15 Aug 2018 10:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gvkXHUkutAbxHKXWFMOvjhVg9DMQjImVZPzp/JHSpqg=; b=f4/UCATN0PR9DDqGemIkmc1A3QPm0KMze/c7/Up7YyREU9lDPWmrZs4PcWldLw0it2 ASwmPNaqvFxm0oBwG4rUI73QS6QkZX4EZMwGstyBM00sLv1wjcefKwh5+g8NaX5QP6wE uqTmuwLmVBf4llZG0oqeD/dkY9CwvXx1tzxi8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gvkXHUkutAbxHKXWFMOvjhVg9DMQjImVZPzp/JHSpqg=; b=QOMqVeGWL0AeprZ4rVoSKLNQbghbljxqMWGJW1wd//ASESg3JXc026o62uVdBU7ito uywoPDk5a5M1Lm6VVuEdzQB3SfWPOB4186L0dik9zCDEKz5h8MZqOtfzGcOZhxKiXPRL ua3pLo7FTgDOte9ybgOUSM9DvSUdVLlAEYrVE0dt8inp0GBcgXFRn9ZxpzhpFFC3N3Ae Ljquq4XKmButO53OZ0sKkZ6BvwRsQ9FvFpuBWbhpAMqKTXx37zoSPgVmmFcwiNFhY2xg thxRu4f7WvvrawL3n3s8dlGJQinMPxQM1yaouvzVQS9mSF4KRBMysglf4PS7d7hlc2J8 50Bw== X-Gm-Message-State: AOUpUlE+i5Ag6vDebLhK3IiVQKQceqbfBhzLDxoG4J6s7/31B65EkJv7 qi6rxo+M3YtZ/waubF4B4DHk+HYwq0J8H0m4W8+WxmGq X-Received: by 2002:a24:5002:: with SMTP id m2-v6mr18461050itb.16.1534355147838; Wed, 15 Aug 2018 10:45:47 -0700 (PDT) MIME-Version: 1.0 References: <20180815100053.13609-1-yannik@sembritzki.me> <654fbafb-69da-cd9a-b176-7b03401e71c5@sembritzki.me> In-Reply-To: <654fbafb-69da-cd9a-b176-7b03401e71c5@sembritzki.me> From: Linus Torvalds Date: Wed, 15 Aug 2018 10:45:36 -0700 Message-ID: Subject: Re: [PATCH] Fix kexec forbidding kernels signed with custom platform keys to boot To: yannik@sembritzki.me Cc: David Howells , Vivek Goyal , Thomas Gleixner , Ingo Molnar , Peter Anvin , "the arch/x86 maintainers" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 15, 2018 at 10:27 AM Yannik Sembritzki wrote: > > Would this be okay? No, I meant that it would have to go into the proper header files, and also be used by verify_pkcs7_signature() and pkcs7_preparse() etc, so that you could actually grep for this, and understand what it does. Right now you have to know about the magic. Or follow the call chain down and look, like I did. Side note, it should probably be #define TRUST_FULL_KEYRING ((struct key *)1ul) instead, so that it is also type-safe (using "void *" means that it would work almost anywhere, but it really should be a "struct key *". And I'd like to see a comment from the kexec people too, I guess. Linus