Page MenuHomeFreeBSD

ali_mashtizadeh.com (Ali Mashtizadeh)
Research

Projects

User does not belong to any projects.

User Details

User Since
Mar 7 2018, 6:37 PM (79 w, 5 d)

Professor @ University of Waterloo
https://cs.uwaterloo.ca/~mashti/

Recent Activity

May 24 2019

ali_mashtizadeh.com added a comment to D20366: Bug 182518: Support crypt parameters in login.conf.

This version does not change the default, but allows users to change the parameters.

But can't one already use e.g. $6$rounds=100000$xxxxx$ as salt? Or are you talking about something different?

May 24 2019, 7:01 PM
ali_mashtizadeh.com added a comment to D20366: Bug 182518: Support crypt parameters in login.conf.

This version does not change the default, but allows users to change the parameters.

May 24 2019, 5:20 PM
ali_mashtizadeh.com updated the diff for D20366: Bug 182518: Support crypt parameters in login.conf.
  • strn -> strl
May 24 2019, 3:59 AM
ali_mashtizadeh.com retitled D20366: Bug 182518: Support crypt parameters in login.conf from Bug 182518: Change default hash function and support crypt parameters in login.conf to Bug 182518: Support crypt parameters in login.conf.
May 24 2019, 3:43 AM
ali_mashtizadeh.com updated the diff for D20366: Bug 182518: Support crypt parameters in login.conf.
  • Fix man page
May 24 2019, 3:26 AM
ali_mashtizadeh.com updated the diff for D20366: Bug 182518: Support crypt parameters in login.conf.
  • Making requested changes
May 24 2019, 3:20 AM
ali_mashtizadeh.com added a comment to D20366: Bug 182518: Support crypt parameters in login.conf.

