From patchwork Tue Oct 1 18:47:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1170133 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="t6DvuYTp"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46jSvg3678z9s4Y for ; Wed, 2 Oct 2019 04:48:12 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5AFE93C2290 for ; Tue, 1 Oct 2019 20:48:01 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) by picard.linux.it (Postfix) with ESMTP id C28613C2271 for ; Tue, 1 Oct 2019 20:47:58 +0200 (CEST) Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 516001401147 for ; Tue, 1 Oct 2019 20:47:58 +0200 (CEST) Received: by mail-ed1-x543.google.com with SMTP id r9so12945807edl.10 for ; Tue, 01 Oct 2019 11:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gMAR6T9HnVUiieLbaUq2MhvATckkcxxSW8TioVF6fNU=; b=t6DvuYTpfA0lo1y7webbHmF6vGpQuVGUSh6SFk+nsflpQaj25hZBWrEnNVemhL7QPQ m/kzmEUtJQAKvotd2EmFAHFkewgy8hNkXe4ZylJKN2Teif6fPXGKVTyJODEOIKOpWGxm nwEPgFM+j8n+Gy46UmZ9s/Xe43C4THV0g5wEcpO35CcA3Ri7ti8UzAIFvhofzGCRWYAh HFUPgQtjueQvOti/b/NdTFyRBMzbDTTqUEFF5sGuN0uypp+h3vVYhEGpp8XmVi6J20ck BbkFVogSnXTuK2sCN2MrVWxzekyt8As2z76IFWJkRAXTtnTVdZIXInbejWuX4AfjDfU6 sAgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gMAR6T9HnVUiieLbaUq2MhvATckkcxxSW8TioVF6fNU=; b=m11qOs+ZlINFnxUDOZzUgu2YJqNZhEL43R1FODlxUxeOl4EuHX5HWAHpuoggL5Uxm4 iPlIiVWrUS7d6wyiYjZ899EmXQ7Vt7a6jHwrmv5WRdz4KmXyPm66xh4XCAoT8A3aHNro Vd2puQs3sD0iuT/u9dtZjFQ2e1eACg5Gs1c085qB8AiKy2htBw+a+NhEIpWRHN8ti0ju IjqelTJc1o4TZMTEpiT+tDNJlcZwLxEIwG4iZKweN3HGcrhfOdCyDE77Lg7qznh8TeBK SvEsRgZNHs16Q/j/VvZDTmXMHnWXngq2rvVLsDueEPykX8e/gW5F+uiACq/ZMImclMfr 1ijw== X-Gm-Message-State: APjAAAVdlumoRat02Z9UIF0uHdbp08tIN/h/7P/hFzlaHGGbZQ7MDT17 IbkSjhpFQlZ234RdsFmY45aR0Zqr X-Google-Smtp-Source: APXvYqyHO06n+lkGlCd1QeXmvgRaxPPX65Vd+2131muc+oVR4AzWXeRRfsA0GwWngJ/cH2YjK2B37w== X-Received: by 2002:aa7:c343:: with SMTP id j3mr27492797edr.187.1569955677575; Tue, 01 Oct 2019 11:47:57 -0700 (PDT) Received: from dell5510.arch.suse.de ([62.201.25.198]) by smtp.gmail.com with ESMTPSA id f29sm3321984eda.76.2019.10.01.11.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 11:47:56 -0700 (PDT) From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 1 Oct 2019 20:47:50 +0200 Message-Id: <20191001184750.20995-1-petr.vorel@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_HELO_NONE, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH] pkeys: Fix uclibc build caused by conflicting signature X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Removing static fixes the problem. uClibc defines pkey_{alloc,free,mprotect} signatures in , which is included by . Because it does not implement them, our implementation signature conflicts, as it uses static. Fixed build error: In file included from pkey01.c:32:0: pkey.h:18:19: error: static declaration of ‘pkey_mprotect’ follows non-static declaration static inline int pkey_mprotect(void *addr, size_t len, int prot, int pkey) ^ In file included from /opt/br-test-pkg/br-arm-full/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/mman-linux.h:115:0, from /opt/br-test-pkg/br-arm-full/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/mman.h:40, from /opt/br-test-pkg/br-arm-full/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/mman.h:41, from pkey01.c:29: /opt/br-test-pkg/br-arm-full/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/mman-shared.h:73:5: note: previous declaration of ‘pkey_mprotect’ was here int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) __THROW; ^ In file included from pkey01.c:32:0: Found with test-pkg tool from Buildroot distribution. Fixes: 90c2dc89f ("pkey: add test for memory protection keys") Signed-off-by: Petr Vorel --- testcases/kernel/syscalls/pkeys/pkey.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/syscalls/pkeys/pkey.h b/testcases/kernel/syscalls/pkeys/pkey.h index d623244eb..19c8447eb 100644 --- a/testcases/kernel/syscalls/pkeys/pkey.h +++ b/testcases/kernel/syscalls/pkeys/pkey.h @@ -15,17 +15,17 @@ #endif #ifndef HAVE_PKEY_MPROTECT -static inline int pkey_mprotect(void *addr, size_t len, int prot, int pkey) +inline int pkey_mprotect(void *addr, size_t len, int prot, int pkey) { return tst_syscall(__NR_pkey_mprotect, addr, len, prot, pkey); } -static inline int pkey_alloc(unsigned int flags, unsigned int access_rights) +inline int pkey_alloc(unsigned int flags, unsigned int access_rights) { return tst_syscall(__NR_pkey_alloc, flags, access_rights); } -static inline int pkey_free(int pkey) +inline int pkey_free(int pkey) { return tst_syscall(__NR_pkey_free, pkey); }