[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 0/3] Add stack protector


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Thu, 12 Dec 2024 00:13:33 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=axs4QJ77roqbYqfnnAkUbciJgFdMd1ErBhfaw24jMAg=; b=EC3iKvKoIVwbkAUGyqaena/jIcKwyrJKUsjk2tsr9YeanTTm08lWnky7+ZKSAXy4py74Y3dcGYD0RI/jls6HDM+0u4u5NKYTahs0CtmCB++IVLhhQWI3CSiyV0/OEVKKbjqtwsOsCOc17n9rzgKD4oyABlbN2pRC0sXCTBIJ0uoIkWTRZkX/qpV5Ni7AQ8rKQNTrX/AFqIQbZjm5K6w0MbLGixzWJAGWxjUAgxjcZ3Limwv1j8MapstsaR69j4ZsiJ4rSFvPlHh2ZVl6DqpyuQcnUeSWCpqGyGazYwjtP7uVMU0HY2EC6yswGlYqgfhjD4JUTEJ+crWbvxPf8OpPlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=os26MnnPP9Ybn7PkGV4f/jUb0oLy1U+s6rutc5rtBQHdrjZnYW59s41IzILAthYGumAynAdbbyoAe+fM0ZpIp1TdlvYg5C2AbpylTLP8m5jCDNvcoEN1dyhX54ge10eHuLgwTTv1KYIq9JQl6XWZZLRoTE4Aef56jLE2G2D5gNzdeR5VIbRCw7S6r4S7XNWwxaW1leACqyh24xoxIx8JxMItVu2kfOSy2q0eRxERnx6eBMpSycYngRykex2LhGbi2Cquap++HR+JaoA/2lb34NQMH3uXjdqL29w5UeZUczOo2FduGUl/wsdR3z5M6meK/Q6YPp7xQLRyIa8ccQRL6A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Dec 2024 00:13:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHbS3EDPfnUwIrgWUmXfq3bo38udA==
  • Thread-topic: [PATCH v3 0/3] Add stack protector

Hello Jan,

Jan Beulich <jbeulich@xxxxxxxx> writes:

> On 11.12.2024 03:04, Volodymyr Babchuk wrote:
>> Both GCC and Clang support -fstack-protector feature, which add stack
>> canaries to functions where stack corruption is possible. This series
>> makes possible to use this feature in Xen. I tested this on ARM64 and
>> it is working as intended. Tested both with GCC and Clang.
>> 
>> It is hard to enable this feature on x86, as GCC stores stack canary
>> in %fs:40 by default, but Xen can't use %fs for various reasons. It is
>> possibly to change stack canary location new newer GCC versions, but
>> this will change minimal GCC requirement, which is also hard due to
>> various reasons. So, this series focus mostly on ARM and RISCV.
>
> Why exactly would it not be possible to offer the feature when new enough
> gcc is in use?

It is possible to use this feature with a modern enough GCC, yes. Are
you suggesting to make HAS_STACK_PROTECTOR dependent on GCC_VERSION for
x86 platform?

-- 
WBR, Volodymyr


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.