[RESEND,RFC,v2,07/14] drm/amdkfd: Switch from devcgroup_check_permission to security hook
Message ID | 20231025094224.72858-8-michael.weiss@aisec.fraunhofer.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2479358vqx; Wed, 25 Oct 2023 02:45:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGjeoKHA7c7W0h1odVp2R6dS7egg7GzqHPxe2F5N8yNQ+mkHPj0hCa+0XPZjbMRSIYazOC X-Received: by 2002:a05:6808:1a94:b0:3b2:ef72:f59e with SMTP id bm20-20020a0568081a9400b003b2ef72f59emr15169132oib.24.1698227100136; Wed, 25 Oct 2023 02:45:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698227100; cv=pass; d=google.com; s=arc-20160816; b=wHlzZY139YLuDDPIrEAComHIJq3VFvuLletGIiu9lpdrzGUoH67FJyBVbZ7evDlxmQ jNqFZu4PibvBRYUGcuzpavcwQuS/Q0NvzQQjNmotBQF+ztRl7muY+7WtVACfdMNRaOG/ 3lujuYgnmpmM6lu7ER9sNMaup3KKWd6ZKzeCzWBBnc3s/nZjYkjxlFgwAgNDiLOSCqD2 rteWFGAzAKVz6Q6rFi/8YVKXPTZtfPMDjkYh7dIPeXiJMcH/O0TBjNvpJpAwGcSDNZ77 9FNGl0b22w81cAFjL8HXZC2iLO5wYZ1FhVhrnap5KCiFNjAKAqb0WhwV1CRxW1ND3adJ hSbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:ironport-hdrordr:ironport-data:ironport-phdr :ironport-sdr:ironport-phdr:dkim-signature; bh=9vf1ixH2qLJzlXFGb64g2kEhkedNPAsYtGmzXincPmU=; fh=U9u/esc0XBb8N/pVu7kudxJPwEQ0AyrThcmR2LpYyxQ=; b=AoKNpHKMlZaKL58wnHRnRzbKsOy19Nqx/IufZtPCntuL4e9J82aQVBzosTDjvHoAQ2 S/TnAkatzyFubWp05nOVIdzWZ5SQzvkd9jIeb7rAEAPZ5mv0qjuTtoabHbUGqyT+35Lb Nkq5tf8fJPKBx1qSdhNWSUgIPFbzG0ZnxvB6sGM3/045+cZzp4SVe6//S7VSYyZGmy0S 9XjVKLDd+I/WO/aB1iJvH2l/4h4Xlw28vflHkIdinKvOrfmQQaloWQVNvdOyakWkhaGA P+kBxgSv0tKugcwreWfx7szXvBin9BEmpxQJlAatEqvtvozoTco66MoQC9PsuimAss9f oC+Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@aisec.fraunhofer.de header.s=emailbd1 header.b=EeaG7Rw+; dkim=pass header.i=@fraunhofer.onmicrosoft.com header.s=selector2-fraunhofer-onmicrosoft-com header.b=OO7+q2w+; arc=pass (i=1 spf=pass spfdomain=aisec.fraunhofer.de dkim=pass dkdomain=aisec.fraunhofer.de dmarc=pass fromdomain=aisec.fraunhofer.de); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aisec.fraunhofer.de Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d12-20020a25360c000000b00d8677aa06ecsi10529806yba.341.2023.10.25.02.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 02:45:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=fail header.i=@aisec.fraunhofer.de header.s=emailbd1 header.b=EeaG7Rw+; dkim=pass header.i=@fraunhofer.onmicrosoft.com header.s=selector2-fraunhofer-onmicrosoft-com header.b=OO7+q2w+; arc=pass (i=1 spf=pass spfdomain=aisec.fraunhofer.de dkim=pass dkdomain=aisec.fraunhofer.de dmarc=pass fromdomain=aisec.fraunhofer.de); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aisec.fraunhofer.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 95C66802F226; Wed, 25 Oct 2023 02:44:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343521AbjJYJoi (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Wed, 25 Oct 2023 05:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234634AbjJYJoL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Oct 2023 05:44:11 -0400 Received: from mail-edgeka24.fraunhofer.de (mail-edgeka24.fraunhofer.de [IPv6:2a03:db80:4420:b000::25:24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A375110A; Wed, 25 Oct 2023 02:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aisec.fraunhofer.de; i=@aisec.fraunhofer.de; q=dns/txt; s=emailbd1; t=1698227049; x=1729763049; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=eKElJcu7Id5sldol2s8MOyzTK9+7fV+g6NYwtKozuZg=; b=EeaG7Rw+yl3KJeSGh4Og437zykxXpDvM9cpFeu7GLNcj3JSZie9W52dy QXwt4ShHwaGyi5ilfgP+IMivp7LBzNKuitOiTSimMoxNgcDW40GapQq1n 6qVR04W6T9wYPZ0LCn/xhTJYo1kQlQnDpq/CUvA/J2ulCZ4yUtJU+5uwN nuU40paR4qf1VzfTrqWXnfVfNLg9QgttHMcAQ7zwNvVAD/giHiOGg3fpZ bPqcXAfu0VUuhocW0BmyURwGJf5DLjZ/473uEbqZJXksKe82lMfm/7RXv mSVTBWbKsKyFX9YnUzZG9wcxey0FCYeoNEgsGUet5XffdMVb9bcwKyVty Q==; X-CSE-ConnectionGUID: Oar3O4eMQGmOAAyffpgzYA== X-CSE-MsgGUID: DROKL+LfSdGdHNyU3Ffiqg== Authentication-Results: mail-edgeka24.fraunhofer.de; dkim=pass (signature verified) header.i=@fraunhofer.onmicrosoft.com X-IPAS-Result: A2EqAwBB4jhl/xmnZsBaHgEBCxIMQIFEC4I5gleEU6oEhAQqgSyBJQNWDwEBAQEBAQEBAQcBAUQEAQEDBIR/AocaJzQJDgECAQMBAQEBAwIDAQEBAQEBAQIBAQYBAQEBAQEGBgKBGYUvOQ2EAIEeAQEBAQEBAQEBAQEBHQI1VAIBAyMECwENAQE3AQ8lAiYCAjIlBgENBYJ+gisDMbIYfzOBAYIJAQEGsB8YgSCBHgkJAYEQLoNchC4BhDSBHYQ1gk+BSoEGgi2EWINGgmiDdYU8B4JUgy8pi36BAUdaFhsDBwNZKhArBwQtIgYJFi0lBlEEFxYkCRMSPgSBZ4FRCoEDPw8OEYJCIgIHNjYZS4JbCRUMNQRJdhAqBBQXgRFuBRoVHjcREhcNAwh2HQIRIzwDBQMENAoVDQshBVcDRAZKCwMCGgUDAwSBNgUNHgIQLScDAxlNAhAUAzsDAwYDCzEDMFdHDFkDbB8aHAk8DwwfAhseDTIDCQMHBSwdQAMLGA1IESw1Bg4bRAFzB51Ngm0BgQ2BW32WLgGueQeCMYFeoQkaM5crkk8uh0aQSCCiPoVKAgQCBAUCDgiBY4IWMz6DNlIZD4EbjQU4g0CPe3QCOQIHAQoBAQMJgjmJEgEB IronPort-PHdr: A9a23:CFKR8RQniMpNkGXxX7O91BFdstpsou2eAWYlg6HP9ppQJ/3wt523J lfWoO5thQWUA9aT4Kdehu7fo63sHnYN5Z+RvXxRFf4EW0oLk8wLmQwnDsOfT0r9Kf/hdSshG 8peElRi+iLzKh1OFcLzbEHVuCf34yQbBxP/MgR4PKHyHIvThN6wzOe859jYZAAb4Vj1YeZcN hKz/ynYqsREupZoKKs61knsr2BTcutbgEJEd3mUmQrx4Nv1wI97/nZ1mtcMsvBNS777eKJqf fl9N3ELI2s17cvkuFz4QA2D62E1fk4WnxFLUG2npBv6C8bvvHL7psonwQ24L8nGY58+B2itt aRGSBzlhAE/HiUI7E7SmPxxiqljpS/09Hkdi4SBR6bKd+MkYeDjWPxGaFcYf/gLCwpPJZGTV ogrX7UFMuN9sbjf5GtQrgOuAzCUWPLI7z9MjSLr/o83kNYELRrAhFwEI/U1km3rp/Xvc6MPC vmE0vKL1m6cfdVH5S3j85LoVC09/PKFbIxsduTR0Hk0EAbMkW28m4bObmjN9MgMnm+f3udle 9iRhUMY9DosiQO1/9kio67JhKww4W2D1Stg2oIpI42SWmRLRPmvRcgYp2SbLYxwWsQ4XyRyt T0nzqFToZegZ3tiIPUPwhfeb7mKf4eF4Ru5CKCfOz5lgnJidr+lwRq/ogCsyez5A9G9y00C7 jFEnd/Fqm0X2lTN59KGRPpw8gbp2TuG2w3JrOARCU4unLfdK5kvz6R2kZwWsE/ZGTTxllmwh 6iTHng= X-Talos-CUID: 9a23:I6tyOWPBZ39xWO5DfyB9r2lIF+UcXXj65V7BLUGgBnRYYejA X-Talos-MUID: 9a23:k5P0Jwn5V1VVswmSpSq+dnpODuBLx+eKBnsBvpkmndi5bgJ+Oi6S2WE= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.03,250,1694728800"; d="scan'208";a="1802503" Received: from mail-mtadd25.fraunhofer.de ([192.102.167.25]) by mail-edgeka24.fraunhofer.de with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 11:43:02 +0200 Iron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A9a23:RZ8ZcKpE7yzNIpJcSDx02wgaV5oveYIsimQD101hICG9Ffbo8f xG/c5rsiMc7Qx6ZJhOo7690cW7Lk80lqQFg7X5X43SODUO0VHARO1fBO3Zsl7d8kXFndK1vp 0AT0ERMr3N5AhB4PoTomGDYrMd/OU= X-Talos-CUID: 9a23:QIwa6G90eT2iqJG25PuVv1QfCpoaSVDF9nj7CF2jL0xKUIOHdnbFrQ== X-Talos-MUID: 9a23:WWakWQZVyTZtVOBTiGPJxxdhLsVR6aH1I0Ikv5pBvsydOnkl X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.03,250,1694728800"; d="scan'208";a="188491576" Received: from 153-97-179-127.vm.c.fraunhofer.de (HELO smtp.exch.fraunhofer.de) ([153.97.179.127]) by mail-mtaDD25.fraunhofer.de with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 11:43:00 +0200 Received: from XCH-HYBRID-04.ads.fraunhofer.de (10.225.9.46) by XCH-HYBRID-03.ads.fraunhofer.de (10.225.9.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.27; Wed, 25 Oct 2023 11:43:00 +0200 Received: from DEU01-FR2-obe.outbound.protection.outlook.com (104.47.11.169) by XCH-HYBRID-04.ads.fraunhofer.de (10.225.9.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.27 via Frontend Transport; Wed, 25 Oct 2023 11:43:00 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lg9iLr8G6916I7kCYC2wWi1OI7WjKUcRV58hV5n75Oqb/r1jTvy2iuDhDLw3ecGsLkLOrQZPtwwk8Xy0/fX63CdzIqLU9u9Kitq5GfXlWaFIG5GDFVlkGAVjfaRJL+qE5Z9ynVewD9ivePGj0z8nkk6QywaZHXKaxPzOWoKVlr2tZ0vzeDijY7gsnbkgVI59Awqjc4r3Zw/Cg83+gpovO2qEUoKh9FJnx1+pKnO/+D5g9S3zysmy41Cfo2m9PWDbHQcNCw120KRDaL1R/qJF01/snbfYiQ0IFeZl+4/1BPX9Gx+dAEWdPhWYecRa3TikiB6Ubql8LS0cfkVgNJLrXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=9vf1ixH2qLJzlXFGb64g2kEhkedNPAsYtGmzXincPmU=; b=jgmKdhOiviBX5SQCIz5ycw/EosOE9ZSCk2vKRnIELHkz9F1JDo/HbnOGdELIdJ8fx5VzpJ1YRmvE1JtfqjQrEezgHDUP4GBEp2CopO+QFQdq3XCtEqcAQAPO/GUBnB+cu+G2FCFnJVJg1PwcKXtXhjHIqjU2PnPR+X5pEbflOgr48Kwtli/h26D+OwzcK031DACNkWrcdSgggV1R2yCE40XZZ14+6jq0/UhdlYFz5CSVUS4Tkhd5i66vk38dFYwsiIxiwc8rFfnn9HZer/AzXAT4arg2MomelnOrl/veMmuw292eU+50EdgTE6RdOMpg+rFk0KAeWgsO4/zlRWtZHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aisec.fraunhofer.de; dmarc=pass action=none header.from=aisec.fraunhofer.de; dkim=pass header.d=aisec.fraunhofer.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fraunhofer.onmicrosoft.com; s=selector2-fraunhofer-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9vf1ixH2qLJzlXFGb64g2kEhkedNPAsYtGmzXincPmU=; b=OO7+q2w+VMG4EU1IV24NfOzGQkL87lgmMvYJ+X6kpxnQP4yOMhlc5uKJe+ZMTsn08LTOSJqWcHr/lu3qYv3+s37zNyTrvsrHNUt5kaYVtoFhqXsomawPDZbC930JDiEolYemFRVfEW7S5CSrQvfAOhjFMCU/Hfqrltn8BzBXMOc= Received: from BEZP281MB2791.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:50::14) by BE0P281MB0116.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Wed, 25 Oct 2023 09:42:59 +0000 Received: from BEZP281MB2791.DEUP281.PROD.OUTLOOK.COM ([fe80::7330:78f8:1bf2:2f4d]) by BEZP281MB2791.DEUP281.PROD.OUTLOOK.COM ([fe80::7330:78f8:1bf2:2f4d%5]) with mapi id 15.20.6933.019; Wed, 25 Oct 2023 09:42:59 +0000 From: =?utf-8?q?Michael_Wei=C3=9F?= <michael.weiss@aisec.fraunhofer.de> To: Alexander Mikhalitsyn <alexander@mihalicyn.com>, Christian Brauner <brauner@kernel.org>, Alexei Starovoitov <ast@kernel.org>, Paul Moore <paul@paul-moore.com> CC: Daniel Borkmann <daniel@iogearbox.net>, Andrii Nakryiko <andrii@kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>, John Fastabend <john.fastabend@gmail.com>, KP Singh <kpsingh@kernel.org>, Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>, Quentin Monnet <quentin@isovalent.com>, Alexander Viro <viro@zeniv.linux.org.uk>, Miklos Szeredi <miklos@szeredi.hu>, Amir Goldstein <amir73il@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>, <bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>, <gyroidos@aisec.fraunhofer.de>, =?utf-8?q?Michael_Wei=C3=9F?= <michael.weiss@aisec.fraunhofer.de> Subject: [RESEND RFC PATCH v2 07/14] drm/amdkfd: Switch from devcgroup_check_permission to security hook Date: Wed, 25 Oct 2023 11:42:17 +0200 Message-Id: <20231025094224.72858-8-michael.weiss@aisec.fraunhofer.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231025094224.72858-1-michael.weiss@aisec.fraunhofer.de> References: <20231025094224.72858-1-michael.weiss@aisec.fraunhofer.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR4P281CA0420.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:d0::17) To BEZP281MB2791.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:50::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BEZP281MB2791:EE_|BE0P281MB0116:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b2dd8f3-608b-4c5a-1e21-08dbd53ec65d X-LD-Processed: f930300c-c97d-4019-be03-add650a171c4,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O23ydpS7Q4O/fZ1BIHXAfRW8N1PmHcR4YLsIgpB+KYu5GTgpfH4NRP7H7NeuJ3gCHniy9YXaoIpzzqpht3yzcuLVSyOGNFCdwjnCQlecBMSC9f7m1oW64D/gXF9a26m7dOwEg1i54cvXBOHh4kdAJs5wN901ar7WIrEegfQwPSmg3RSx9sO8lea3ZAOdbX/FMBWV/CNKTtKVRaxwvskvQt0tSzZwF478vYhDOZGGjwHN952BbrjrfHFzy0SEIXdEDaujYGxs9l3i6FM91C2LCWVNFvxp7dBFY6jhQ9wT8gwSLIbZcn5cxXllJGrrWXnYvHmoX1MC4JzKr/TJuQZ5v0F6NxRnAFlWY1XErxZ924+liXO3EAPcZTxF4jAdgZkqRLFOAlX8C/M4ergvMKmchiTv+zMWOY8PXOEo8VdsRlZTTi35C0lMM96L1na1npFA2JWVM14WAJeawqAlNfz/EP62s0Ck4Wz8piLvvyyiJ1D8laTg5a1CwannsuzwfqyPKtwasVzBEHDVKbMEnM7fDQpD1EXBCap/K6NhELKW6G3Sys3yXq0POX2XeTr+B2N20wPTfUAQY9kdjPRjcbiRxDZhr55Nyor3n/kL7DznJgM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BEZP281MB2791.DEUP281.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(136003)(396003)(376002)(39860400002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(66946007)(83380400001)(316002)(38100700002)(6486002)(478600001)(6666004)(54906003)(110136005)(66556008)(66476007)(1076003)(107886003)(52116002)(6506007)(2616005)(6512007)(15650500001)(7416002)(2906002)(86362001)(4326008)(8936002)(82960400001)(8676002)(41300700001)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?83vro7+cn+rndxjHdxHRmNLwmCsX?= =?utf-8?q?RkPRM+KvG88+8RIfsWv7TaQrrlQC4Khtr/aBuYvGOUbzapCRSTJ41UNCZ1As8pqkO?= =?utf-8?q?R5s46uDV10HuQ+SIix877Z7qBk/DfHg4hRRLnCM7gCgxCPkqJURW9qzH77Ff5pddP?= =?utf-8?q?vVL3VJly5nI52lTFF1gNpD9RoRHhqKxMoB43ZH4ZmkR13LGkG+Sw/1XrCnGOr143V?= =?utf-8?q?5D7pnrWevJc52Xv/KLXCY02VzpZcLadzHIH8n6k+IzSbSR28fTYPqkFLLGEsbjUoI?= =?utf-8?q?LOX3mV5lukFPyNrliGUGBMQPkpBx+lQ6Z0doCH6ZLR/wluctukePj+FjGgjehmOON?= =?utf-8?q?6iWQ0YmnKYSC4aVFcIjiMtXAm6EU4P7DPYTAAVYlgXSG6cwxl+xApP2+1rcGsUl74?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?WxQy93oBBmHNO1pqPTlEv+tySdojc6BvOXzdXzPp1Upz1EPK8ZEkCPDkX53SgkL+W?= =?utf-8?q?BajcN4PxLzHf652ZLb27EJSjlgn03HnvkH0zNfaVZ7Fbex4EmBDBc4l9IcTkagvLx?= =?utf-8?q?sGE7oKkSYsgIiY/kJh4CsIHvD/cB+vQDqEYv7l3tfhapSIj3G084mC5zL7z1/4kO6?= =?utf-8?q?fhW/VlSN4PletoFm+NLdBnoAbUD2khMwa4qAnvaMFsW1xTwAOIQ6oMUNHVw4b2H9f?= =?utf-8?q?d7xu4aVwPeZ+gFKlmfAF4l4NIkDuZ0+2xend01IQ8ckUUEh4RX7gR8fHtnzjsN6NK?= =?utf-8?q?0mFoa0mcE2BLnF4eBX4mv9OYcr4+OFjYK3pqKsPC5UsuxlZdnTcQlI=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1b2dd8f3-608b-4c5a-1e21-08dbd53ec65d X-MS-Exchange-CrossTenant-AuthSource: BEZP281MB2791.DEUP281.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2023 09:42:59.7039 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f930300c-c97d-4019-be03-add650a171c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BhSYmiedWO3oUym7gS3eVavdGcHH09CWT+7c0prcN8iiPWCBz8kMf/eF17UFrRF7pCRGwbXw5Fiu2V5HpO8hXH6H5VQdpll8ps7A+M1FerIWv0J4BEC9tPf4bjJVpoRP X-MS-Exchange-Transport-CrossTenantHeadersStamped: BE0P281MB0116 X-OriginatorOrg: aisec.fraunhofer.de X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 25 Oct 2023 02:44:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780720179462872315 X-GMAIL-MSGID: 1780720179462872315 |
Series |
device_cgroup: guard mknod for non-initial user namespace
|
|
Commit Message
Michael Weiß
Oct. 25, 2023, 9:42 a.m. UTC
The new lsm-based cgroup device access control provides an
equivalent hook to check device permission. Thus, switch to the
more generic security hook security_dev_permission() instead of
directly calling devcgroup_check_permission().
Signed-off-by: Michael Weiß <michael.weiss@aisec.fraunhofer.de>
---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index fa24e1852493..50979f332e38 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h @@ -38,7 +38,7 @@ #include <linux/seq_file.h> #include <linux/kref.h> #include <linux/sysfs.h> -#include <linux/device_cgroup.h> +#include <linux/security.h> #include <drm/drm_file.h> #include <drm/drm_drv.h> #include <drm/drm_device.h> @@ -1487,9 +1487,8 @@ static inline int kfd_devcgroup_check_permission(struct kfd_node *kfd) #if defined(CONFIG_CGROUP_DEVICE) || defined(CONFIG_CGROUP_BPF) struct drm_device *ddev = adev_to_drm(kfd->adev); - return devcgroup_check_permission(DEVCG_DEV_CHAR, DRM_MAJOR, - ddev->render->index, - DEVCG_ACC_WRITE | DEVCG_ACC_READ); + return security_dev_permission(S_IFCHR, MKDEV(DRM_MAJOR, ddev->render->index), + MAY_WRITE | MAY_READ); #else return 0; #endif