Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11254947rwd; Thu, 22 Jun 2023 10:40:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5mxTwxMmncTY1gGJsNCm803pYRXxWmD85giqg1+8fzGzS9groC2gLaHgaiu750bm7i+VvW X-Received: by 2002:a9d:6519:0:b0:6b2:9bdb:a84a with SMTP id i25-20020a9d6519000000b006b29bdba84amr14222882otl.32.1687455615258; Thu, 22 Jun 2023 10:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687455615; cv=none; d=google.com; s=arc-20160816; b=NbFGhiQj03wTQSFVB7wYedcsK5O3eM8mAdhmADWkkM1vUxuB74za4RkXx6F1cQR4Ut Ch/siDSZIvNAl+Y0j5YqO9JpwordZHmjIpSJ0J71H9jjlH/Q/WInWH0TgXXhwzRnMa5c vvQ4eUUAUQPtgxW/MRA6RohTVC5i8Uug6eesNyNvB0kcxETbIDoNFerNBeXxNS3gAyTk 9yRzvkrO1iiRELVOxhmKrfYpocE/g4mZUN3gRjRNtfZHTm7jRRgSPLtN6XigabmsWcAS UiykJrz4W0t8ngy+/8r6Wx5yqk/yvY90hM3WsleDURnjw46XXHFV0iNaEs9VWYRv14N1 jA1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fzwcGQ/hkT75rGPFONAHFCpCSByggiX2ZHPAHUAXafU=; b=vm9alSZVNLfeJz5/RNLCcgykVTqbkEwL77Xml0bdPfbjR93LrAxGvdHFfCFX6ifSy6 ZN041fToiWCKomrWpnxO6RdeGQegzW2Lw/FuR2FIWRHY4aHzgtddunEEQF6kDVgdxo5+ 0CT1Z21WZ2y7pa50k1fK4vsZ+AfkrHvY9ody/LAX5JLruc1ch8UxnUt86pOq8exYOJ87 yGtbciBkqiwTDPyYcUZHcleaeEs9xpJgGxqm/l81XkPoyr25Icl4XU0poGwpUpDPQi8E ZO3G54POLttzCRFME3GghWQSmMr77LZr9RXDKCcIVI8ggHcUSVjHWQC2bZ7PbPKr2I65 xl2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gnuweeb.org header.s=default header.b="nRRA0/7Q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnuweeb.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v71-20020a63894a000000b005321c340960si7034431pgd.811.2023.06.22.10.40.00; Thu, 22 Jun 2023 10:40:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gnuweeb.org header.s=default header.b="nRRA0/7Q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnuweeb.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbjFVRUr (ORCPT + 99 others); Thu, 22 Jun 2023 13:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbjFVRUi (ORCPT ); Thu, 22 Jun 2023 13:20:38 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 555FF19A9; Thu, 22 Jun 2023 10:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1687454436; bh=kqY+PXK/BHeCUujDvP0OTwyGNYeTRsgl8KnpZQ6sEx0=; h=From:To:Cc:Subject:Date; b=nRRA0/7QC0abjoTuDRJ3wJvKcqpQqPpJLhfTPZyGR93TzsXFmQgRB8+H/IEiwlYGa nGjWIpSoAnvynqkwqNO0ZrlXPYQb+TSBftuBGQlYe/dCKev8yv8uV/CWzWeNlKen89 22JbFidcg7W/z0lBZGKFlPv0t9gl+6eg5U/dQmgoEKaQWwg9OK+ZrtNLvDVZa05e6l vIgIck4ZXGjLHTTAUXFEb0Mm8gVzqG40dyYvk2BgwU0F04aw4ep+Gg0jg/GQu9OjKH GheqIu4tYckPUphce4DHErsP6rthZW5NS0pSouXZSP+RKgZen/g7iqhAWyXj34CIVL wvPGt1o0j4R4w== Received: from integral2.. (unknown [68.183.184.174]) by gnuweeb.org (Postfix) with ESMTPSA id 44E9C249D74; Fri, 23 Jun 2023 00:20:33 +0700 (WIB) From: Ammar Faizi To: Jens Axboe Cc: Alviro Iskandar Setiawan , Guillem Jover , Jeff Moyer , Stefan Hajnoczi , Michael William Jonathan , Matthew Patrick , io-uring Mailing List , Linux Kernel Mailing List , GNU/Weeb Mailing List Subject: [RFC PATCH liburing v1 0/3] Introduce '--use-libc' option Date: Fri, 23 Jun 2023 00:20:26 +0700 Message-Id: <20230622172029.726710-1-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, Hi Stefan and Guillem, This is an RFC patch series to introduce the '--use-libc' option to the configure script. Currently, when compiling liburing on x86, x86-64, and aarch64 architectures, the resulting binary lacks the linkage with the standard C library (libc). To address the concerns raised by Linux distribution package maintainers regarding security, it is necessary to enable the linkage of libc to liburing. Especially right now, when the security of io_uring is being scrutinized. By incorporating the '--use-libc' option, developers can now enhance the overall hardening of liburing by utilizing compiler features such as the stack protector and address sanitizer. See the following links for viewing the discussion: Link: https://security.googleblog.com/2023/06/learnings-from-kctf-vrps-42-linux.html Link: https://lore.kernel.org/io-uring/20230621100447.GD2667602@fedora Link: https://lore.kernel.org/io-uring/ZJLkXC7QffsoCnpu@thunder.hadrons.org There are three patches in this series. - The first patch removes the '--nolibc' option from the configure script as it is no longer needed. The default build on x86, x86-64, and aarch64 architectures is still not using libc. - The second patch introduces the '--use-libc' option to the configure script. This option enables the linkage of libc to liburing. - The third patch allows the use of the stack protector when building liburing with libc. Please review. Thank you. Signed-off-by: Alviro Iskandar Setiawan Signed-off-by: Ammar Faizi --- Ammar Faizi (3): configure: Remove --nolibc option configure: Introduce '--use-libc' option src/Makefile: Allow using stack protector with libc configure | 40 +++++++++++++++------------------------- src/Makefile | 7 +++---- 2 files changed, 18 insertions(+), 29 deletions(-) base-commit: 49fa118c58422bad38cb96fea0f10af60691baa9 -- Ammar Faizi