In the Kitchener/Waterloo hackathon we discussed the plan as three parts

  1. Allan is working to port the improvements from OpenBSD bcrypt back to FreeBSD.
  2. (This patch) allow users to overwrite the default parameters through login.conf
  3. Work on importing Argon2 as an alternative (and maybe scrypt if there's interest)
May 24 2019, 3:03 AM

May 23 2019

ali_mashtizadeh.com added inline comments to D20366: Bug 182518: Support crypt parameters in login.conf.
May 23 2019, 4:50 PM

May 22 2019

ali_mashtizadeh.com retitled D20366: Bug 182518: Support crypt parameters in login.conf from Change default hash function and support crypt parameters in login.conf to Bug 182518: Change default hash function and support crypt parameters in login.conf.
May 22 2019, 11:06 PM
ali_mashtizadeh.com updated the diff for D20366: Bug 182518: Support crypt parameters in login.conf.
  • Update default rounds for bcrypt
May 22 2019, 11:05 PM
ali_mashtizadeh.com created D20366: Bug 182518: Support crypt parameters in login.conf.
May 22 2019, 10:52 PM

May 21 2019

ali_mashtizadeh.com added a comment to D20326: Expose the buildid hash through sysctl.

Tinderbox passed

May 21 2019, 1:54 PM
ali_mashtizadeh.com updated the diff for D20326: Expose the buildid hash through sysctl.
  • Adding defines
May 21 2019, 1:53 PM

May 20 2019

ali_mashtizadeh.com updated the diff for D20326: Expose the buildid hash through sysctl.
  • Update man page and remove from -a
May 20 2019, 9:52 PM
ali_mashtizadeh.com added a comment to D20326: Expose the buildid hash through sysctl.

Sample output:
root@skylake8:~ # uname -a
FreeBSD skylake8.rcs.uwaterloo.ca 13.0-CURRENT FreeBSD 13.0-CURRENT #9 da147860ca7(master)-dirty: Mon May 20 17:32:20 EDT 2019 ali@strange.rcs.uwaterloo.ca:/build/ali/obj/working/freebsd-dev/amd64.amd64/sys/GENERIC amd64 42e907d740dd9560a2dfd7187eee20e41e9fbd9f
root@skylake8:~ # uname -b
42e907d740dd9560a2dfd7187eee20e41e9fbd9f

May 20 2019, 9:40 PM
ali_mashtizadeh.com updated the diff for D20326: Expose the buildid hash through sysctl.
  • Addresses Ed Maste's feedback. This change allows the sysctl to return any build-id between 1 and 20 bytes.
May 20 2019, 9:37 PM
ali_mashtizadeh.com added inline comments to D20326: Expose the buildid hash through sysctl.
May 20 2019, 9:32 PM
ali_mashtizadeh.com updated the diff for D20326: Expose the buildid hash through sysctl.
  • Updates and linker scripts for other archs
May 20 2019, 9:19 PM
ali_mashtizadeh.com updated the summary of D20326: Expose the buildid hash through sysctl.
May 20 2019, 9:02 PM
ali_mashtizadeh.com created D20326: Expose the buildid hash through sysctl.
May 20 2019, 8:57 PM

Jan 28 2019

ali_mashtizadeh.com created D18997: sysutils/ori: Update to 0.8.2.
Jan 28 2019, 1:59 AM

Sep 24 2018

ali_mashtizadeh.com updated the diff for D14609: Split libc into libc and libsys.

Hello Brooks,

Sep 24 2018, 2:06 AM

Sep 17 2018

ali_mashtizadeh.com added a comment to D14609: Split libc into libc and libsys.

Hello Brooks,

Sep 17 2018, 3:47 PM

Sep 11 2018

ali_mashtizadeh.com updated the diff for D14609: Split libc into libc and libsys.

Refresh diff to head

Sep 11 2018, 1:01 AM

Jun 27 2018

ali_mashtizadeh.com retitled D14609: Split libc into libc and libsys from Provide libc_nosyscalls and libsyscalls to Split libc into libc and libsys.
Jun 27 2018, 6:27 PM
ali_mashtizadeh.com updated the summary of D14609: Split libc into libc and libsys.
Jun 27 2018, 6:01 PM
ali_mashtizadeh.com created D16029: Add the D-Link DWA-125 A3 to run(4).
Jun 27 2018, 3:00 AM
ali_mashtizadeh.com added a comment to D14609: Split libc into libc and libsys.

Brooks & Konstantin if there's no objections I'm consolidating all the system call symbols for libsys/libc together. They have to be kept in sync to support library filtering otherwise it breaks. There's some fallout from that deduplication work, I'll wrap that up tomorrow.

Jun 27 2018, 2:53 AM
ali_mashtizadeh.com added a reviewer for D14609: Split libc into libc and libsys: kib.
Jun 27 2018, 2:50 AM
ali_mashtizadeh.com updated the diff for D14609: Split libc into libc and libsys.

Updated patch against head and lots of cleanup to amd64 and i386. Similar cleanup in progress on other platforms.

Jun 27 2018, 2:07 AM
ali_mashtizadeh.com updated the test plan for D14609: Split libc into libc and libsys.
Jun 27 2018, 12:03 AM
ali_mashtizadeh.com added a reviewer for D14609: Split libc into libc and libsys: talg_cs.stanford.edu.
Jun 27 2018, 12:02 AM

Apr 27 2018

ali_mashtizadeh.com added a comment to D15054: Stop clearing PSL_T on the trace trap..
In D15054#320744, @kib wrote:

kib: I also wonder if we can push the logic into the ptrace code rather than making the trap code more complex. It seems other BSDs have pushed the behavior into the trap code. IIRC, they call into the arch specific code from sys_process.c to set/clear the trace flag. Noticed this when I was looking for the original patches.

I do not think that trying to move that into MI layer is feasible. The methods to manage single stepping are too arch-depended. IMO it is fine to have that logic in trap/machdep sendsig(). And, we do have ptrace_single_step()/ptrace_clear_single_step(), more, they are patched in the revision.

We should probably check in a few regression tests to verify the trace flag and fork+tracing behavior on x86. I can send you the ones I have if you want to use those.

It would be best if you create ATF tests and put them into review.

Apr 27 2018, 7:10 PM
ali_mashtizadeh.com added a comment to D15054: Stop clearing PSL_T on the trace trap..
In D15054#320004, @jhb wrote:

Hmm, if this code works now then it might be relying on the existing semantics that stepping is auto-disabled and has to be re-enabled in the SIGTRAP handler to keep stepping? It's not clear. Linux does seem to jump through extra hoops to permit userland to set PSL_T. Linux also permits PSL_T to be set explicitly via PT_SETREGS which FreeBSD does not (and for which sbcl has an explicit hack). We should perhaps permit PT_SETREGS to change PSL_T in addition to these hoops. (In Linux there is a TIF_FORCED_TF flag that seems to function like TDB_STEP and Linux goes further out of its way to "hide" PSL_T from registers returned by PT_GETREGS if PSL_T is only set due to TDB_STEP and not explicitly by userland as well)

Apr 27 2018, 3:35 PM
ali_mashtizadeh.com added a comment to D15054: Stop clearing PSL_T on the trace trap..
In D15054#319974, @jhb wrote:

Honestly, I'm not really sure how useful it is to try to let user processes set PSL_T themselves in user space. It's never worked in any version of FreeBSD and it is requiring several changes to accomodate. I would probably just go back to not preserving PSL_T on exec() and leave the existing handling of PSL_T for debug traps alone under the assumption that the only really sane way to use PSL_T is via a debugger using ptrace(). Are you aware of anything that wants to use PSL_T on itself without using ptrace()?

Apr 27 2018, 3:23 PM

Apr 12 2018

ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.

Rebase

Apr 12 2018, 12:22 AM

Apr 11 2018

ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

Done

Apr 11 2018, 11:10 PM
ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.
  • Update copyright
Apr 11 2018, 11:09 PM
ali_mashtizadeh.com added a comment to D14609: Split libc into libc and libsys.

Copy from my email regarding the proposed plan

Apr 11 2018, 5:51 PM

Apr 9 2018

ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.
--- universe_kernconf_mips_PB92 ---
--- universe_kernconf_mips_QCA953X_BASE ---
--- universe_kernconf_mips_RSPRO_STANDALONE ---
--- universe_i386_kernels ---
--- universe_kernconf_i386_GENERIC-NODEBUG ---
--- universe_kernconf_i386_LINT ---
--- universe_kernconf_i386_LINT-NOINET ---
--- universe_kernconf_i386_LINT-NOINET6 ---
--- universe_kernconf_i386_LINT-NOIP ---
--- universe_kernconf_i386_PAE ---
--- universe_mips_kernels ---
--- universe_kernconf_mips_SENTRY5 ---
--- universe_kernconf_mips_SWARM ---
--- universe_powerpc_kernels ---
--- universe_kernconf_powerpc_LINT ---
powerpc LINT kernel failed, check _.powerpc.LINT for details
--- universe_mips_kernels ---
--- universe_kernconf_mips_SWARM_SMP ---
--- universe_kernconf_mips_SWARM64 ---
--- universe_kernconf_mips_SWARM64_SMP ---
--- universe_kernconf_mips_XLP ---
--- universe_kernconf_mips_XLP64 ---
--- universe_kernconf_mips_XLPN32 ---
--- universe_arm_done ---
>> arm completed on Mon Apr  9 13:19:21 EDT 2018
--- universe_powerpc_kernels ---
--- universe_kernconf_powerpc_LINT64 ---
powerpc LINT64 kernel failed, check _.powerpc.LINT64 for details
--- universe_powerpc_done ---
>> powerpc completed on Mon Apr  9 13:19:25 EDT 2018
--- universe_mips_done ---
>> mips completed on Mon Apr  9 13:19:35 EDT 2018
--- universe_i386_done ---
>> i386 completed on Mon Apr  9 13:20:13 EDT 2018
--- universe_epilogue ---
--------------------------------------------------------------
>>> make universe completed on Mon Apr  9 13:20:13 EDT 2018
                      (started Mon Apr  9 13:01:48 EDT 2018)
--------------------------------------------------------------
Tinderbox failed:
arm.arm buildworld failed, check _.arm.arm.buildworld for details
arm.armeb buildworld failed, check _.arm.armeb.buildworld for details
powerpc LINT kernel failed, check _.powerpc.LINT for details
powerpc LINT64 kernel failed, check _.powerpc.LINT64 for details
Apr 9 2018, 6:08 PM
ali_mashtizadeh.com retitled D14989: Replace exect() with a portable version from Mark exect() as deprecated to Replace exect() with a portable version.
Apr 9 2018, 6:07 PM

Apr 7 2018

ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.
  • Remove the warning message
Apr 7 2018, 7:33 PM
ali_mashtizadeh.com added a comment to D14995: Fix PSL_T inheritance on exec for x86..

I noticed PSL_T flag is masked out in the trap and system call entry path. It only gets set again by ptrace(PT_STEP, ...). This appears to be intentional because of the way ptrace() is being used.

Apr 7 2018, 7:22 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

With this version of the code the functionality matches the documentation. We could remove the warn_references and leave the manual suggestion that this functionality has been replaced by ptrace. I left the warning from the NetBSD code but there's not much point if we have something that works.

Apr 7 2018, 4:45 PM
ali_mashtizadeh.com accepted D14995: Fix PSL_T inheritance on exec for x86..

In any case the changes look good. Just do something about the Linux compat files I listed as well.

Apr 7 2018, 2:33 AM
ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.
  • Ignore EBUSY errno
Apr 7 2018, 1:31 AM
ali_mashtizadeh.com added a comment to D14995: Fix PSL_T inheritance on exec for x86..

So this doesn't get lost this is the original change in SVN. It dates back before FreeBSD 2.0
https://svnweb.freebsd.org/base/head/sys/i386/i386/machdep.c?r1=4193&r2=4201

I find that hard to believe, given that the cvs versions before 2.0 do not exist in svn, or ncvs, and should only exist in an offline repository called cvs.

Apr 7 2018, 1:30 AM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

Running make tinderbox. I've backout the kernel change and added the code to ignore EBUSY.

Apr 7 2018, 1:04 AM
ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.
  • Ignore EBUSY errno
Apr 7 2018, 12:59 AM
ali_mashtizadeh.com added a comment to D14995: Fix PSL_T inheritance on exec for x86..

Probably you should fix or remove the dead code in the linux compat layer as well.

Apr 7 2018, 12:42 AM
ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.

Backout kernel as kib is taking care of this.

Apr 7 2018, 12:26 AM

Apr 6 2018

ali_mashtizadeh.com added a comment to D14995: Fix PSL_T inheritance on exec for x86..

With LLDB I can single step across an exec so we must be setting the trap flag elsewhere for ptrace() to work.

Apr 6 2018, 11:10 PM
ali_mashtizadeh.com added a comment to D14995: Fix PSL_T inheritance on exec for x86..

So this doesn't get lost this is the original change in SVN. It dates back before FreeBSD 2.0

Apr 6 2018, 10:31 PM
ali_mashtizadeh.com added a comment to D14995: Fix PSL_T inheritance on exec for x86..

If nobody has used this in 23 years and it's not present in other platforms do we need this?

Apr 6 2018, 10:26 PM
ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.
  • Remove the dead expression from i386/amd64 machdep
Apr 6 2018, 10:13 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

Well I made a few test cases to verify to myself all the differences and it turns out exect() doesn't even work on 11. It generates a trace fault in the original image and then stops generating faults in the new image.
exec_setregs() zeros out the registers then tries to maintain the value of regs->tf_eflags. Nothing in eflags appears to be preserved.
https://github.com/freebsd/freebsd/blob/master/sys/amd64/amd64/machdep.c#L596
https://github.com/freebsd/freebsd/blob/master/sys/i386/i386/machdep.c#L1130
https://svnweb.freebsd.org/base/head/sys/i386/i386/machdep.c?r1=4193&r2=4201
Unless something else has changed it seems we have a 23 year old regression?

Apr 6 2018, 9:25 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

Well I made a few test cases to verify to myself all the differences and it turns out exect() doesn't even work on 11. It generates a trace fault in the original image and then stops generating faults in the new image.

Apr 6 2018, 9:20 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

@rgrimes With this version of the patch do we need to do anything about stable/11? The behavior now should most closely match the documentation.

Apr 6 2018, 8:09 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

I'm waiting for make tinderbox to complete.

Apr 6 2018, 7:52 PM
ali_mashtizadeh.com updated the diff for D14989: Replace exect() with a portable version.
  • Address feedback
Apr 6 2018, 7:43 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.
In D14989#315376, @kib wrote:

I must note that i386 and amd64 (both native and compat32) execve(2) syscalls explicitly support inheriting PSL_T from the previosly executing program to the new one. So exect() behaves as designed, assuming the tracing faults fo not kill the process.

Apr 6 2018, 5:23 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

The netbsd test suite contains a test for exect but that should go away whenever someone pulls the latest version.

Apr 6 2018, 3:24 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.

This is the last bit of cleanup I sent a mail about this on the mailing list to look for objections. I will either today or tomorrow send all three of you a sketch of my plans for libsys.

Apr 6 2018, 3:21 PM
ali_mashtizadeh.com added a comment to D14989: Replace exect() with a portable version.
  • universe_i386_i386 ---

i386.i386 buildworld completed on Fri Apr 6 04:52:06 EDT 2018

  • universe_i386_kernels ---
  • universe_kernconf_i386_GENERIC ---
  • universe_kernconf_i386_GENERIC-NODEBUG ---
  • universe_kernconf_i386_LINT ---
  • universe_kernconf_i386_LINT-NOINET ---
  • universe_kernconf_i386_LINT-NOINET6 ---
  • universe_kernconf_i386_LINT-NOIP ---
  • universe_kernconf_i386_PAE ---
  • universe_arm64_aarch64 ---

arm64.aarch64 buildworld completed on Fri Apr 6 04:57:10 EDT 2018

  • universe_arm64_kernels ---
  • universe_kernconf_arm64_GENERIC ---
  • universe_kernconf_arm64_GENERIC-NODEBUG ---
  • universe_kernconf_arm64_GENERIC-UP ---
  • universe_amd64_done ---

amd64 completed on Fri Apr 6 05:16:08 EDT 2018

  • universe_arm64_done ---

arm64 completed on Fri Apr 6 05:35:21 EDT 2018

  • universe_i386_done ---

i386 completed on Fri Apr 6 05:43:02 EDT 2018

  • universe_epilogue --- --------------------------------------------------------------

make universe completed on Fri Apr 6 05:43:02 EDT 2018

(started Thu Apr  5 20:37:43 EDT 2018)

Apr 6 2018, 3:19 PM
ali_mashtizadeh.com created D14989: Replace exect() with a portable version.
Apr 6 2018, 3:17 PM

Apr 5 2018

ali_mashtizadeh.com added a comment to D14976: Remove architecture specific shmat.S files..
--- universe_kernconf_arm_IMX6 ---
--- universe_kernconf_arm_LINT ---
--- universe_kernconf_arm_PANDABOARD ---
--- universe_kernconf_arm_RPI-B ---
--- universe_kernconf_arm_SAM9G20EK ---
--- universe_kernconf_arm_SOCFPGA ---
--- universe_kernconf_arm_TEGRA124 ---
--- universe_arm64_aarch64 ---
>> arm64.aarch64 buildworld completed on Thu Apr  5 06:33:36 EDT 2018
--- universe_arm64_kernels ---
--- universe_kernconf_arm64_GENERIC ---
--- universe_kernconf_arm64_GENERIC-NODEBUG ---
--- universe_kernconf_arm64_GENERIC-UP ---
--- universe_arm_kernels ---
--- universe_kernconf_arm_TS7800 ---
--- universe_kernconf_arm_VERSATILEPB ---
--- universe_kernconf_arm_VIRT ---
--- universe_kernconf_arm_VYBRID ---
--- universe_kernconf_arm_ZEDBOARD ---
--- universe_arm64_done ---
>> arm64 completed on Thu Apr  5 07:16:19 EDT 2018
--- universe_arm_done ---
>> arm completed on Thu Apr  5 07:16:25 EDT 2018
--- universe_amd64_amd64 ---
>> amd64.amd64 buildworld completed on Thu Apr  5 07:22:05 EDT 2018
--- universe_amd64_kernels ---
--- universe_kernconf_amd64_GENERIC ---
--- universe_kernconf_amd64_GENERIC-MMCCAM ---
--- universe_kernconf_amd64_GENERIC-NODEBUG ---
--- universe_kernconf_amd64_LINT ---
--- universe_kernconf_amd64_LINT-NOINET ---
--- universe_kernconf_amd64_LINT-NOINET6 ---
--- universe_kernconf_amd64_LINT-NOIP ---
--- universe_kernconf_amd64_MINIMAL ---
--- universe_i386_i386 ---
>> i386.i386 buildworld completed on Thu Apr  5 07:55:28 EDT 2018
--- universe_i386_kernels ---
--- universe_kernconf_i386_GENERIC ---
--- universe_kernconf_i386_GENERIC-NODEBUG ---
--- universe_kernconf_i386_LINT ---
--- universe_kernconf_i386_LINT-NOINET ---
--- universe_kernconf_i386_LINT-NOINET6 ---
--- universe_kernconf_i386_LINT-NOIP ---
--- universe_kernconf_i386_PAE ---
--- universe_amd64_done ---
>> amd64 completed on Thu Apr  5 08:24:16 EDT 2018
--- universe_i386_done ---
>> i386 completed on Thu Apr  5 08:40:23 EDT 2018
--- universe_epilogue ---
--------------------------------------------------------------
>>> make universe completed on Thu Apr  5 08:40:23 EDT 2018
                      (started Wed Apr  4 23:01:07 EDT 2018)
--------------------------------------------------------------
Apr 5 2018, 4:06 PM
ali_mashtizadeh.com created D14976: Remove architecture specific shmat.S files..
Apr 5 2018, 4:05 PM

Mar 8 2018

ali_mashtizadeh.com added a comment to D14609: Split libc into libc and libsys.

Thanks for the comments I'll rework the diff

Mar 8 2018, 12:54 AM

Mar 7 2018

ali_mashtizadeh.com removed a reviewer for D14609: Split libc into libc and libsys: emaste.
Mar 7 2018, 7:20 PM
ali_mashtizadeh.com created D14609: Split libc into libc and libsys.
Mar 7 2018, 7:19 PM