Re: [PATCH v2] libnvdimm/region: Allow setting align attribute on regions without mappings

2022-09-26 Thread Tyler Hicks
On 2022-09-26 16:18:18, Jeff Moyer wrote: > Tyler Hicks writes: > > > The alignment constraint for namespace creation in a region was > > increased, from 2M to 16M, for non-PowerPC architectures in v5.7 with > > commit 2522afb86a8c ("libnvdimm/region: Introduce an

Re: [PATCH v2] libnvdimm/region: Allow setting align attribute on regions without mappings

2022-09-14 Thread Tyler Hicks
On 2022-08-30 00:45:05, Tyler Hicks wrote: > The alignment constraint for namespace creation in a region was > increased, from 2M to 16M, for non-PowerPC architectures in v5.7 with > commit 2522afb86a8c ("libnvdimm/region: Introduce an 'align' > attribute"). The th

[PATCH v2] libnvdimm/region: Allow setting align attribute on regions without mappings

2022-08-29 Thread Tyler Hicks
n those regions, despite not being aligned to 16M. Link: https://lore.kernel.org/lkml/CA+CK2bDJ3hrWoE91L2wpAk+Yu0_=GtYw=4glddd7mxs321b...@mail.gmail.com Fixes: 2522afb86a8c ("libnvdimm/region: Introduce an 'align' attribute") Signed-off-by: Tyler Hicks --- While testing wi

Re: [PATCH] ecryptfs: fix kernel panic with null dev_name

2021-04-18 Thread Tyler Hicks
t affects the first kernel release with eCryptfs. I've added the following Fixes tag: Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig") I've pushed it to the next branch of tyhicks/ecryptfs.git. Tyler > --- > fs/ecryptfs/main.c | 6 ++ > 1 fi

Re: [PATCH 00/31] Rid W=1 warnings from GFS2 and EncryptFS

2021-04-18 Thread Tyler Hicks
eader and demote other > abuses > fs: ecryptfs: inode: Help out nearly-there header and demote > non-conformant ones > fs: ecryptfs: keystore: Fix some kernel-doc issues and demote > non-conformant headers I've applied the eCryptfs fixes to the next branch of tyhicks/ecryptfs.git. Thanks for the clean-up! Tyler

Re: [PATCH] ecryptfs: Fix typo in message

2021-04-18 Thread Tyler Hicks
while applying: Fixes: 0216f7f79217 ("eCryptfs: replace encrypt, decrypt, and inode size write") Tyler > --- > fs/ecryptfs/crypto.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c > index a48116aa

Re: [PATCH] ecryptfs: fix incorrect kernel-doc comment syntax in files

2021-04-18 Thread Tyler Hicks
format, i.e. '/*', to prevent kernel-doc from parsing it. > > Signed-off-by: Aditya Srivastava Hello Aditya - Thank you for this fix. In the time it took me to review this patch, someone else submitted a series that fixed all W=1 warnings under fs/ecryptfs/: https:

Re: [PATCH 26/31] fs: ecryptfs: main: Demote a bunch of non-conformant kernel-doc headers

2021-04-18 Thread Tyler Hicks
member 'flags' not > described in 'ecryptfs_mount' > fs/ecryptfs/main.c:478: warning: expecting prototype for ecryptfs_get_sb(). > Prototype was for ecryptfs_mount() instead > fs/ecryptfs/main.c:645: warning: Function parameter or member 'vptr' not > de

Re: [PATCH 28/31] fs: ecryptfs: crypto: Supply some missing param descriptions and demote abuses

2021-04-18 Thread Tyler Hicks
name' > fs/ecryptfs/crypto.c:1897: warning: Excess function parameter 'length' > description in 'ecryptfs_encrypt_and_encode_filename' > fs/ecryptfs/crypto.c:2006: warning: Function parameter or member 'sb' not > described in 'ecryptfs_deco

Re: [PATCH] PCI: Don't use Printk in raw_spinlocks

2021-03-30 Thread Tyler Hicks
eneric_config_write32()? > > > > That was my suggestion, but as Mark pointed out that doesn't work if > > pci_generic_config_write32 is wrapped (which is 4 out of 8 cases). > > > > Also, 3 of the cases are only for the root bus (bridge). Are 32-bit > > writes to a bridge going to cause problems? For xgene, interestingly, > > with DT _write32 is needed, but for ACPI it is not (only _read32). I > > think xgene is practically dead though a few people still have > > systems, but likely xgene with DT is really dead. The ECAM case was > > for QCom server which is also pretty much dead. SA1100 nano-engine is > > really old and something only a few people have at most (Russell > > King). So ignoring all those, we're left with just loongson and iproc. > > Maybe just remove the warning? > > Sigh, removing it sounds like the best option. Hi Bjorn - Was this lockdep issue fixed in a different way than removing the use of printk? I'm mostly interested in reducing the RW1C warnings as Mark suggested here: https://lore.kernel.org/lkml/20200806041455.11070-1-mark.tomlin...@alliedtelesis.co.nz/ While thinking how best to rejuvenate that patch, I came across this thread in the archives and it seems like the plan shifted to completely removing this printk callsite to address the lockdep issue. However, neither patch ended up in Linus' tree nor in the current PCI tree (I only peeked in the next branch). What's everyone's preference at this point? Thanks! Tyler

Re: [PATCH] libnvdimm/region: Allow setting align attribute on regions without mappings

2021-03-30 Thread Tyler Hicks
On 2021-03-30 16:32:10, Aneesh Kumar K.V wrote: > Tyler Hicks writes: > > > The alignment constraint for namespace creation in a region was > > increased, from 2M to 16M, for non-PowerPC architectures in v5.7 with > > commit 2522afb86a8c ("libnvdimm/region: Intro

[PATCH] libnvdimm/region: Allow setting align attribute on regions without mappings

2021-03-26 Thread Tyler Hicks
n those regions, despite not being aligned to 16M. Fixes: 2522afb86a8c ("libnvdimm/region: Introduce an 'align' attribute") Signed-off-by: Tyler Hicks --- drivers/nvdimm/region_devs.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletio

Re: [PATCH] arm64: kdump: update ppos when reading elfcorehdr

2021-03-19 Thread Tyler Hicks
ccident, but other platforms update this value properly. > So, fix it in ARM64 version of elfcorehdr_read() as well. > Fixes: e62aaeac426a ("arm64: kdump: provide /proc/vmcore file") Reviewed-by: Tyler Hicks Tyler > Signed-off-by: Pavel Tatashin > --- > arch/arm64

Re: [PATCH v3 1/1] kexec: dump kmessage before machine_kexec

2021-03-19 Thread Tyler Hicks
70.921642] CPU7: shutdown > <6>[ 70.922650] psci: CPU7 killed (polled 0 ms) > > Signed-off-by: Pavel Tatashin > Reviewed-by: Kees Cook > Reviewed-by: Petr Mladek > Reviewed-by: Bhupesh Sharma Reviewed-by: Tyler Hicks Tyler > Acked-by: Baoquan He > -

Re: [PATCH v2 2/2] firmware: tee_bnxt: implement shutdown method to handle kexec reboots

2021-03-18 Thread Tyler Hicks
igned-off-by: Allen Pais Reviewed-by: Tyler Hicks Tyler > --- > drivers/firmware/broadcom/tee_bnxt_fw.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c > b/drivers/firmware/broadcom/tee_bnxt_fw.c > index ed10da5313e8.

Re: [PATCH v2 1/2] optee: fix tee out of memory failure seen during kexec reboot

2021-03-18 Thread Tyler Hicks
e_remove(struct platform_device *pdev) > return 0; > } > > +/* optee_shutdown - Device Removal Routine > + * @pdev: platform device information struct > + * > + * platform_shutdown is called by the platform subsystem to alter

Re: [PATCH v2 0/3] Don't use RCU for x_tables synchronization

2021-03-11 Thread Tyler Hicks
oot time. I cannot explain why '5.10.19 + these fixes' shows improvements over 5.4.88 for two of the three services but I suspect it is due to systemd taking different code paths, units executing at different times, unrelated kernel performance improvements, etc. For all three patches, Te

Re: [BUG] Race between policy reload sidtab conversion and live conversion

2021-02-25 Thread Tyler Hicks
On 2021-02-25 17:38:25, Ondrej Mosnacek wrote: > On Wed, Feb 24, 2021 at 3:43 PM Tyler Hicks > wrote: > > On 2021-02-24 10:33:46, Ondrej Mosnacek wrote: > > > On Tue, Feb 23, 2021 at 11:37 PM Tyler Hicks > > > wrote: > > > > On 2021-02-23 15:50:56, Tyl

Re: [BUG] Race between policy reload sidtab conversion and live conversion

2021-02-24 Thread Tyler Hicks
On 2021-02-24 10:33:46, Ondrej Mosnacek wrote: > On Tue, Feb 23, 2021 at 11:37 PM Tyler Hicks > wrote: > > On 2021-02-23 15:50:56, Tyler Hicks wrote: > > > On 2021-02-23 15:43:48, Tyler Hicks wrote: > > > > I'm seeing a race during policy load while the

Re: [BUG] Race between policy reload sidtab conversion and live conversion

2021-02-23 Thread Tyler Hicks
On 2021-02-23 15:50:56, Tyler Hicks wrote: > On 2021-02-23 15:43:48, Tyler Hicks wrote: > > I'm seeing a race during policy load while the "regular" sidtab > > conversion is happening and a live conversion starts to take place in > > sidtab_context_to_sid()

Re: [BUG] Race between policy reload sidtab conversion and live conversion

2021-02-23 Thread Tyler Hicks
On 2021-02-23 15:43:48, Tyler Hicks wrote: > I'm seeing a race during policy load while the "regular" sidtab > conversion is happening and a live conversion starts to take place in > sidtab_context_to_sid(). > > We have an initial policy that's loaded by systemd

[BUG] Race between policy reload sidtab conversion and live conversion

2021-02-23 Thread Tyler Hicks
ed ("selinux: overhaul sidtab to fix bug and improve performance"), that there's no need to freeze the sidtab during policy reloads so I know that there's thought given to these code paths running in parallel. Can someone more knowledgeable on how the sidtab locking is expected to work suggest a fix for this crash? Tyler

Re: [PATCH] arm64: mm: correct the start of physical address in linear map

2021-02-13 Thread Tyler Hicks
-by: Pavel Tatashin > Fixes: 58284a901b42 ("arm64/mm: Validate hotplug range before creating linear > mapping") Tested-by: Tyler Hicks This fixes a memory hot plugging bug that I was seeing on 5.10, with the introduction of 58284a901b42. One comment below... > --- >

Re: [RESEND PATCH v18 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2021-02-12 Thread Tyler Hicks
On 2021-02-05 12:01:55, Tyler Hicks wrote: > On 2020-10-30 09:00:35, Mark Salyzyn wrote: > > On 10/30/20 8:07 AM, Miklos Szeredi wrote: > > > On Wed, Oct 21, 2020 at 5:19 PM Mark Salyzyn wrote: > > > > Because of the overlayfs getxattr recursion, the incoming ino

Re: [RESEND PATCH v18 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2021-02-05 Thread Tyler Hicks
ets up Overlayfs mounts, then that process starts a service confined by another security context, then that service may execute binaries that run under a third security context. In this case, I'm talking about SELinux security contexts but it could be AppArmor or anything else that you use to

Re: [PATCH v2 -next] ecryptfs: use DEFINE_MUTEX() for mutex lock

2021-01-30 Thread Tyler Hicks
it.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git/log/?h=next Thanks for the cleanup! Tyler > --- > fs/ecryptfs/crypto.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c > index 0681540c48d9..be90

Re: [PATCH] eCryptfs: add a semicolon

2021-01-30 Thread Tyler Hicks
missing the trailing semicolon and then made Joe's suggested change before pushing the patch to the eCryptfs next branch: https://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git/log/?h=next Thanks for the cleanup! Tyler

Re: [PATCH] ecryptfs: Fix inodes not being evicted until unmount

2021-01-30 Thread Tyler Hicks
irect manipulation to the lower filesystem. Is the condition that you're trying to fix a result of going through the this code path? ecryptfs_unlink() -> ecryptfs_do_unlink() -> vfs_unlink() -> nfs_unlink() -> nfs_sillyrename() -> nfs_async_unlink() Tyler > --- >

[GIT PULL] eCryptfs fix for 5.11-rc6

2021-01-28 Thread Tyler Hicks
Hi Linus, The following changes since commit 83d09ad4b950651a95d37697f1493c00d888d0db: Merge tag 'for-linus' of git://github.com/openrisc/linux (2021-01-21 18:35:02 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git tags/ecr

Re: [PATCH v10 16/18] arm64: kexec: configure trans_pgd page table for kexec

2021-01-27 Thread Tyler Hicks
int rc; > + > + for (entry = kimage->head; !(entry & IND_DONE); entry = *ptr++) { > + addr = entry & PAGE_MASK; > + > + switch (entry & IND_FLAGS) { > + case IND_DESTINATION: > + dest = addr; > +

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-26 Thread Tyler Hicks
On 2021-01-25 14:25:38, Miklos Szeredi wrote: > On Fri, Jan 22, 2021 at 7:31 PM Tyler Hicks wrote: > > > > On 2021-01-19 17:22:03, Miklos Szeredi wrote: > > > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > > > vfs_setxattr()"

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-22 Thread Tyler Hicks
a file inside of an eCryptfs mount to verify that the bug exists after 7c03e2cda4a5 and then again to verify that this patch fixes the bug? Tyler > > Restore old the behavior for ecryptfs that existed before the overlayfs > fix. This does not fix ecryptfs's handling of complex use

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-22 Thread Tyler Hicks
es. Code that is enabled with CONFIG_FILE_LOCKING. So unless > > I am missing something this introduces a different regression into > > ecryptfs. > > This is in line with all the other cases of ecryptfs passing NULL as > delegated inode. > > I'll defer this to the

Re: [PATCH 2/2] ima: Free IMA measurement buffer after kexec syscall

2021-01-21 Thread Tyler Hicks
function. > > Signed-off-by: Lakshmi Ramasubramanian > Suggested-by: Tyler Hicks > Fixes: 7b8589cc29e7 ("ima: on soft reboot, save the measurement list") Reviewed-by: Tyler Hicks Tyler > --- > include/linux/kexec.h | 5 + > kernel/kexec_file.c

Re: [PATCH 1/2] ima: Free IMA measurement buffer on error

2021-01-21 Thread Tyler Hicks
resulting in memory leak. > > Free the memory allocated for the IMA measurement list in > the error code paths in ima_add_kexec_buffer() function. > > Signed-off-by: Lakshmi Ramasubramanian > Suggested-by: Tyler Hicks > Fixes: 7b8589cc29e7 ("ima: on soft reboot, sa

Re: [PATCH] selinux: include a consumer of the new IMA critical data hook

2021-01-14 Thread Tyler Hicks
urements | tail -1 | > > cut -d' ' -f 6 > > > > Note that the actual verification of SELinux policy would require loading > > the expected policy into an identical kernel on a pristine/known-safe > > system and run the sha256sum /sys/kernel/selinux/policy there

Re: [PATCH AUTOSEL 5.7 03/30] ima: extend boot_aggregate with kernel measurements

2021-01-12 Thread Tyler Hicks
On 2020-12-14 10:42:24, Tyler Hicks wrote: > On 2020-12-11 06:01:54, Mimi Zohar wrote: > > On Thu, 2020-12-10 at 21:10 -0600, Tyler Hicks wrote: > > > On 2020-11-29 08:17:38, Mimi Zohar wrote: > > > > Hi Sasha, > > > > > > > > On Wed, 2020-07-

Re: [PATCH AUTOSEL 5.7 03/30] ima: extend boot_aggregate with kernel measurements

2020-12-14 Thread Tyler Hicks
On 2020-12-11 06:01:54, Mimi Zohar wrote: > On Thu, 2020-12-10 at 21:10 -0600, Tyler Hicks wrote: > > On 2020-11-29 08:17:38, Mimi Zohar wrote: > > > Hi Sasha, > > > > > > On Wed, 2020-07-08 at 21:27 -0400, Sasha Levin wrote: > > > > On Wed, Ju

Re: [PATCH v9 5/8] IMA: limit critical data measurement based on a label

2020-12-12 Thread Tyler Hicks
unc CRITICAL_DATA, the data from all the > supported kernel subsystems is measured. > > Signed-off-by: Tushar Sugandhi Reviewed-by: Tyler Hicks Tyler > --- > Documentation/ABI/testing/ima_policy | 2 ++ > security/integrity/ima/ima_policy.c | 37 +

Re: [PATCH v9 4/8] IMA: add policy rule to measure critical data

2020-12-12 Thread Tyler Hicks
Tushar Sugandhi This looks nice. Thanks for the changes! Reviewed-by: Tyler Hicks Tyler > --- > Documentation/ABI/testing/ima_policy | 2 +- > security/integrity/ima/ima_policy.c | 29 > 2 files changed, 26 insertions(+), 5 deletions(-) > > dif

Re: [PATCH v8 4/8] IMA: add policy rule to measure critical data

2020-12-12 Thread Tyler Hicks
On 2020-12-11 17:17:22, Tushar Sugandhi wrote: > > > On 2020-12-11 4:25 p.m., Tyler Hicks wrote: > > On 2020-12-11 15:58:03, Tushar Sugandhi wrote: > > > A new IMA policy rule is needed for the IMA hook > > > ima_measure_critical_data() and the cor

Re: [PATCH v8 8/8] selinux: include a consumer of the new IMA critical data hook

2020-12-11 Thread Tyler Hicks
gt; Note that the actual verification of SELinux policy would require loading > the expected policy into an identical kernel on a pristine/known-safe > system and run the sha256sum /sys/kernel/selinux/policy there to get > the expected hash. > > Signed-off-by: Lakshmi Ramasubra

Re: [PATCH v8 4/8] IMA: add policy rule to measure critical data

2020-12-11 Thread Tyler Hicks
t = rule->data_source; > + break; I guess this case should unconditionally return true in this patch and then the include this additional logic in the next patch. Sorry, I missed these on my last review. Tyler > default: > return false; > } &

Re: [PATCH v8 3/8] IMA: define a hook to measure kernel integrity critical data

2020-12-11 Thread Tyler Hicks
l > integrity critical data. > > Signed-off-by: Tushar Sugandhi Reviewed-by: Tyler Hicks Tyler > --- > include/linux/ima.h | 6 ++ > security/integrity/ima/ima.h | 1 + > security/integrity/ima/ima_api.c | 2 +- > security/integrity/ima/i

Re: [PATCH v8 1/8] IMA: generalize keyring specific measurement constructs

2020-12-11 Thread Tyler Hicks
er to extend them without code duplication. > > Refactor the keyring specific measurement constructs to be generic and > reusable in other measurement scenarios. > > Signed-off-by: Tushar Sugandhi > Reviewed-by: Tyler Hicks This looks good to me. Thanks! Tyler > --

Re: [PATCH v8 2/8] IMA: add support to measure buffer data hash

2020-12-11 Thread Tyler Hicks
a buffer, which would be much smaller, instead of the buffer > itself. > > Signed-off-by: Tushar Sugandhi Reviewed-by: Tyler Hicks Tyler > --- > security/integrity/ima/ima.h | 3 +- > security/integrity/ima/ima_appraise.c| 2 +- > securit

Re: [PATCH v7 8/8] selinux: include a consumer of the new IMA critical data hook

2020-12-11 Thread Tyler Hicks
On 2020-12-11 09:36:30, Tyler Hicks wrote: > The calls to pr_err() in this aren't quite following the style of the > other error SELinux error messages. Sorry, I left out a word. I meant to say that the calls to pr_err() in this *file* aren't quite following the right style. Plea

Re: [PATCH v7 8/8] selinux: include a consumer of the new IMA critical data hook

2020-12-11 Thread Tyler Hicks
Runtime disable is deprecated, use selinux=0 on the kernel cmdline.\n"); security/selinux/selinuxfs.c: pr_err("SELinux: failed to load policy booleans\n"); security/selinux/selinuxfs.c: pr_err("SELinux: failed to load policy classes\n"); ... secu

Re: [PATCH AUTOSEL 5.7 03/30] ima: extend boot_aggregate with kernel measurements

2020-12-10 Thread Tyler Hicks
2] should always > include PCRs 8 & 9. I'm still not clear on how an attestation server would know to include PCRs 8 and 9 after this change came through a stable kernel update. It doesn't seem like something appropriate for stable since it requires code changes to attestation servers

Re: [PATCH v7 2/8] IMA: add support to measure buffer data hash

2020-12-10 Thread Tyler Hicks
On 2020-12-10 17:21:19, Tushar Sugandhi wrote: > > > On 2020-12-10 2:38 p.m., Tyler Hicks wrote: > > On 2020-12-09 11:42:06, Tushar Sugandhi wrote: > > > The original IMA buffer data measurement sizes were small (e.g. boot > > > command line), but the new buffe

Re: [PATCH v7 7/8] IMA: define a builtin critical data measurement policy

2020-12-10 Thread Tyler Hicks
e kernel command line > contains "ima_policy=critical_data". > > Update the documentation on kernel parameters to document > the new critical data builtin policy. > > Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Tyler Hicks Tyler > --- > Documentation/a

Re: [PATCH v7 6/8] IMA: extend critical data hook to limit the measurement based on a label

2020-12-10 Thread Tyler Hicks
xtend the IMA hook ima_measure_critical_data() to support passing > the data source label as an input parameter, so that the policy rule can > be used to limit the measurements based on the label. > > Signed-off-by: Tushar Sugandhi Reviewed-by: Tyler Hicks Tyler > --- > in

Re: [PATCH v7 5/8] IMA: limit critical data measurement based on a label

2020-12-10 Thread Tyler Hicks
unc CRITICAL_DATA, the data from all the > supported kernel subsystems is measured. > > Signed-off-by: Tushar Sugandhi This patch will look good once all the IMA_DATA_SOURCE stuff is moved over from patch #4. Tyler > --- > Documentation/ABI/testing/ima_policy | 2 ++ > security

Re: [PATCH v7 4/8] IMA: add policy rule to measure critical data

2020-12-10 Thread Tyler Hicks
try->action & ~(MEASURE | DONT_MEASURE)) > + return false; > + > + if (!(entry->flags & IMA_DATA_SOURCE) || > + (entry->flags & ~(IMA_FUNC | IMA_UID | IMA_PCR | > + IMA_DATA_SOURCE))) IMA_DATA_SOURCE shouldn't exist in this patch. This isn't the right indentation, either. See how IMA_KEYRINGS is indented in the KEY_CHECK case above. Tyler > + return false; > + > + if (ima_rule_contains_lsm_cond(entry)) > + return false; > + > break; > default: > return false; > -- > 2.17.1 >

Re: [PATCH v7 3/8] IMA: define a hook to measure kernel integrity critical data

2020-12-10 Thread Tyler Hicks
static int ima_parse_rule(char *rule, struct > ima_rule_entry *entry) > else if (IS_ENABLED(CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS) > && >strcmp(args[0].from, "KEY_CHECK") == 0) > entry->func = KEY_CHECK; > + else if (strcmp(args[0].from, "CRITICAL_DATA") == 0) > + entry->func = CRITICAL_DATA; > else > result = -EINVAL; > if (!result) This hunk and the above change to Documentation/ABI/testing/ima_policy need to be moved to the next patch when you introduce the policy changes. Tyler > -- > 2.17.1 >

Re: [PATCH v7 1/8] IMA: generalize keyring specific measurement constructs

2020-12-10 Thread Tyler Hicks
rent patch is fine: Reviewed-by: Tyler Hicks > --- > security/integrity/ima/ima.h| 6 ++-- > security/integrity/ima/ima_api.c| 6 ++-- > security/integrity/ima/ima_main.c | 6 ++-- > security/integrity/ima/ima_policy.c | 49 ++--- >

Re: [PATCH v7 2/8] IMA: add support to measure buffer data hash

2020-12-10 Thread Tyler Hicks
e(&event_data, &entry, template); > if (ret < 0) { > audit_cause = "alloc_entry"; A few more lines below, not present in this context, is a call to ima_store_template() with buf as the fourth parameter passed in. That parameter eventually makes i

Re: [PATCH] seccomp: Remove bogus __user annotations

2020-11-20 Thread Tyler Hicks
be changed to this: Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") If you agree, please adjust and resubmit with: Reviewed-by: Tyler Hicks Thank you! Tyler > Signed-off-by: Jann Horn > --- > kernel/seccomp.c | 4 ++-- > 1 file changed, 2 i

Re: [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND

2020-11-19 Thread Tyler Hicks
On 2020-11-05 09:28:38, Tyler Hicks wrote: > On 2020-11-05 09:58:54, Will Deacon wrote: > > On Wed, Nov 04, 2020 at 11:40:09PM -0600, Tyler Hicks wrote: > > > On 2020-11-04 12:08:12, Will Deacon wrote: > > > > On Tue, Nov 03, 2020 at 09:59:52AM -0600, Tyler Hicks wro

Re: [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND

2020-11-05 Thread Tyler Hicks
On 2020-11-05 09:58:54, Will Deacon wrote: > On Wed, Nov 04, 2020 at 11:40:09PM -0600, Tyler Hicks wrote: > > On 2020-11-04 12:08:12, Will Deacon wrote: > > > On Tue, Nov 03, 2020 at 09:59:52AM -0600, Tyler Hicks wrote: > > > > On 2020-09-21 14:15:55, Tyler Hick

Re: [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND

2020-11-04 Thread Tyler Hicks
On 2020-11-04 12:08:12, Will Deacon wrote: > On Tue, Nov 03, 2020 at 09:59:52AM -0600, Tyler Hicks wrote: > > On 2020-09-21 14:15:55, Tyler Hicks wrote: > > > Provide the CONFIG_CMDLINE_EXTEND config option for arm64 kernels. This > > > config option can be used to ext

Re: [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND

2020-11-03 Thread Tyler Hicks
On 2020-09-21 14:15:55, Tyler Hicks wrote: > Provide the CONFIG_CMDLINE_EXTEND config option for arm64 kernels. This > config option can be used to extend the kernel command line parameters, > specified by the bootloader, with additional command line parameters > specified i

[PATCH] tpm: efi: Don't create binary_bios_measurements file for an empty log

2020-10-28 Thread Tyler Hicks
/linux-integrity/e1fdcccb-ca51-4aee-ac83-9cde995ea...@canonical.com/ Reported-by: Kai-Heng Feng Reported-by: Kenneth R. Crudup Reported-by: Mimi Zohar Cc: Thiébaud Weksteen Cc: Ard Biesheuvel Signed-off-by: Tyler Hicks --- drivers/char/tpm/eventlog/efi.c | 5 + 1 file changed, 5 insertions

Re: [PATCH] tpm: efi: Don't create binary_bios_measurements file for an empty log

2020-10-28 Thread Tyler Hicks
On 2020-10-28 10:41:02, Tyler Hicks wrote: > Mimic the pre-existing ACPI and Device Tree event log behavior by not > creating the binary_bios_measurements file when the EFI TPM event log is > empty. > > This fixes the following NULL pointer dereference that can occur when > r

Re: [PATCH] tpm: efi: Don't create binary_bios_measurements file for an empty log

2020-10-28 Thread Tyler Hicks
On 2020-10-28 11:30:11, Tyler Hicks wrote: > So, we need help from Kai, Kenneth, or Mimi to verify my assumption that > their firmware is providing an empty main event log and a populated > final event log. Hi Kai, Kenneth, and Mimi - could one or two of you please follow these steps:

Re: [Regression] "tpm: Require that all digests are present in TCG_PCR_EVENT2 structures" causes null pointer dereference

2020-10-26 Thread Tyler Hicks
On 2020-10-26 13:49:59, Kai-Heng Feng wrote: > > > > On Oct 21, 2020, at 13:48, Tyler Hicks wrote: > > > > On 2020-10-20 17:07:50, Mimi Zohar wrote: > >> On Tue, 2020-09-29 at 13:52 -0400, Mimi Zohar wrote: > >>> On Mon, 2020-09-28 at 22:16

Re: [Regression] "tpm: Require that all digests are present in TCG_PCR_EVENT2 structures" causes null pointer dereference

2020-10-20 Thread Tyler Hicks
gt; > > > I'm seeing this too on my test Ubuntu laptop. Reverting the patch > > fixes it, but there's no data. > > For a while I wasn't able to boot the test system with secure boot > enabled. The NULL pointer dereference problem occurred during the

Re: [Regression] "tpm: Require that all digests are present in TCG_PCR_EVENT2 structures" causes null pointer dereference

2020-10-13 Thread Tyler Hicks
W, we've had this patch applied to our internal kernel for a month and haven't seen any issues. Tyler > > > Thanks! > > > > Kai-Heng > > /Jarkko >

[PATCH 1/2] arm64: kaslr: Refactor early init command line parsing

2020-09-21 Thread Tyler Hicks
strings without having to concatenate the strings in early init. Signed-off-by: Tyler Hicks --- arch/arm64/kernel/kaslr.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arm64/kernel/kaslr.c b/arch/arm64/kernel/kaslr.c index b181e0544b79..4c779a67c2a6 10064

[PATCH 2/2] arm64: Extend the kernel command line from the bootloader

2020-09-21 Thread Tyler Hicks
development kernel versions, where one of the versions benefits from additional command line parameters, such as debugging options. 2) Specifying additional command line parameters, for additional tuning or debugging, when the bootloader does not offer an interactive mode. Signed-off-by: Tyler

[PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND

2020-09-21 Thread Tyler Hicks
ASLR are enabled * Set CONFIG_CMDLINE="nokaslr apparmor=0" and CONFIG_CMDLINE_FORCE=y - The CONFIG_CMDLINE value is used and does not contain the bootloader's command line - AppArmor and KASLR are disabled Tyler Tyler Hicks (2): arm64: kaslr: Refactor early init command line

Re: [PATCH v2 0/2] ima: Fix keyrings race condition and other key related bugs

2020-08-24 Thread Tyler Hicks
On 2020-08-24 14:44:55, Mimi Zohar wrote: > Hi Tyler, > > On Tue, 2020-08-11 at 14:26 -0500, Tyler Hicks wrote: > > v2: > > - Always return an ERR_PTR from ima_alloc_rule_opt_list() (Nayna) > > - Add Lakshmi's Reviewed-by to both patches > > - Rebased on c

[PATCH v2 2/2] ima: Fail rule parsing when asymmetric key measurement isn't supportable

2020-08-11 Thread Tyler Hicks
authors don't assume that these policy language constructs are supported. Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Fixes: 5808611cccb2 ("IMA: Add KEY_CHECK func to measure keys") Suggested-by: Nayna Jain Signed-off-by: Tyler Hicks Review

[PATCH v2 0/2] ima: Fix keyrings race condition and other key related bugs

2020-08-11 Thread Tyler Hicks
to be fully parsed at this time) and using "|" as an alternation delimiter is becoming the norm in IMA policy. This series is based on commit 311aa6aafea4 ("ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime") in next-integrity. Tyler Tyler Hicks (2): ima:

[PATCH v2 1/2] ima: Pre-parse the list of keyrings in a KEY_CHECK rule

2020-08-11 Thread Tyler Hicks
f keyrings was longer than what could fit in the fixed size tbuf buffer in ima_policy_show(). Fixes: 5c7bac9fb2c5 ("IMA: pre-allocate buffer to hold keyrings string") Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Signed-off-by: Tyler Hicks Reviewed-by:

Re: [PATCH 1/2] ima: Pre-parse the list of keyrings in a KEY_CHECK rule

2020-08-06 Thread Tyler Hicks
On 2020-08-06 11:34:43, Nayna wrote: > > On 7/27/20 10:08 AM, Tyler Hicks wrote: > > The ima_keyrings buffer was used as a work buffer for strsep()-based > > parsing of the "keyrings=" option of an IMA policy rule. This parsing > > was re-performed each tim

Re: [PATCH v6 0/4] LSM: Measure security module data

2020-08-05 Thread Tyler Hicks
On 2020-08-05 09:07:48, Lakshmi Ramasubramanian wrote: > On 8/5/20 8:45 AM, Tyler Hicks wrote: > > On 2020-08-05 08:36:40, Casey Schaufler wrote: > > > On 8/4/2020 6:14 PM, Lakshmi Ramasubramanian wrote: > > > > On 8/4/20 6:04 PM, Casey Schaufler wrote: > >

Re: [PATCH v6 0/4] LSM: Measure security module data

2020-08-05 Thread Tyler Hicks
On 2020-08-05 09:21:24, Lakshmi Ramasubramanian wrote: > On 8/5/20 9:14 AM, Tyler Hicks wrote: > > On 2020-08-05 09:07:48, Lakshmi Ramasubramanian wrote: > > > On 8/5/20 8:45 AM, Tyler Hicks wrote: > > > > On 2020-08-05 08:36:40, Casey Schaufler wrote: > >

Re: [PATCH v6 1/4] IMA: Add func to measure LSM state and policy

2020-08-05 Thread Tyler Hicks
gt; Ok, measuring the policy separately from other critical data makes > > sense. Instead of measuring the policy, which is large, measure the > > policy hash. > > I think that was the original approach. However, I had concerns with > adding code to SELinux to compute a hash over the policy versus > leaving that to IMA's existing policy and mechanism. If that's > preferred I guess we can do it that way but seems less flexible and > duplicative. In AppArmor, we store the sha1 of the raw policy as the policy is loaded. The hash is exposed to userspace in apparmorfs. See commit 5ac8c355ae00 ("apparmor: allow introspecting the loaded policy pre internal transform"). It has proved useful as a mechanism for debugging as sometimes the on-disk policy doesn't match the loaded policy and this can be a good way to check that while providing support to users. John also mentions checkpoint/restore in the commit message and I could certainly see how the policy hashes would be useful in that scenario. When thinking through how Lakshmi's series could be extended for AppArmor support, I was thinking that the AppArmor policy measurement would be a measurement of these hashes that we already have in place. Perhaps there's some general usefulness in storing/exposing an SELinux policy hash rather than only seeing it as duplicative property required this measurement series? Tyler

Re: [PATCH v6 0/4] LSM: Measure security module data

2020-08-05 Thread Tyler Hicks
x feature, so you should > be using SELINUX_STATE and SELINUX_POLICY, as I suggested > before. Just because SELinux has state and policy to measure > doesn't mean that a different module might not have other data, > such as history, that should be covered as well. In addition

Re: [PATCH v5 4/4] IMA: Handle early boot data measurement

2020-07-30 Thread Tyler Hicks
On 2020-07-30 11:02:50, Lakshmi Ramasubramanian wrote: > On 7/29/20 8:47 PM, Lakshmi Ramasubramanian wrote: > > Hi Tyler, > > > diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig > > index 080c53545ff0..86cba844f73c 100644 > > --- a/

Re: [PATCH v5 1/4] IMA: Add func to measure LSM state and policy

2020-07-30 Thread Tyler Hicks
On 2020-07-30 08:15:34, Lakshmi Ramasubramanian wrote: > On 7/30/20 8:02 AM, Tyler Hicks wrote: > > > > diff --git a/security/integrity/ima/ima_policy.c > > > b/security/integrity/ima/ima_policy.c > > > index 07f033634b27..a0f5c39d9084 100644 > > >

Re: [PATCH v5 2/4] IMA: Define IMA hooks to measure LSM state and policy

2020-07-30 Thread Tyler Hicks
to measure LSM state and LSM policy > respectively. Return the status of the measurement operation from these > two IMA hooks. > > Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Tyler Hicks Tyler > --- > include/linux/ima.h | 14 + > se

Re: [PATCH v5 1/4] IMA: Add func to measure LSM state and policy

2020-07-30 Thread Tyler Hicks
rules with these specified hook functions when an LSM that has measurement support is enabled. This messes up the ordering of your patch series but it could be as simple as doing this: else if (IS_ENABLED(CONFIG_SECURITY_SELINUX) &&

[PATCH 2/2] ima: Fail rule parsing when asymmetric key measurement isn't supportable

2020-07-27 Thread Tyler Hicks
authors don't assume that these policy language constructs are supported. Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Fixes: 5808611cccb2 ("IMA: Add KEY_CHECK func to measure keys") Suggested-by: Nayna Jain Signed-off-by: Tyler Hicks --- secu

[PATCH 0/2] ima: Fix keyrings race condition and other key related bugs

2020-07-27 Thread Tyler Hicks
d using "|" as an alternation delimiter is becoming the norm in IMA policy. This series is based on commit 311aa6aafea4 ("ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime") in next-integrity. Tyler Tyler Hicks (2): ima: Pre-parse the list of keyrings in

[PATCH 1/2] ima: Pre-parse the list of keyrings in a KEY_CHECK rule

2020-07-27 Thread Tyler Hicks
f keyrings was longer than what could fit in the fixed size tbuf buffer in ima_policy_show(). Fixes: 5c7bac9fb2c5 ("IMA: pre-allocate buffer to hold keyrings string") Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Signed-off-by: Tyler Hicks --- securi

Re: [PATCH v2 1/1] loop: scale loop device by introducing per device lock

2020-07-23 Thread Tyler Hicks
uct loop_device. Keep loop_ctl_mutex to protect global > data such as loop_index_idr, loop_lookup, loop_add. > > Lock ordering: loop_ctl_mutex > lo_mutex. > > Signed-off-by: Pavel Tatashin Thanks for the revision. Reviewed-by: Tyler Hicks Ty

Re: [PATCH v1 1/1] loop: scale loop device by introducing per device lock

2020-07-23 Thread Tyler Hicks
On 2020-07-23 14:29:31, Pavel Tatashin wrote: > Hi Tyler, > > Thank you for the review comments. My replies are inlined below. > > > > Scale it by introducing per-device lock: lo_mutex that proctests > > > field in struct loop_device. Keep loop_ctl_mutex to prot

Re: [PATCH v1 1/1] loop: scale loop device by introducing per device lock

2020-07-23 Thread Tyler Hicks
troy() in loop_remove(). > lo->lo_number = i; > spin_lock_init(&lo->lo_lock); > disk->major = LOOP_MAJOR; > @@ -2272,15 +2274,21 @@ static long loop_control_ioctl(struct file *file, > unsigned int cmd, > ret =

Re: [PATCH v3 06/12] ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond

2020-07-17 Thread Tyler Hicks
On 2020-07-17 14:19:03, Tyler Hicks wrote: > On 2020-07-17 14:56:46, Nayna wrote: > > > > On 7/9/20 2:19 AM, Tyler Hicks wrote: > > > The KEY_CHECK function only supports the uid, pcr, and keyrings > > > conditionals. Make this clear at policy load so that IMA

Re: [PATCH v3 01/12] ima: Have the LSM free its audit rule

2020-07-17 Thread Tyler Hicks
On 2020-07-17 15:20:22, Nayna wrote: > > On 7/9/20 2:19 AM, Tyler Hicks wrote: > > Ask the LSM to free its audit rule rather than directly calling kfree(). > > Is it to be called audit rule or filter rule ?  Likewise in subject line. The security hooks call this "audit r

Re: [PATCH v3 06/12] ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond

2020-07-17 Thread Tyler Hicks
On 2020-07-17 14:56:46, Nayna wrote: > > On 7/9/20 2:19 AM, Tyler Hicks wrote: > > The KEY_CHECK function only supports the uid, pcr, and keyrings > > conditionals. Make this clear at policy load so that IMA policy authors > > don't assume that other conditionals

Re: [PATCH v3 07/12] ima: Fail rule parsing when appraise_flag=blacklist is unsupportable

2020-07-17 Thread Tyler Hicks
On 2020-07-17 13:40:22, Nayna wrote: > > On 7/9/20 2:19 AM, Tyler Hicks wrote: > > The "appraise_flag" option is only appropriate for appraise actions > > and its "blacklist" value is only appropriate when > > CONFIG_IMA_APPRAISE_MODSIG is enabl

Re: [PATCH v3 08/12] ima: Shallow copy the args_p member of ima_rule_entry.lsm elements

2020-07-17 Thread Tyler Hicks
On 2020-07-17 18:35:03, Konsta Karsisto wrote: > Hi, > > Found one glitch with this change, see below: > > On Thu, Jul 9, 2020 at 9:22 AM Tyler Hicks > wrote: > > > > The args_p member is a simple string that is allocated by > > ima_rule_init(). Shallow copy

Re: [PATCH v3 00/12] ima: Fix rule parsing bugs and extend KEXEC_CMDLINE rule support

2020-07-16 Thread Tyler Hicks
On 2020-07-17 00:31:33, Mimi Zohar wrote: > On Thu, 2020-07-09 at 01:18 -0500, Tyler Hicks wrote: > > This series ultimately extends the supported IMA rule conditionals for > > the KEXEC_CMDLINE hook function. As of today, there's an imbalance in > > IMA langua

Re: [PATCH v3 07/12] ima: Fail rule parsing when appraise_flag=blacklist is unsupportable

2020-07-16 Thread Tyler Hicks
On 2020-07-16 14:14:50, Mimi Zohar wrote: > On Thu, 2020-07-09 at 01:19 -0500, Tyler Hicks wrote: > > The "appraise_flag" option is only appropriate for appraise actions > > and its "blacklist" value is only appropriate when > > CONFIG_IMA_APPRAISE_MODSI

Re: [RFC PATCH v3 03/12] security: add ipe lsm policy parser and policy loading

2020-07-15 Thread Tyler Hicks
think we should enforce that cap here, too. Thinking about it some more, I find it a little odd that we're spreading the files necessary to update a policy across both procfs (sysctl) and securityfs. It looks like procfs will have different semantics than securityfs after looking at proc_sys_pe

Re: [PATCH v2] tpm: Require that all digests are present in TCG_PCR_EVENT2 structures

2020-07-15 Thread Tyler Hicks
On 2020-07-13 23:57:19, Jarkko Sakkinen wrote: > On Fri, Jul 10, 2020 at 02:29:55PM -0500, Tyler Hicks wrote: > > Require that the TCG_PCR_EVENT2.digests.count value strictly matches the > > value of TCG_EfiSpecIdEvent.numberOfAlgorithms in the event field of the > > TCG_PCCli

[PATCH v2] ima: Rename internal audit rule functions

2020-07-10 Thread Tyler Hicks
Rename IMA's internal audit rule functions from security_filter_rule_*() to ima_filter_rule_*(). This avoids polluting the security_* namespace, which is typically reserved for general security subsystem infrastructure. Signed-off-by: Tyler Hicks Suggested-by: Casey Schaufler ---

  1   2   3   4   5   6   7   8   9   10   >