Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4884863ybb; Tue, 24 Mar 2020 07:07:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvEkGQjrLUvEVJq40FbSfVU6UHXIjypYVMbi4CD2LpkwwYzWroItNWDvaucwa3/ErzttnFM X-Received: by 2002:a9d:6009:: with SMTP id h9mr8495768otj.168.1585058869809; Tue, 24 Mar 2020 07:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585058869; cv=none; d=google.com; s=arc-20160816; b=CPWoFyAB7ZqoJysHWbMmWEn9rc8tmRNT83h336/KX+xiiZWEYJfaGilUXLFqYl4xoi gnsOJ6945lyDn37FXS/9lGECaciUCpxG7OiNsLW1VevHjqdjR09QTQYV7EFLUvFte1Bg hYrVJeJDoKhIvYWq49jeYJ+wQJB+TL3PU+H6aGsqPZ1VLQM53cQi9ws8s56mce8Yo+jT ElUp1JYueFXLO8sJbZKzztlManE6WHMAl2lwVl7k2RNDGSG8gJwQZuze6Vw3cfJm33Xp BBvANdDVV1ZJPchNhwlcL1csbStI/BsOBOPaQ17oOrYioCidYxHspDicvqADmoUcnPpo Ax0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=HBdtxiA4456RzmVM1qUhdnGD6aL9Y+FSjlt2D4+kbQs=; b=TczpLdtNHpdt/EZF1cgvrJKzkpBttnfVd6utfzUrGI8QSh2yp1p0Udb1g9+4LRIqwb jT/zkYzivoBwNUJce34S66TTnQaJGJ0UpHulFUvxwJ0Ev9AI9MbZEB8SJm/lfUsJp9Yn NEjMRJMLmvoEmWHJloHUrSrN2vc7eREadD8QeP8DCjHsGcrp3RpmqSrPDGmMe8T4eZ92 b64KdesmCs6W6ioflmKWOmzVyy7H9m3dzjobWgxdZC8QYqzU/GM4j6kSUv+t4SqslhLB sLlmEnYxCZekJBpE3ArbE9AX4gG6ZXNsp3OD736NKPefOppesTrJRYBdt1tOBWSVQkW0 tHyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nyDGk1Qh; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h81si9027043oif.20.2020.03.24.07.07.35; Tue, 24 Mar 2020 07:07:49 -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=@google.com header.s=20161025 header.b=nyDGk1Qh; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727556AbgCXOGq (ORCPT + 99 others); Tue, 24 Mar 2020 10:06:46 -0400 Received: from mail-wr1-f74.google.com ([209.85.221.74]:52710 "EHLO mail-wr1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727111AbgCXOGq (ORCPT ); Tue, 24 Mar 2020 10:06:46 -0400 Received: by mail-wr1-f74.google.com with SMTP id d17so9293499wrw.19 for ; Tue, 24 Mar 2020 07:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:cc; bh=HBdtxiA4456RzmVM1qUhdnGD6aL9Y+FSjlt2D4+kbQs=; b=nyDGk1QhgGJP6JXVdgaZp480a9DwV4Kskd/e1Sx5LQJYHVpsMYpLrW8zWyfy753to1 qWclQhv0rsC3MFp3Jn6CYCcRMo0XhPSjtH+Vsnf+vpqMYWe4pekvq7MSl1kw3jeR0w8W N1yS009CdCui87ZV/h3KmStNu5WCzWIyH82Eu8IDlZNLXxnw1ymubHZLGJfYCGkhotHY GG/xqbTXHHxYl3uM8yl6QGokbFKvxvrUo+AI7rNb9VK0xL+37UYvD70rO6ZiCens/g+1 OuNug82g1e6/IzY+oJBEbswAucS5iDGrqos2TBQGUmpZWaLBP+PcC2Zwzqk3xBsp011i 31Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:cc; bh=HBdtxiA4456RzmVM1qUhdnGD6aL9Y+FSjlt2D4+kbQs=; b=bhUpug6xowCVTlWS1G9UE3AxtJ3ftsIxTYLgVQg5HkgpVbRml2xBXnVLt9bKlLgSBH kGfcyPgD93PwVEEqM5ZCaR0MCExeEtQtMSZWNAcoIiHPZRoLPbFz6aEGpUHbCBg0DaSV 4xKVC2hakZEIBY0WfP9aJRITqEeEA11TjUEOfXU5J4cERRM4Ddb5QvFrPvf8Wy5RuaSL g/8Jn0SyUne8cw0pkWaQ3Bc765bC8m1StQltHU2bWVo9MsTuDxeZ0f9IglWtJYQ0JQbL TW5kIhDypYI8/7SnO83KHSxvqgUaR6u7koi6c7jxdZFrQoTrn73viVIzTy8kTXhQ7s2J aeew== X-Gm-Message-State: ANhLgQ3W25U8NrCphFewghfue8wYvynce0gZBRNnYjgfDOMtD6L3j+9u 9w3S8X7ZYXfwYrMpFnGiJbROwRtCGTnG X-Received: by 2002:a5d:4ac8:: with SMTP id y8mr36558140wrs.272.1585058804297; Tue, 24 Mar 2020 07:06:44 -0700 (PDT) Date: Tue, 24 Mar 2020 15:06:38 +0100 In-Reply-To: <20200323114207.222412-1-courbet@google.com> Message-Id: <20200324140639.70079-1-courbet@google.com> Mime-Version: 1.0 References: <20200323114207.222412-1-courbet@google.com> X-Mailer: git-send-email 2.25.1.696.g5e7596f4ac-goog Subject: [PATCH] x86: Alias memset to __builtin_memset. From: Clement Courbet Cc: Nathan Chancellor , Kees Cook , Nick Desaulniers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Clement Courbet , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the comments. Answers below. > This ifdef is unnecessary > This needs to be within #ifndef CONFIG_FORTIFY_SOURCE Thanks, fixed. > shouldn't this just be done universally ? It looks like every architecture does its own magic with memory functions. I'm not very familiar with how the linux kernel is organized, do you have a pointer for where this would go if enabled globally ? > Who's adding it for 64b? > Any idea where it's coming from in your > build? Maybe a local modification to be removed? Actually this is from our local build configuration. Apparently this is needed to build on some architectures that redefine common symbols, but the authors seemed to feel strongly that this should be on for all architectures. I've reached out to the authors for an extended rationale. On the other hand I think that there is no reason to prevent people from building with freestanding if we can easily allow them to.