[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/cet: Support cet=<bool> on the command line
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Fri, 29 Apr 2022 10:13:00 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DGh/0byfFRU8xIAivoRv58VSMlQk9CbyKKjdEbA8ltc=; b=Rej+ccy/s+xkhwNoi2LlHlmzXGy3FIFKLSXcKKV83zk8JcY8OfwYEgd+4FA3S+/eXVtWahtL23bMcIkfOeRbK1sGPOcTLFRApk3lp8d4o8HhsnQ/NLuunEEytIo9kGg0y8Bbl6p298l6SCG50J3Cx6lsszivDgdx2bbTW2N+kjYFm+FuYno6O3BDcjxeHFIHpQfU7nWulAbX6fGbJgbzX2tWe52CGoTtyBAv3TC9cAXeQU3qW5aVnd9d1IgayO7i2ZhYVlrDWcTad16PD+ugeytT8Pzpjbzrpo6FtKMLVrAQe3HQz4wu7lqEe78Gx5QAvMPCFq0X6LXuITMC5hkFdg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TpbhQn83+6ZaWx2h7X5cLGGRcxpSFXjbyNfGrFGLPA3uSwsMwk4i7inlJOYJduzxbpFg23fDdeEPshwmwI8kz/+iHNAo0fuzCRlgt8TqLBx5DlCuIzsqjCMrcv6b4/BGCXcgdxG8FAf5BhEyv5cKho6p3xWgGEE4tSMML860wGHzR05n4j044xcP5Qz5ZvtFCJ1VB2HR+e9+PbI534WIT4OMigGNZSQ0NkYakk7hxo+5dwCu4R9Amuv1M6pfCAELEWZdtdtaxbugcDWRfm9ueOOSgFYg+6Qs47fGnsKNqMu6hxUHKmkvz066Vlpyj40NbWzNEq5yDPdF8/48oM+1+g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 29 Apr 2022 10:13:14 +0000
- Ironport-data: A9a23:orY6U6nWKtKGDgtcPaeijSbo5gzyJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xIfWWiGO/fZMTT0L490a42/ox5Q6JbXz4dgHldl+Xw0QiMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EsLd9IR2NYy24DlWVLV4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYURlyL5zspOchYwBYIzhEYYBFybqXGC3q2SCT5xWun3rE5dxLVRlzGLJCv+F9DCdJ6 OASLy0LYlabneWqzbmnS+5qwMM+MM3sO4BZsXZlpd3bJa9+HdafHOOXuJkBhGxYasNmRJ4yY +IwbzZ1YQuGSBpIIloNU7o1nfuyh2m5eDpdwL6QjfVvuTSLl10quFTrGNmLauKEZYYPokWnh jKZ+ETlKTocZOXKnFJp9Vrp3IcjhxjTWogfCbm5/f5Cm0CIyyoYDxh+fUS/iem0jAi5Qd03A 1wZ/G8ioLY/8GSvT8LhRFuorXicpBkeVtFMVeog52mwJrH85g+YAi0BUWRHYdl/7MsuH2Vyj RmOgs/jAiFpvPuNU3WB+7yIrDS0fy8IMWsFYixCRgwAizX+nLwOYtv0Zo4LOMaIYhfdQ1kcH xjiQPACuogu
- Ironport-hdrordr: A9a23:lWGCEqHlWSrLp8XfpLqFuJLXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskdrZJkh8erwW5Vp2RvnhNFICPoqTM2ftW7dySWVxeBZnMffKljbdxEWmdQtsp uIH5IeNDS0NykDsS+Y2nj4Lz9D+qjgzEnAv463oBlQpENRGthdBmxCe2Sm+zhNNW177O0CZf +hD6R8xwaISDAyVICWF3MFV+/Mq5ngj5T9eyMLABYh9U2nkS6owKSSKWna4j4uFxd0hZsy+2 nMlAL0oo+5teug9xPa32jPq7xLhdrazMdZDsDksLlWFtyssHfsWG1SYczEgNkHmpDo1L/sqq iUn/4UBbU215oWRBDsnfKi4Xi67N9k0Q6e9bbRuwqenSW+fkN7NyMJv/MmTvOSgXBQw+1Uwe ZF2XmUuIFQCg6FlCPh58LQXxUvjUasp2E++NRjxEC3fLFuIYO5l7ZvtH+90a1waR7S+cQiCq 1jHcvc7PFZfReTaG3YpHBmxJipUm4oFhmLT0AesojNugIm0UxR3g8d3ogSj30A/JUyR91N4P nFKL1hkPVLQtUNZaxwCe8dSY+8C3DLQxjLLGWOSG6XXp0vKjbIsdr68b817OaldNgBy4Yzgo 3IVBdCuWs7ayvVeLuzNNEhyGG+fIx8Z0Wb9ihz3ekIhlSnfsubDcSqciFcr+Kw5/MCH8bcR/ G/fJpLHv6LFxqbJbp0
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYWt1N9h0ywB7VLke90Ph7I2J/jK0FG36AgAGSMAA=
- Thread-topic: [PATCH] x86/cet: Support cet=<bool> on the command line
On 28/04/2022 11:13, Jan Beulich wrote:
>> --- a/xen/arch/x86/setup.c
>> +++ b/xen/arch/x86/setup.c
>> @@ -117,7 +117,20 @@ static int __init cf_check parse_cet(const char *s)
>> if ( !ss )
>> ss = strchr(s, '\0');
>>
>> - if ( (val = parse_boolean("shstk", s, ss)) >= 0 )
>> + if ( (val = parse_bool(s, ss)) >= 0 )
>> + {
>> +#ifdef CONFIG_XEN_SHSTK
>> + opt_xen_shstk = val;
>> +#else
>> + no_config_param("XEN_SHSTK", "cet", s, ss);
>> +#endif
>> +#ifdef CONFIG_XEN_IBT
>> + opt_xen_ibt = val;
>> +#else
>> + no_config_param("XEN_IBT", "cet", s, ss);
>> +#endif
> There shouldn't be two invocations of no_config_param() here; imo if
> either CONFIG_* is defined, use of the option shouldn't produce any
> warning at all.
It's this, or:
if ( (val = parse_bool(s, ss)) >= 0 )
{
#if !defined(CONFIG_XEN_SHSTK) && !defined(CONFIG_XEN_IBT)
no_config_param("XEN_{SHSTK,IBT}", "cet", s, ss);
#endif
#ifdef CONFIG_XEN_SHSTK
opt_xen_shstk = val;
#endif
#ifdef CONFIG_XEN_IBT
opt_xen_ibt = val;
#endif
}
I'm not terribly fussed.
~Andrew
|