From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A37DC4CECE for ; Wed, 11 Mar 2020 17:21:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 100AD20752 for ; Wed, 11 Mar 2020 17:21:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LWtgoClL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hBmJYWBf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 100AD20752 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iJ9Cr8L82EGFXBYO5pKot2MHHmmMkCCylaatzvS4VXo=; b=LWtgoClLfXFUWk qltLy8NMrGdtldLa/Y94D5xv77wGLzqokVFhN5FUM4y5vkzdyktiyY3UpKKXJKPg2T1IJMAd9Q1QS 0CD3riT0I+YKQNmBIMMF/BUH0h2yhKMcBsPUfARH45H7XSve60CyYJ6m2neNmX2rYQLWX4Ln2jESy TRL6M1tocj+8gz7aYZPZ4novKWIIDjfkDYGG0k0gNumqoFuX7GDPqzjYhPEYbvc5qGlgYjpsf4eoC I3/EmgkOcumv4QwFVBvjGprwn7uzTorJXvVgd2mmkJdwJSJWVjL6LJVf3gvAcdGvyhDyWkmFk9stI yY60QYfDWWDmMK9K/zcQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jC52s-0002id-Dr; Wed, 11 Mar 2020 17:21:26 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jC52p-0002hA-F1 for linux-arm-kernel@lists.infradead.org; Wed, 11 Mar 2020 17:21:24 +0000 Received: by mail-pl1-x644.google.com with SMTP id d9so1388784plo.11 for ; Wed, 11 Mar 2020 10:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=48QMmtUizH1thzm0jNujCj845cQ2EXOxCkSOb8ufm7M=; b=hBmJYWBfK3SX/U+Wa4lao0YnvSduvT0NJG7V47ocA+P7MefK8eMomjpe/u+lfXRu15 xn2lsBH74aGiSSYjBxFvcQm5wdnJipqlMRNpIOXkiI+AmYbIVDCGXMTkE3S2azr3V/iG 82LN/7oe0JmAHSXXbhgxIZZvf2n5P7G6lOJCw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=48QMmtUizH1thzm0jNujCj845cQ2EXOxCkSOb8ufm7M=; b=N9dgwpwAbSrrneDfwJSs/QSgxtBXFlqaW+pMSe2fh88rFkZ7xE2YLlmcAISMtoJhWz UpN3jqNWCTKkrTJgm+J4p4nMS39JNf4q5CWGrtXY57ZeqvfJ6AIlHMac0scZE5rb+IeA NfAQ9BNROkVVFL5isjT+3d5ylUOsjE++9ZlwtuezjLYFgjOh68C91D9R/aKOmU9omVmV 8KSHxrDNVwXVBJGZSa/wqmyHz6ylk8sJGLVF+kCKbsxVUpXZkr6zxELxnyWsZyI2KbUC bNYg8sfGu6B5ODD9ci6UK7LGogENxeS1LWB8m68e3xUUD6PzfCFv9J4V/CAU8tIv1nIM BZ9w== X-Gm-Message-State: ANhLgQ2SLRZF32TLxUUrjNFhZn/+eYPqTGkgIktSTWJjUIpb4lGR3Fz/ Wvgyp+XRIyfKH3yBBNzD7IyBXA== X-Google-Smtp-Source: ADFU+vtS/zoEiYrbfBlqHQlR3ycd/w8ksv3ZJl14F8NXwUqH9zruMZSDylPWrhrRh1sygoxYbEZgXg== X-Received: by 2002:a17:902:8509:: with SMTP id bj9mr4163017plb.123.1583947282062; Wed, 11 Mar 2020 10:21:22 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q187sm51566754pfq.185.2020.03.11.10.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 10:21:21 -0700 (PDT) Date: Wed, 11 Mar 2020 10:21:20 -0700 From: Kees Cook To: Guenter Roeck Subject: Re: [PATCH v3] ARM: smp: add support for per-task stack canaries Message-ID: <202003111020.D543B4332@keescook> References: <20181206083257.9596-1-ard.biesheuvel@linaro.org> <20200309164931.GA23889@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200309164931.GA23889@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200311_102123_504493_838C3AAF X-CRM114-Status: GOOD ( 18.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Ard Biesheuvel , kernel-hardening@lists.openwall.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Emese Revfy , Laura Abbott , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 09, 2020 at 09:49:31AM -0700, Guenter Roeck wrote: > On Thu, Dec 06, 2018 at 09:32:57AM +0100, Ard Biesheuvel wrote: > > On ARM, we currently only change the value of the stack canary when > > switching tasks if the kernel was built for UP. On SMP kernels, this > > is impossible since the stack canary value is obtained via a global > > symbol reference, which means > > a) all running tasks on all CPUs must use the same value > > b) we can only modify the value when no kernel stack frames are live > > on any CPU, which is effectively never. > > > > So instead, use a GCC plugin to add a RTL pass that replaces each > > reference to the address of the __stack_chk_guard symbol with an > > expression that produces the address of the 'stack_canary' field > > that is added to struct thread_info. This way, each task will use > > its own randomized value. > > > > Cc: Russell King > > Cc: Kees Cook > > Cc: Emese Revfy > > Cc: Arnd Bergmann > > Cc: Laura Abbott > > Cc: kernel-hardening@lists.openwall.com > > Acked-by: Nicolas Pitre > > Signed-off-by: Ard Biesheuvel > > Since this patch is in the tree, cc-option no longer works on > the arm architecture if CONFIG_STACKPROTECTOR_PER_TASK is enabled. > > Any idea how to fix that ? I thought Arnd sent a patch to fix it and it got picked up? -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel